Relayhistory

Search, resume, and hand off every coding-agent session on your machine, across every harness.

Relayhistory indexes the sessions your coding agents already write to disk into one local SQLite database. Search them all at once, jump back into a session with its harness's own resume command, and hand a compact context pack to another agent — or to a teammate's agent — to continue the work.

ai-hist search "auth rewrite"
# → matches across every Claude Code, Codex and Cursor session on this machine

ai-hist resume "auth rewrite"
# → codex resume 29284179-c09f-44f2-b9ec-16f678dc1832

ai-hist pack "auth rewrite" --tokens 1500
# → a token-budgeted context pack, ready to paste into another agent

What it reads

HarnessSource idNative resume
Claude CodeclaudeYes
CodexcodexYes
CursorcursorYes
GrokgrokYes
Muse CodemuseYes
OpenCodeopencodeNo — use ai-hist pack
Devin CLIdevinNo — use ai-hist pack
Agent RelayrelayNo — use ai-hist pack

Every source is indexed side by side: prompts, assistant turns, tool calls, file edits, token usage, and the parent/subagent tree, as far as each harness records them. Where a harness records less, the gap is named rather than papered over — see Sessions.

Three ways in

  • CLI — ai-hist, for people: search, resume, pack, inspect. See CLI.
  • MCP server — ai-hist-mcp gives an agent its own memory mid-session and, with the workspace cloud connector configured, creates handoffs another agent resumes. See MCP server.
  • TypeScript SDK — the ai-hist package, the same engine the CLI and MCP server call. See SDK.

All three run one Rust engine through a prebuilt Node-API addon. There is no second implementation to fall back to: if the native engine can't load, the error says why.

Local by default

History stays in ~/.local/share/ai-hist/ai-history.db on your machine. Reads never contact a provider, remote sources run only when you install and configure a plugin, and export writes only the slice you select. Team upload is done by the Agent Relay desktop app, not by Relayhistory.

Next steps