Add option to get a shell in post_kernel_operation