Ctrl+R reverse search limited to recent ~18h window; older prompts unreachable despite 'everywhere' scope
Summary
Ctrl+R reverse prompt-search ("Search prompts") only surfaces roughly the last ~18 hours (~150 prompts) of history, even with scope set to "everywhere". Prompts from days/weeks/months ago are unreachable, despite a complete on-disk history. This contradicts the documented behavior, and it's a change from how it used to work (older versions surfaced much older prompts).
Expected (per docs)
The interactive-mode docs state Ctrl+R searches "prompts from all previous sessions, not just the current one," with Ctrl+S cycling scope this session → this project → all projects. With scope on all-projects ("everywhere"), the full history should be searchable.
Actual
- Scope reads "Search prompts · everywhere", yet the oldest reachable match for a common word (e.g.
deploy) is only ~18h old. - Searching a phrase known to occur many times in older history (a frequently re-sent reminder block) returns no real match — the fuzzy matcher instead returns unrelated recent prompts (best-effort junk), indicating the target simply isn't in the searchable set.
Environment
- Claude Code v2.1.187
- macOS (Darwin arm64)
~/.claude/history.jsonl: 26,301 entries spanning 266 days — complete and intact.- The legacy per-project
historyarrays in~/.claude.jsonare now empty (history appears to have migrated tohistory.jsonl).
Evidence the data isn't lost
The target prompts are present in ~/.claude/history.jsonl (verified via grep/jq) with full text and timestamps; they are simply outside the reverse-search window. So this is a search-depth/window limitation, not data loss.
Repro
- Use Claude Code heavily for weeks (so
history.jsonlaccumulates thousands of entries). Ctrl+R, set scope to "everywhere" (Ctrl+S).- Search for a word/phrase you know you used more than ~24h ago.
- Observe: only recent (~18h) prompts are searchable; older ones never appear, and the fuzzy matcher returns unrelated entries.
Question
Is the recent-window cap intended (e.g. a performance truncation to avoid scanning large history files)? If so, it contradicts the docs and should be documented and ideally made configurable (a setting to search the full history.jsonl). If not, it's a regression — Ctrl+R previously reached prompts from weeks/months ago.
Likely cause
A silent change to index/search only a recent slice of history rather than the full history.jsonl. No changelog entry across v2.1.175–v2.1.187 mentions a search-depth cap or recent-window behavior.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗