[BUG] Option+K (Alt+K) overwrites context instead of adding multiple references in VS Code extension

Resolved 💬 5 comments Opened Jan 15, 2026 by mtskf Closed Feb 28, 2026

Description

In the VS Code extension, using Option+K (Mac) / Alt+K (Windows/Linux) to add file context now overwrites the previous context instead of adding multiple references.

Previous Behavior

  • Option+K inserted an @file:line reference directly into the chat input field as text
  • Multiple uses of Option+K would add multiple @ references to the input
  • Users could easily add context from multiple files

Current Behavior

  • Option+K adds context to a panel below the chat input field
  • Using Option+K again replaces the previous context instead of adding to it
  • Users cannot add multiple file/selection contexts using this shortcut

Steps to Reproduce

  1. Open VS Code with Claude Code extension
  2. Open File A, select some code, press Option+K
  3. Context from File A appears in the context panel
  4. Open File B, select some code, press Option+K
  5. Expected: Both File A and File B contexts are shown
  6. Actual: Only File B context is shown (File A is overwritten)

Impact

This is a significant regression for workflows that require referencing multiple files:

  • Comparing two files
  • Asking about relationships between components and their types
  • Refactoring code that spans multiple files

Workaround

  • Manually type @file1 @file2 in the chat input
  • Drag and drop files (limited functionality per #3967)

Environment

  • VS Code: 1.108.0
  • Claude Code Extension: Latest version
  • OS: macOS

Related Issues

  • #3967 (multiple files context via drag-and-drop)

View original on GitHub ↗

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