[BUG] Slash Command Text Loss Issue

Resolved 💬 7 comments Opened Aug 26, 2025 by hubaksis 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 ↗

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