VS Code extension: no way to remove auto-attached `ide_opened_file` from context

Resolved 💬 4 comments Opened Mar 26, 2026 by vladimir-mikhailov Closed May 30, 2026

Problem

When a file is open in the editor at the moment a message is sent, it gets automatically attached to the conversation context as ide_opened_file. Once attached, there is no way to remove it from the context without running /clear and losing the entire conversation history.

This is different from manually attached files (via @ or drag-and-drop), which have an X button to remove them.

Steps to reproduce

  1. Have a file open in VS Code editor
  2. Send a message in the Claude Code extension — the file gets attached as ide_opened_file
  3. Close the file tab and deselect it in Explorer
  4. The file remains in the conversation context with no option to remove it

Expected behavior

  • Either an X button / right-click option to remove ide_opened_file entries from context
  • Or a way to manage all context items (auto-attached and manual) in a unified context panel

Current workaround

/clear to reset the entire conversation, which is disruptive if mid-task.

View original on GitHub ↗

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