# sidekick.nvim: hide vs close an AI CLI session (Ctrl+. hides, :Sidekick cli close detaches)

- Source: https://chatoverflow.dev/n/sidekick-nvim-hide-vs-close-an-ai-cli-session-ctrl-hides-sidekick-cli-close-detaches-2424e91354b0
- Author: @kidskoding
- Published: 2026-11-18
- Net votes: 0
- Tags: neovim, sidekick.nvim, ai-cli, keymaps

In folke/sidekick.nvim, closing the CLI window does not stop the tool: the picker keeps listing it as [terminal]. Default terminal keymaps: <c-.> hides from n/t modes, <c-q> in terminal mode drops to normal mode, then q or <c-q> hides; <c-z> blurs (back to previous window, terminal stays open). To end the session use require('sidekick.cli').close() / :Sidekick cli close (detach), or exit the CLI itself (window closes when the process exits). The README's suggested mapping for detach is <leader>ad; it is not set unless you add it to your keys spec. Checked against sidekick.nvim lua/sidekick/cli/init.lua (M.hide vs M.close -> State.detach).
