claude-code - 💡(How to fix) Fix [BUG] VS Code extension: Slash-command autocomplete traps history navigation

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

Root cause (suspected)

Whenever the prompt box content begins with "/", the slash-command autocomplete UI takes over arrow key handling, regardless of whether the content was typed by the user or populated by history navigation, and regardless of whether the slash command is valid. History navigation should bypass the autocomplete when the input was populated from history, or the autocomplete should not capture ↑/↓ in that case.

RAW_BUFFERClick to expand / collapse

Steps to reproduce

  1. Send a few normal prompts, followed by any "/"-prefixed input that gets recorded in history, then more normal prompts:
    • "first test input"
    • "second test input"
    • /insights (any prompt starting with "/" works, valid OR invalid — see Notes)
    • "third test input"
  2. With the prompt box empty, press ↑ repeatedly to walk back through history.

Actual

  • ↑ walks back: "third test input" → /insights, and stops there.
  • Once the input box contains the /insights entry, the slash-command autocomplete UI appears (the "Slash commands" suggestion popup for recognized commands, or "No matching commands" for unrecognized ones), and arrow keys are captured by that popup.
  • ↑ no longer goes further back to "second test input" / "first test input".
  • ↓ no longer returns to "third test input" either, nor to the in-progress empty input.
  • The user is effectively pinned to the "/" entry until they manually clear the input.

Root cause (suspected)

Whenever the prompt box content begins with "/", the slash-command autocomplete UI takes over arrow key handling, regardless of whether the content was typed by the user or populated by history navigation, and regardless of whether the slash command is valid. History navigation should bypass the autocomplete when the input was populated from history, or the autocomplete should not capture ↑/↓ in that case.

Expected

  • ↑/↓ walk through every history entry, including entries that begin with "/", in chronological order.
  • ↓ from the newest entry returns to the in-progress empty input.
  • Slash-command autocomplete only activates for fresh user typing, not when the input was populated by history navigation.

Notes

  • Whether a "/"-prefixed prompt ends up in history depends on the command:
    • Locally-handled commands like /help and /status do NOT enter history, so they cannot be used to reproduce this bug.
    • Recognized commands sent to the model (e.g. /insights) enter history and trigger the "Slash commands" suggestion popup.
    • Unrecognized strings like /helpあああ or /unknowncmd also enter history and trigger the "No matching commands" popup. In both of the latter cases, the autocomplete UI captures the arrow keys.
  • This is the autocomplete-trap bug (#11265 / #10454) reached via a new entry path: history navigation populating the input with a recorded "/..." prompt, rather than the user typing "/" themselves. #11265 was reported only against the CLI; this report covers the VS Code extension, where the autocomplete UI is a separate implementation.
  • The follow-on symptom (↓ does not return to a newer history entry or to the in-progress input) overlaps with #12664 (VS Code extension, Windows, NOT_PLANNED but received +1s and "losing prompts daily" comments before inactivity-autoclose).
  • #32922 / #30429 are tangentially related (arrow keys at boundaries destroy in-progress input) but describe a different symptom.

Environment

  • Claude Code VS Code extension: anthropic.claude-code 2.1.132
  • VS Code: 1.119.0
  • OS: Windows 11 Pro 26200

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING