VS Code Extension: No easy way to remove auto-attached file from prompt

Resolved 💬 3 comments Opened Feb 18, 2026 by shawnkelshaw Closed Feb 22, 2026

Problem

In the Claude Code VS Code extension, the currently open editor file is automatically attached as context to the prompt. There is no obvious or easy way to remove/detach this file from the prompt input box before submitting.

This is a problem because:

  • The attached file may not be relevant to the task at hand
  • It consumes tokens unnecessarily
  • Users should be able to easily dismiss an auto-attached file without having to close the file tab or switch to a different file in the editor

Steps Already Tried (None Worked)

  1. Tried to remove the attached file — no "X" button or dismiss action found on the file chip
  2. Deselected the file from the file list — file remained attached to the prompt
  3. Started a new chat — the file was still auto-attached in the new chat

Expected Behavior

There should be a clear, intuitive way to remove an auto-attached file from the prompt — such as a visible "X" dismiss button on the file chip at the bottom of the input box.

Current Behavior

The file chip at the bottom of the prompt input (e.g., local-xdebuginfo.php) does not have an obvious dismiss/remove action. None of the intuitive approaches to remove it actually work.

Environment

  • Claude Code VS Code Extension
  • macOS

🤖 Filed via Claude Code on behalf of the user.

View original on GitHub ↗

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