[BUG] IDE context indicator `[⧉ In <file>]` flickers on/off repeatedly in the prompt input (VS Code integrated terminal)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
While Claude Code is idle at an empty prompt, the IDE context indicator in the input box (❯ [⧉ In application-cd.yml] █) keeps appearing and disappearing. The prompt line switches back and forth between ❯ █ and ❯ [⧉ In application-cd.yml] █ several times per second (a visible flicker). Nothing is typed and I don't touch the editor or the terminal.
Frame-by-frame analysis of the screen recording (30 fps):
- Only the prompt input line changes between frames. The rest of the TUI stays the same.
- The indicator toggles about 10 times in ~6 seconds. It stays visible for about 6 frames (~200 ms) at a time, with an irregular interval between toggles (~0.2–1 s).
- The flicker stops after I exit the session (
/quit).
Related but different: #94189 reports the indicator never clearing (JetBrains). Here it clears and reappears repeatedly with no IDE state change.
What Should Happen?
The In <file> indicator should reflect the current active editor / selection and stay stable while the IDE state doesn't change. It should not toggle when nothing changes.
Error Messages/Logs
(none)
Steps to Reproduce
- Open a repository in VS Code and open a file (here
.github/workflows/application-cd.yml) in an editor tab. - Run
claudein the VS Code integrated terminal (IDE integration connected). - Put focus in the terminal panel and leave the prompt empty.
- Watch the input line:
[⧉ In application-cd.yml]appears and disappears repeatedly.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.280 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
VS Code integrated terminal
Additional Information
Environment details
- Claude Code VS Code extension installed / IDE integration connected
- Bypass permissions mode, 6 background agents running, recap enabled
Suspected cause (not verified)
The indicator seems to be driven by the IDE selection_changed / active-editor updates. It looks like the TUI gets alternating "file active" / "no active editor" states, and it re-renders each one without debouncing. Possible sources:
- The terminal panel has focus, so VS Code's
activeTextEditoralternates between the file andundefined. - More than one IDE connection (multiple VS Code windows, or the terminal and the extension panel) sends conflicting selection state.
Debouncing the indicator, or ignoring "no editor" updates while the terminal has focus, would probably fix it.
Recording
https://github.com/user-attachments/assets/cea1064d-7a55-40d3-a8b1-1a77842a4d24
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗