AI incorrectly treats 'may or may not be related' file context as intentional user hints

Resolved 💬 3 comments Opened Jan 10, 2026 by davidmoshal Closed Feb 24, 2026

Description

When IDE extensions send file-open notifications with the caveat "This may or may not be related to the current task", the AI frequently treats these as intentional hints from the user rather than incidental IDE activity.

Reproduction

  1. Have a conversation with Claude Code about topic A
  2. Open an unrelated file in your IDE (without mentioning it)
  3. Claude may incorporate that file into its response as if you were hinting at it

Example

User asked about architecture documentation improvements. User happened to have a file called sankey-flow-widget.md open in their IDE. Claude incorrectly said "The Sankey diagram you have in the old widgets folder could actually work well here" — even though the user never mentioned sankey diagrams.

The system reminder explicitly said: "This may or may not be related to the current task" — but Claude ignored the caveat and assumed relevance.

Additional Concern

What happens when multiple IDEs (VS Code, IntelliJ, Cursor, etc.) are connected to the same project simultaneously? Would file notifications from all IDEs arrive in the conversation, increasing noise and the likelihood of this mistake?

Suggested Fixes

  1. Stronger language in system reminder: e.g., "IGNORE unless user explicitly references this file"
  2. AI behavior change: Never reference file-open context unless the user mentions it directly
  3. Documentation: Clarify expected AI behavior for handling ambient IDE context

Environment

  • Claude Code CLI
  • IDE extension sending file-open notifications

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗