VSCode extension: phantom `/clear` is the default autocomplete match, silently swallows clear-conversation intent

Resolved 💬 3 comments Opened Apr 27, 2026 by hamishnorton Closed Apr 30, 2026

Description

In the VSCode native extension, typing /clear in the chat input shows two entries in the slash-command autocomplete menu:

  1. /clear — a phantom entry that does not correspond to any user, project, or plugin command on disk. This is the default highlighted match. Selecting it (or just pressing Enter, since it's pre-selected) submits the literal text /clear to the model and does not clear the conversation.
  2. "Clear conversation" — the legitimate built-in option, which works correctly but is not the default.

The user-visible effect: typing /clear and pressing Enter — the natural muscle-memory action — appears to do nothing. The conversation isn't cleared, and there's no error. The text is silently sent to the model. The user only discovers the failure when the model responds about a /clear message it received.

The phantom /clear entry should not exist at all, and certainly should not be the default match for the literal slash-command name of a built-in control.

Steps to reproduce

  1. Open the Claude Code chat panel in VSCode.
  2. Type /clear in the input.
  3. Observe the autocomplete menu — it contains both a phantom /clear entry (highlighted as default) and a separate "Clear conversation" entry.
  4. Press Enter (accepting the default).
  5. The literal text /clear is sent to the model as a user message. The conversation is not cleared. No error is shown.

Expected behaviour

Typing /clear and pressing Enter should clear the conversation, the same way the chat panel's clear button or Ctrl+L does. Only the "Clear conversation" entry should appear in the menu, and /clear as the exact literal name of a built-in control should map to it directly.

Actual behaviour

A phantom /clear entry is the default match. Pressing Enter sends /clear as text to the model. The conversation isn't cleared, and the failure is silent.

Verification that no user command defines /clear

  • No clear.md in ~/.claude/commands/ or any project .claude/commands/
  • No clear.md in any installed plugin (~/.claude/plugins/cache/**/commands/)
  • No clear references in settings.json, settings.local.json, or any project settings
  • No hooks configured
  • Plugin/marketplace caches contain zero matches for clear

The phantom entry is generated by the extension, not by user config.

Environment

  • Claude Code CLI: 2.1.119
  • VSCode extension: anthropic.claude-code@2.1.120
  • VSCode: 1.117.0
  • OS: Pop!_OS 24.04 LTS (Linux 6.17.9)
  • Shell: bash

Workaround

Manually select the "Clear conversation" entry instead of accepting the default, or use the chat-panel clear button / Ctrl+L.

View original on GitHub ↗

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