[FEATURE] Cross-project full-text search in --resume

Resolved 💬 3 comments Opened Mar 12, 2026 by amy-zheng-grow Closed Mar 12, 2026

Summary

claude --resume is great for jumping back into a recent session, but it has two limitations that make it hard to find older or cross-project work:

  1. Directory-scoped — only shows sessions from the current project
  2. Title-only search — matches against firstPrompt in sessions-index.json, not the full prompt text

The data already exists

~/.claude/history.jsonl contains every prompt ever typed across all projects, with four fields per entry:

  • display — the full prompt text
  • project — which directory it came from
  • timestamp — when it was typed
  • sessionId — which session it belongs to (used by claude --resume)

Proposed change

When a search query is passed to --resume, also search history.jsonl by full prompt text across all projects — not just the current directory's sessions-index.json.

Why it matters

It's common to remember roughly what you typed in a past session ("I was debugging an auth redirect issue") but not which project it was in or when. Right now there's no built-in way to find it. The data exists — it just isn't searchable.

Workaround

I built a /history slash command that does this by reading history.jsonl directly, which confirmed the approach works well. But a first-class --resume that searches cross-project and against full prompt text would be a much better experience than a workaround script.

View original on GitHub ↗

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