DEV Community

Cover image for Gemini CLI: Disable Interactive Shell If Tab Keeps Jumping Into the Shell Pane
Dominik Oswald
Dominik Oswald

Posted on

Gemini CLI: Disable Interactive Shell If Tab Keeps Jumping Into the Shell Pane

On Linux, I ran into a Gemini CLI behavior that was easy to misread at first: the problem was not just a command hanging, but Gemini’s embedded shell taking over the focus flow. The UI literally shows Shell awaiting input and tells you to press Tab to focus, which means Tab is being used to move focus into the interactive shell pane inside Gemini CLI. geminicli

That may be useful if you want a real terminal session inside Gemini CLI. It is much less useful when you only want non-interactive commands to run and return output.

The setting

At the time of writing, the current stable Gemini CLI release is v0.40.0. The shell docs also describe tools.shell.enableInteractiveShell as a boolean setting that controls the interactive shell experience, defaults to true, and requires a restart after changes. geminicli

Add this to ~/.gemini/settings.json (or project setting.json):

{
  "tools": {
    "shell": {
      "enableInteractiveShell": false
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

What this changes

Gemini CLI says interactive shell support uses node-pty, which allows real interactive sessions for commands like vim, nano, htop, and git rebase -i. The docs also state that when an interactive command is running, you can send input to it from Gemini CLI and focus the shell with Tab. google-gemini.github

That is the key detail. If Tab keeps jumping into the shell pane, that is not random terminal behavior. It is part of Gemini CLI’s interactive shell design. geminicli

When you set enableInteractiveShell to false, Gemini falls back to the simpler non-interactive execution path instead of the richer pseudo-terminal workflow. According to the docs, that fallback uses child_process, which does not support interactive commands. geminicli

Top comments (0)