claude-code - 💡(How to fix) Fix [DOCS] Prompt history docs do not explain consecutive duplicate suppression

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…
RAW_BUFFERClick to expand / collapse

Documentation Type

Incorrect/outdated documentation

Documentation Location

https://code.claude.com/docs/en/claude-directory

Section/Topic

Application dataKept until you delete them table entry for history.jsonl

Current Documentation

The docs currently say:

history.jsonl | Every prompt you've typed, with timestamp and project path. Used for up-arrow recall.

Related command-history docs say:

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?

Changelog v2.1.147 says:

Prompt history no longer records consecutive duplicate entries — recalling a prompt with arrow-up and submitting it again won't add another copy

A. The history.jsonl description is now too broad

After v2.1.147, prompt history intentionally skips a consecutive duplicate when the user recalls a prompt with Up-arrow and submits it again. That means history.jsonl no longer literally contains "Every prompt you've typed" in this case.

B. The command-history docs do not describe the deduplication behavior

The interactive-mode page explains how prompt history is stored and recalled, but it does not mention that consecutive duplicate entries are suppressed. Users inspecting ~/.claude/history.jsonl or checking why an Up-arrow re-submission did not create another history line have no documentation that this is expected behavior.

Suggested Improvement

Update the prompt-history docs to describe the new behavior explicitly.

Before:

history.jsonl | Every prompt you've typed, with timestamp and project path. Used for up-arrow recall.

After:

history.jsonl | Prompt history used for up-arrow recall, with timestamp and project path. Consecutive duplicate entries recalled from history are deduplicated, so submitting the same recalled prompt twice in a row does not add another identical history line.

Also add a short note in Interactive modeCommand history that Up-arrow recall/submit now suppresses consecutive duplicates in v2.1.147 and later.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

PageLine(s)Context
https://code.claude.com/docs/en/claude-directory1518history.jsonl is described as storing every prompt typed
https://code.claude.com/docs/en/interactive-mode213-218Command history explains storage, reset, and Up/Down recall but not duplicate suppression

Total scope: 2 pages affected

Version context: This behavior changed in v2.1.147.

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] Prompt history docs do not explain consecutive duplicate suppression