anthropics / anthropics/claude-code

[BUG] VS Code extension: slash command recalled from input history submits with its argument dropped

Open
#94,376 0 comments 0 reactions 0 assignees View on GitHub
area:vscode bug has repro platform:vscode platform:windows
Dominant language
Python
Stars
145k
Forks
23.1k
PR merge metrics
PR metrics pending

Description

## What happens

In the VS Code extension, recalling a custom slash command **with an argument** from input history and submitting it runs the command with an **empty argument**, even though the input box visibly shows the argument.

## Steps to reproduce

1. Define a project command in `.claude/commands/.md` whose body uses `$ARGUMENTS`.
2. Run it with an argument, e.g. `/my-command 1234`. It works; `$ARGUMENTS` is `1234`.
3. Later in the same session, press **Up** (twice, to reach that entry) to recall `/my-command 1234`. The input box shows `/my-command 1234`.
4. Press **Enter**.

**Expected:** the command runs with `$ARGUMENTS` = `1234`.
**Actual:** the command runs with `$ARGUMENTS` empty (the model receives the command body with the argument blank).

Reproduced twice in a row in one session on 2026-09-14. Typing the command fresh with its argument works every time. The user reports this as new behaviour; recalling commands with arguments used to work.

## Environment

- Claude Code VS Code extension, Windows 10 (19045). Installed extension versions: 2.1.270 (and 2.1.268 still present on disk).

## Possible cause (not confirmed)

This looks related to two earlier, now-closed reports about the slash-command autocomplete in the VS Code extension:

- #72601: pressing Enter while the slash-command autocomplete is showing selects the command instead of submitting the typed text.
- #56923: slash-command autocomplete interferes with arrow-key history navigation for entries starting with `/`.

A plausible mechanism is that recalling `/my-command 1234` from history opens the autocomplete for `/my-command`, and Enter accepts that completion (the bare command) rather than submitting the recalled text, dropping the argument. This has not been verified; it may be a regression of the fix for #72601 or #56923.

## Workaround

Retype the command with its argument instead of recalling it from history. Pressing Escape to close the autocomplete before Enter may also work (untested).

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the issue in the VS Code extension using a custom slash command with $ARGUMENTS, then inspect the slash-command autocomplete and input-history handling around Enter and arrow-key navigation. Done means recalling `/my-command 1234` and pressing Enter executes the command with `1234` preserved, while freshly typed commands continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
developer-experience
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.