[BUG] Desktop: Terminal panel flickers open/closed on every shell tool call, stealing keyboard focus (Windows)
Terminal panel flickers and steals keyboard focus on every shell tool call (Desktop app, Code tab)
Summary
In the Claude Code desktop app (Code tab), the Terminal panel flickers — opens/closes — on every Bash/PowerShell tool call the assistant makes. Each flicker steals keyboard focus from the chat input, interrupting typing. On a task involving several shell commands this makes the app effectively unusable for typing while the assistant works.
Environment
- App: Claude Code desktop app (Code tab)
- App version: 1.46388.4
- OS: Windows 11 Enterprise 10.0.26200
- Shell: Windows PowerShell (
C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe)
Steps to reproduce
- Open the Claude Code desktop app, Code tab.
- Ask the assistant to run any shell command (e.g.
echo test). - Observe the Terminal panel.
Expected behavior
The Terminal panel either stays in whatever state the user left it, or updates its contents in place without taking keyboard focus. Typing in the chat input should never be interrupted by a tool call.
Actual behavior
The Terminal panel flickers (opens then closes) and keyboard focus jumps away from the chat input on each shell tool call. Focus returns, but any keystrokes during the flicker are lost or misdirected.
Additional findings
Several plausible causes were investigated and ruled out:
| Investigated | Result |
|---|---|
| Hooks in ~/.claude/settings.json | None configured — not the cause |
| Custom ~/.claude/keybindings.json | File does not exist — defaults only |
| Desktop app config %APPDATA%\Roaming\Claude\config.json | Contains only terminalCliPowerShellPath, window/sidebar layout keys. No auto-open or auto-focus setting exists. |
| Leaving the Terminal panel already docked open | Still flickers — prior panel state is not respected |
| run_in_background: true on the command | Worse — produces two flickers per command (one on launch, one on completion) |
Notably, the flicker occurs only on Bash/PowerShell tool calls. Tool calls that do not shell out (file read/write/search) produce no flicker at all, which isolates the trigger to the shell execution path rather than general tool activity.
Impact
There is currently no user-facing workaround. No GUI toggle exists, and no configuration key in either settings.json or the desktop app's own config.json controls this behavior. The only mitigation available is asking the assistant to avoid shell commands entirely, which is not viable for tasks requiring git, npm, or other CLIs.
Suggested fix
Either:
- Do not change Terminal panel visibility or focus in response to tool-call execution; write output into the panel without raising or focusing it; or
- Add a setting (e.g.
autoOpenTerminalOnToolUse: false) allowing users to suppress the auto-open/auto-focus behavior.