claude-code - 💡(How to fix) Fix VSCode extension: phantom `/clear` is the default autocomplete match, silently swallows clear-conversation intent [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

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…
GitHub stats
anthropics/claude-code#53715Fetched 2026-04-28 06:48:58
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
1
Timeline (top)
labeled ×3commented ×1

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.

Error Message

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. 5. The literal text /clear is sent to the model as a user message. The conversation is not cleared. No error is shown.

Root Cause

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.

Fix Action

Workaround

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

RAW_BUFFERClick to expand / collapse

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: [email protected]
  • 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.

extent analysis

TL;DR

The issue can be worked around by manually selecting the "Clear conversation" entry from the autocomplete menu instead of accepting the default phantom /clear entry.

Guidance

  • Verify that no user-defined commands or plugins are causing the phantom entry by checking the ~/.claude/commands/ and ~/.claude/plugins/cache/**/commands/ directories.
  • Check the extension's code to see if there's a logic error that's causing the phantom entry to be generated.
  • Consider reporting the issue to the extension developers, as the phantom entry seems to be generated by the extension itself.
  • In the meantime, use the workaround of manually selecting the "Clear conversation" entry or using the chat-panel clear button / Ctrl+L.

Notes

The issue seems to be specific to the [email protected] extension version, and it's unclear if it's a regression or a long-standing issue.

Recommendation

Apply the workaround of manually selecting the "Clear conversation" entry or using the chat-panel clear button / Ctrl+L, as the root cause of the issue is likely a bug in the extension that needs to be fixed by the developers.

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

claude-code - 💡(How to fix) Fix VSCode extension: phantom `/clear` is the default autocomplete match, silently swallows clear-conversation intent [1 comments, 2 participants]