google-gemini / google-gemini/gemini-cli
Gemini CLI doesn't maintain keyboard focus when VS Code extension closes a diff
- Dominant language
- TypeScript
- Stars
- 107k
- Forks
- 14.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 45
Description
### What happened?
When Gemini is making changes in code that I care about, I like to at least start by manually reviewing changes. The VS Code plugin makes this very convenient to do, by showing a nice diff preview in the editor pane while I have Gemini CLI running in the Terminal pane.
Every time I click "Yes" to approve a file edit, the diff preview closes **and Gemini CLI loses keyboard focus**. This means that for the very next diff, I can't just press . I need to **click again on the terminal pane**, then click enter. For. Every. Single. Edit.
https://github.com/user-attachments/assets/6fc5e035-157d-44e8-a3dc-ee8be0de0f8e
### What did you expect to happen?
I expected the Gemini CLI to maintain focus when stepping through file changes. It's what you'd expect, and it's also how competitive coding agent IDE integrations work.
### Client information
Client Information
Run `gemini` to enter the interactive CLI, then run the `/about` command.
```console
> /about
About Gemini CLI │
│ │
│ CLI Version 0.33.0 │
│ Git Commit 6ee19e1f6 │
│ Model Auto (Gemini 3) │
│ Sandbox no sandbox │
│ OS darwin │
│ Auth Method Logged in with Google (gjuggler@gmail.com) │
│ Tier Gemini Code Assist in Google One AI Ultra
```
### Login information
_No response_
### Anything else we need to know?
This has been my #1 frustration since I started actively using Gemini CLI. I was surprised that there wasn't an issue filed about this problem already. Am I the only one who isn't always auto-approving edits? Am I holding it wrong by running Gemini within the VS Code terminal pane?
Contributor guide
Assessment
This issue has not been assessed yet.