Add setting to disable terminal auto-focus in VS Code extension

Status Fixed / completed
Reported on v2.1.34
Maintainer reply None cached
Activity 4 comments · opened Feb 6, 2026 · closed Feb 6, 2026

Problem

When running Claude Code from an external terminal (e.g. Ghostty) with the VS Code extension connected for IDE integration, the terminal panel in VS Code pops up repeatedly during a session. This happens because the extension calls terminal.show() unconditionally after certain MCP tool operations (diff views, tab management, file operations, etc.).

There is no setting to disable this behavior. The existing VS Code setting terminal.integrated.focusAfterRun has no effect since the focus is triggered by the extension itself.

Expected behavior

A setting like claudeCode.terminalAutoFocus (default true) that can be set to false to prevent the extension from calling terminal.show() after IDE operations — especially when Claude Code is running in an external terminal rather than in VS Code's integrated terminal.

Environment

  • Platform: macOS (Darwin 25.2.0, arm64)
  • Terminal: Ghostty (external, not VS Code integrated terminal)
  • Claude Code Extension: 2.1.34
  • Claude Code preferred location: sidebar

View original on GitHub ↗

4 Comments

github-actions[bot] · 8 months ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/7618
  2. https://github.com/anthropics/claude-code/issues/15595
  3. https://github.com/anthropics/claude-code/issues/18205

This issue will be automatically closed as a duplicate in 3 days.

  • If your issue is a duplicate, please close it and 👍 the existing issue instead
  • To prevent auto-closure, add a comment or 👎 this comment

🤖 Generated with Claude Code

hakanensari · 8 months ago

Additional debugging

Confirmed this is caused by the Claude Code VS Code extension itself, not any specific setting or plugin.

Steps to reproduce

  1. Run Claude Code CLI from an external terminal (e.g. Ghostty)
  2. Have VS Code open with the Claude Code extension installed
  3. Close the terminal panel in VS Code
  4. Send any message to Claude in the external terminal
  5. The VS Code terminal panel pops open on every conversation turn

What was ruled out

  • terminal.integrated.focusAfterRun: "none" — already set, no effect
  • terminal.integrated.environmentChangesRelaunch — unchecked, no effect
  • Plugin hooks (rem Stop hook) — disabled, still happens
  • IDE connection (/ide disconnect) — disconnected, still happens
  • Claude Code sidebar — closed, still happens
  • Uninstalling the extension — fixes it

Conclusion

The extension runs background activity that reveals the terminal panel on every conversation turn, even when:

  • The sidebar is closed
  • The IDE integration is disconnected
  • No Claude session is active in VS Code

This only affects users running Claude Code from an external terminal while having the extension installed.

hakanensari · 8 months ago

Wow, just came across this. Claude must have posted this while troubleshooting.

In any case, issue went away after reinstalling the CC plugin.

github-actions[bot] · 8 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.