claude-code - 💡(How to fix) Fix [BUG] User prompt text permanently lost when skill invocation fails (Desktop) [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

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#48199Fetched 2026-04-15 06:30:21
View on GitHub
Comments
2
Participants
2
Timeline
3
Reactions
0
Timeline (top)
commented ×2cross-referenced ×1

Error Message

When a user types a /slash-command followed by additional prompt text (e.g., /surface-first-development the textcompletion knows it tho) and the skill fails to load, the entire user input is replaced with a red error banner:

  1. The error should be displayed without destroying the user's input
  • A plugin has a loading error
  1. Expected: The error is shown but the original prompt text is preserved so the user can edit or resubmit. See attached screenshot showing the behavior — autocomplete recognizes the skill, but after submission the prompt is replaced by the error banner. Suggested fix: on skill invocation failure, preserve the user's input text and display the error as a non-destructive notification or inline warning rather than replacing the entire message.
  • restart Claude Desktop - skill error msg + original prompt gone

Code Example

Unknown skill: surface-first-development

---

/surface-first-development the textcompletion knows it tho
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report
  • I am using the latest version of Claude Code

What's Wrong?

When a user types a /slash-command followed by additional prompt text (e.g., /surface-first-development the textcompletion knows it tho) and the skill fails to load, the entire user input is replaced with a red error banner:

Unknown skill: surface-first-development

The original prompt text that was typed after the slash command is permanently lost. There is no way to recover, edit, or re-submit the message. The user's input is gone from the chat and from the input field.

What Should Happen?

When a skill fails to load:

  1. The error should be displayed without destroying the user's input
  2. The original prompt text should remain in the input field (or at minimum in the chat history) so the user can edit and resubmit
  3. Ideally, the failed /slash-command portion could be highlighted or stripped, leaving the rest of the prompt intact

Steps to Reproduce

  1. Have a plugin installed whose skills are visible in the Customize UI (autocomplete suggests them) but fail to load at runtime. This can happen when:

    • A plugin was installed from a git-sourced marketplace that doesn't load skills properly (observed on older versions)
    • A plugin has a loading error
    • Any other condition where the UI registers the skill but the runtime can't resolve it
  2. In the chat input, type a slash command from that plugin followed by additional text:

    /surface-first-development the textcompletion knows it tho

    Note: The autocomplete dropdown recognizes and suggests the skill name, so the user has no indication it won't work.

  3. Press Enter to submit.

  4. Result: The entire message is replaced with a red Unknown skill: surface-first-development banner. The additional text "the textcompletion knows it tho" is permanently gone — not in the chat, not in the input field, not recoverable.

  5. Expected: The error is shown but the original prompt text is preserved so the user can edit or resubmit.

Claude Model

Opus

Is this a regression?

I don't know

Claude Code Version

2.1.108 (Claude Code)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Claude Code Desktop (native app)

Additional Information

See attached screenshot showing the behavior — autocomplete recognizes the skill, but after submission the prompt is replaced by the error banner.

This is particularly frustrating when the user has typed a long, detailed prompt after the slash command. The autocomplete suggesting the skill name creates a false sense of confidence that it will work, making the data loss unexpected.

Suggested fix: on skill invocation failure, preserve the user's input text and display the error as a non-destructive notification or inline warning rather than replacing the entire message.

Repro steps:

  • /any_skill_that_does_not_exist -> Claude crashes/doesn't answer
<img width="213" height="97" alt="Image" src="https://github.com/user-attachments/assets/3ca06449-c5d7-471e-8d5f-b029f2dae7b1" />
  • restart Claude Desktop - skill error msg + original prompt gone
<img width="161" height="88" alt="Image" src="https://github.com/user-attachments/assets/b25293b2-5252-4254-8016-743f6ae46594" />

extent analysis

TL;DR

Preserve the user's input text on skill invocation failure and display the error as a non-destructive notification.

Guidance

  • When a skill fails to load, instead of replacing the entire user input with an error banner, consider displaying the error as an inline warning or non-destructive notification.
  • Modify the error handling mechanism to preserve the original prompt text in the input field or chat history, allowing users to edit and resubmit.
  • Review the autocomplete feature to provide clear indications when a suggested skill may not work, reducing user frustration due to unexpected data loss.
  • Consider implementing a feature to highlight or strip the failed /slash-command portion, leaving the rest of the prompt intact for easier editing.

Example

No specific code example can be provided without knowing the exact implementation details of the Claude Code and its error handling mechanisms. However, the approach would involve modifying the error handling function to preserve user input and display errors in a less intrusive manner.

Notes

The suggested fix aims to improve user experience by preserving input and providing clear feedback. The implementation details may vary based on the underlying architecture of the Claude Code and its integration with the Anthropic API.

Recommendation

Apply workaround: Modify the error handling to preserve user input and display errors non-destructively, as this approach directly addresses the issue of data loss and improves user experience.

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 [BUG] User prompt text permanently lost when skill invocation fails (Desktop) [2 comments, 2 participants]