Install ctx on the machine where Pi has local session history:
curl -fsSL https://ctx.rs/install | shSee Install for setup and data-root details.
ctx can import Pi local JSONL session history when the supported file exists. Once imported, those sessions become searchable from the same CLI that Claude Code, Codex, Cursor, and other agents can run.
Import Pi history
The normal first-run path is enough for most machines:
ctx setupTo target Pi directly:
ctx import --provider pi
ctx sources --jsonctx sources --json shows whether Pi is supported by ctx and whether local Pi history is available to import on this machine.
Ask an agent to use Pi history
Use this when a later agent may need a decision or note from an earlier Pi session:
Use ctx to search prior Pi sessions before you answer.
Run:
ctx search "<focused query>" --provider pi
Inspect the best match:
ctx show event <ctx-event-id> --window 3
or:
ctx show session <ctx-session-id>
If you use retrieved history, cite the `ctx_event_id` or `ctx_session_id`.Remove --provider pi when the same topic may have appeared in Claude Code, Codex, Cursor, or another supported agent.
Write a transcript when you need the full thread
Search results and default session views are usually enough for agent handoff. Write a transcript file when the full session needs to be attached to an issue or review:
ctx show session <ctx-session-id> --mode full --format markdown --out transcript.mdCheck transcript files before sharing them outside your machine.