Search Claude Code session history: kioku
Claude Code keeps every session on disk, but it has no way to search across them. kioku is a terminal tool that indexes those transcripts and returns the individual messages that match, so you can find the conversation and pick it up again.
Where Claude Code keeps its sessions
kioku reads Claude Code transcripts from ~/.claude/projects. If you set $CLAUDE_CONFIG_DIR, it reads $CLAUDE_CONFIG_DIR/projects instead. To point it somewhere else, set KIOKU_CLAUDE_DIR to the transcript folder.
It only reads. kioku never edits Claude Code transcripts; the one thing it writes is its own index in ~/.cache/kioku.
Search the sessions
brew install Ray0907/kioku/kioku
kioku --harness claude "rate limit"
kioku --harness claude --since 7d 部署
- A space means AND,
"black tea"is an exact phrase,-wordexcludes, and a bare word is a prefix. - Every row is one message, ranked by BM25, with its project and age. Your messages and the assistant’s come before tool output.
- Chinese, Japanese and Korean terms match inside running text, through fts5-cjk.
- Leave out
--harness claudeto search every agent at once, or press Tab in the TUI to cycle between them.

Resume the session you found
Select a result and press Enter. kioku runs claude --resume <id> in the session’s original directory, so the agent opens with that conversation loaded. Press y to copy the command instead, or o to open the project in your editor.
Let Claude Code search its own history
kioku ships a Claude Code plugin. Install the binary first, then run:
/plugin marketplace add Ray0907/kioku
/plugin install kioku@kioku
After a restart, Claude Code gets four read-only tools (kioku_search, kioku_sessions, kioku_show, kioku_context) and a skill that tells it when to use them. A SessionStart hook also runs kioku context, so each new session starts with the project’s recent sessions listed.
Related
- Search Codex session history with kioku
- Why I built kioku
- Source and full docs: github.com/Ray0907/kioku