AI Briefing
KO

Claude Code Leaks Selection from Closed Files

·2026.05.14 09:51

Key point

A bug has been reported in the Claude Code VS Code extension where the selection state of a closed file is exposed to a new CLI session.

Details

In GitHub claude-code issue #58886, a bug was reported where the IDE bridge of the VS Code extension carries over the selection state of a closed file into a new claude CLI session.

The author wrote that two lines they had selected to copy from .env.production.local remained even after closing the tab, and when they ran claude in a new terminal while a different TypeScript file was open, the path and selection content of the file they had just closed were exposed again.

The exposed values included a Supabase publishable key and a service-role key, and the author stated that they immediately rotated the keys.

The reproduction steps are as follows.

  • Open a file in VS Code.
  • Select two lines.
  • Close the tab.
  • Open a different file.
  • Run claude in the terminal of the same VS Code window.
  • Ask about the IDE's open files to check whether the content of the closed file reappears.

The issue was reported on Windows 11, with Claude Code CLI 2.1.138 and VS Code extension 2.1.140, and a request was also made to confirm whether it reproduces on macOS/Linux.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.