[BUG] IDE file context indicator shows stale file after closing it
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?
When launching Claude Code in the terminal, the file context
indicator in the bottom-right corner (see screenshot) shows a file that has been
closed in the IDE. The indicator persists across new conversations and does not
update when the file is closed and a different file is focused in Cursor.
What Should Happen?
The file context indicator should reflect the currently
focused file in the IDE. If the previously indicated file has been closed, it
should either show the newly focused file or show nothing.
Error Messages/Logs
Steps to Reproduce
- Open a file (e.g., README.md) in Cursor
- Launch Claude Code — the file context indicator appears in the bottom-right
(e.g., "In README.md")
- Close that file in Cursor
- Focus on a different open file
- Exit Claude Code and start a new conversation
- The indicator still shows the closed file
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.81 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Cursor
Additional Information
<img width="605" height="144" alt="Image" src="https://github.com/user-attachments/assets/67b5c9f5-9bc9-4553-828f-97b0f1afd669" />
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗