[BUG] Slash Command Text Loss Issue

Status Closed — not planned
Maintainer reply None cached
Activity 7 comments · opened Aug 26, 2025 · closed Jan 30, 2026

Bug Summary

When using slash commands with additional text in Claude Code, the additional input text is lost if the command suggestion appears and Enter is pressed while the suggestion is visible.

Steps to Reproduce

  1. Type a slash command (e.g., /my-command)
  2. Add a space or a new line and continue typing additional text after the command
  3. Observe that the command appears and disappears as a suggestion below the input window
  4. Press Enter while the command suggestion is visible

Enter command:
<img width="500" height="150" alt="Image" src="https://github.com/user-attachments/assets/ef8d31ae-82aa-48df-b0d4-70b7afbc1c9f" />

Press enter while the suggestion is below (I noticed it appears when you hit space)
<img width="350" height="150" alt="Image" src="https://github.com/user-attachments/assets/3a4c8fa6-38b8-45c1-84b9-8af0c9a54b54" />

No additional text and nothing saved:
<img width="300" height="120" alt="Image" src="https://github.com/user-attachments/assets/58fd322e-8563-4428-b7df-899d019f4fab" />

Expected Behavior

  • The slash command should execute with the additional text provided as context/parameters
  • The full input (command + additional text) should be preserved in the conversation history

Actual Behavior

  • Only the slash command executes without the additional text
  • The entire additional text disappears and is not preserved in the conversation history
  • The additional text is lost completely

Workaround

The additional text is only accepted if Enter is pressed when the command suggestion is NOT shown below the window.

Impact

  • Loss of user input data
  • Need to retype context/parameters for slash commands
  • Unpredictable behavior based on UI state (suggestion visible or not)

Environment

  • Application: Claude Code
  • Platform: Windows
  • Claude code version: 1.0.92

Suggested Fix

  • Preserve the full input text when executing slash commands regardless of suggestion visibility
  • Ensure command + additional text are treated as a single input unit
  • Add the complete input to conversation history before command execution

View original on GitHub ↗

7 Comments

github-actions[bot] · 10 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

hubaksis · 10 months ago

The issue is still there. If you use a slash command, add some text after, and add a space in the end - the additional text is not saved - the slash command runs without additional information. The history is also empty.

muhFaza · 9 months ago

This bug is so annoying. Especially when you have typed a whole page for it. I'm suprised this is still not fixed.

bradsp · 9 months ago

I have been dealing with this issue for days and I tracked down this bug report. This is definitely a frustrating issue causing me to retype paragraphs of text. Please fix this.

github-actions[bot] · 8 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

marcindulak · 8 months ago

This issue was closed incorrectly despite recent human comments. This behavior of the bot is reported at https://github.com/anthropics/claude-code/issues/16497. Please upvote that issue, so maybe it gets noticed.

github-actions[bot] · 8 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.