Terminal UI flickers when VS Code extension sends frequent file context updates
Description
When the VS Code Claude Code extension (anthropic.claude-code) is installed and a file is open in VS Code, the terminal-based Claude Code CLI displays a context line like:
⧉ In case-study-risk-skills-hub.md
This line appears at the bottom of the terminal, on a separate line below the ⏵⏵ accept edits on (shift+tab to cycle) prompt line.
Bug
The file context line (⧉ In ...) rapidly appears and disappears (~0.1s interval), causing the terminal content height to constantly change. This makes the entire terminal window visually jump/flicker, which is very disruptive.
The flickering occurs even when:
- The file is in a completely different directory from the current working directory
- The file is just passively open in a VS Code tab (no active editing)
- Obsidian (local app) is closed — only VS Code triggers it
Steps to Reproduce
- Install the
anthropic.claude-codeVS Code extension - Open a markdown file in VS Code (e.g.,
case-study-risk-skills-hub.md) - In a separate terminal (iTerm2 on macOS), run
claudeto start a CLI session - Observe the bottom of the terminal — the
⧉ In <filename>line flickers rapidly
Expected Behavior
The file context indicator should either:
- Use a fixed layout slot (reserve space even when empty) to prevent height changes
- Debounce the IDE file context updates to avoid rapid show/hide cycles
- Display on the same line as the mode indicator instead of a separate line
Actual Behavior
The ⧉ In <filename> line is rendered on its own line and toggles visibility at ~0.1s intervals, causing the entire terminal content to shift up/down repeatedly.
Environment
- macOS (Darwin 25.4.0)
- Terminal: iTerm2
- Claude Code CLI (terminal mode)
- VS Code with
anthropic.claude-codeextension
Workaround
Uninstall the VS Code extension (code --uninstall-extension anthropic.claude-code) or close the file in VS Code.