claude-code - 💡(How to fix) Fix [DOCS] Interactive mode docs omit interrupted-prompt Up-arrow history behavior [1 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#58871Fetched 2026-05-14 03:37:24
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3
RAW_BUFFERClick to expand / collapse

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/interactive-mode

Section/Topic

"General controls" and "Command history"

Current Documentation

The docs currently say:

Ctrl+C | Cancel current input or generation | Standard interrupt

Esc | Interrupt Claude | Stop the current response or tool call mid-turn so you can redirect. Claude keeps the work done so far

And later:

Claude Code maintains command history for the current session:

  • Input history is stored per working directory
  • Input history resets when you run /clear to start a new session. The previous session's conversation is preserved and can be resumed.
  • Use Up/Down arrows to navigate (see keyboard shortcuts above)

What's Wrong or Missing?

The interactive reference does not say what happens when a user presses Ctrl+C or Esc before Claude has produced any response.

In v2.1.141, Claude Code fixed interrupted prompts being dropped from Up-arrow history before any response. That behavior is important for recoverability, but the main interactive docs still describe Ctrl+C/Esc only as interrupt keys and describe Up-arrow history only in general terms.

As a result, users have to infer from changelog notes whether an interrupted prompt is discarded, restored for editing, or kept in prompt history for later recall.

Suggested Improvement

Add one explicit note to interactive-mode near the interrupt shortcuts or the command-history section, for example:

If you press Ctrl+C or Esc before Claude has returned any response text, Claude Code preserves that prompt instead of dropping it. The input is restored so you can edit and resubmit it, and you can recall it later with Up-arrow history.

If there are exceptions, document them there too (for example, sessions started with CLAUDE_CODE_SKIP_PROMPT_HISTORY=1).

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

PageLine(s)Context
https://code.claude.com/docs/en/interactive-mode27-39, 213-218Defines Ctrl+C / Esc behavior and command-history navigation, but not interrupted-prompt preservation
https://code.claude.com/docs/en/quickstart309-313Mentions for command history without clarifying that interrupted prompts are recoverable
https://code.claude.com/docs/en/claude-directory1515-1518Describes history.jsonl as the backing file for Up-arrow recall, but not that pre-response interrupts are retained

Total scope: 3 pages affected

Exact changelog entry (v2.1.141):

Fixed prompts cancelled with Ctrl+C/Esc before any response being dropped from Up-arrow history

Related cross-reference:

PageContext
https://code.claude.com/docs/en/whats-new/2026-w13Weekly digest already says "Interrupting before any response restores your input automatically," so the durable reference gap is in the main interactive/history docs

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 [DOCS] Interactive mode docs omit interrupted-prompt Up-arrow history behavior [1 participants]