gemini-cli icon indicating copy to clipboard operation
gemini-cli copied to clipboard

Support Ctrl-Z suspension

Open markmcd opened this issue 4 months ago • 3 comments

What would you like to be added?

When running the Gemini CLI, as with many terminal apps, I often want to suspend it so I can run something in the terminal temporarily.

e.g. checking the state of some file, or running a command.

The ! shell mode only allows non-interactive commands, and initiates another LLM turn, which isn't always desirable.

For other apps, at least in Linux / POSIX environments, I can press Ctrl+z to drop to the shell, then fg to get back in. I would like GC to support this too.

Why is this needed?

Loads of reasons;

  • Editing a file to "finish" a step, or make it work
  • Reading a file to confirm the state after a GC initiated change
  • Running a program just created in GC

Additional context

Without the ability to suspend GC and return to the shell temporarily, I need to either create a new terminal window (which requires re-initialising the shell, and setting up any context required, like cd, venvs, etc), or quit GC and get back in (which either loses the chat context, or requires extra save/restore steps)

markmcd avatar Jul 28 '25 06:07 markmcd

You can use ubuntu byobu or tmux.

tuapuikia avatar Jul 28 '25 06:07 tuapuikia

Found possible duplicate issues:

  • #1576: (#0.9261563420295715)

gsquared94 avatar Jul 29 '25 22:07 gsquared94

What is the status of this request? Amp and Opencode CLIs support this, and it is so nice to pop up a terminal and run lazygit (or zed or whatever), then get back to Gemini with fg command.

Why was such an important feature not implemented yet?

hrstoyanov avatar Dec 14 '25 18:12 hrstoyanov