VSCode extension: /clear slash command sent as verbatim message instead of clearing conversation

Resolved 💬 3 comments Opened Apr 24, 2026 by travisdowns Closed Apr 24, 2026

Summary

In the Claude Code VSCode extension, typing the full string /clear and then selecting the /clear autocomplete entry sends the literal text /clear to the model as a user message instead of clearing the conversation.

If you instead partially type (e.g. just /) and pick Clear conversation from the autocomplete popup without fully typing out the command, it works correctly.

Regression: this broke within the last couple of weeks, after I simultaneously upgraded VSCode and the Claude Code extension. I don't know which of the two upgrades introduced the break. Currently reporting against:

  • Claude Code: 2.1.119
  • VSCode: 1.117.0
  • Extension: anthropic.claude-code@2.1.119
  • OS: Linux 6.8.0-110-generic

Steps to Reproduce (broken path)

  1. Open the Claude Code panel in VSCode.
  2. Type the full string /clear in the input.
  3. Slash-command popup shows /clear ("Clear conversation") highlighted.
  4. Select and submit.

!Slash-command popup with /clear selected

Expected

Conversation is cleared (same as /clear in the CLI).

Actual

/clear is delivered to the model as a literal user message. The assistant responds to it conversationally; context is not cleared:

!/clear appears as a user turn; the assistant runs a Bash tool and replies normally

Workaround

Don't type the full command — type / (or a prefix like /cl) and pick Clear conversation from the autocomplete. In that path the command is interpreted correctly.

Impact

/clear is one of the most frequently used slash commands. The current behavior along the "type-it-fully" path silently wastes tokens and pollutes context with a bogus user turn instead of resetting it.

View original on GitHub ↗

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