v0.3.0 — /copy now exports the full session transcript See what changed
v0.3.0

Pick up any AI coding session where it left off

pi-resume-harness resumes Claude Code, Cursor, Codex, and Grok sessions inside Pi. Pick a session, and the extension injects a structured handoff — goal, files touched, work completed, work open, exact stopping point.

This is a handoff, not a live restore. Foreign transcripts are treated as untrusted inert history: tool calls are marked inert, never replayed, and the model verifies your repository before changing anything.

Going somewhere else? /copy puts the entire transcript — every message you sent and every reply, in order — on your clipboard as one markdown document any agent can read.

No new tools to adopt. Run /resume-grok latest in the project you were working in, or hit /copy and paste the whole conversation into any other agent.

$ pi install npm:pi-resume-harness

or straight from git: pi install git:github.com/SachinD6/pi-resume-harness

Resumes sessions from:

Claude Code
Cursor
Codex
Grok
Pi

Resume

Each command scans its harness's on-disk store directly — the source CLI is never launched, nothing leaves your machine. Sessions are filtered to the current working directory, newest first. Open a fuzzy-filter picker by passing nothing, or skip it:

The picker merges every supported store. Titles come from the visible prompt, not raw XML wrappers.

Copy

/copy takes the same arguments as every resume command, but instead of resuming it writes a complete transcript export to your clipboard — built for whichever agent receives it:

Text travels through stdin only — never argv — so transcript contents never appear in a process list.

macOS          pbcopy
Windows        clip
Linux          wl-copy → xclip → xsel
WSL            clip.exe fallback

Safety

Every handoff — and every /copy export — repeats the same boundary so the model cannot be talked into skipping it by old transcript contents:

"Produce a short handoff that states: the user's goal and the last recoverable user request; files, modules, commands, tests, and artifacts that appear relevant; work completed and evidence that was recorded; work still open; the exact stopping point and safest next action; reader warnings and uncertainty."

– from the handoff contract injected into every resume


Commands

CommandReadsOverride
/resume-claude~/.claude/projects/<slug>/*.jsonlCLAUDE_CONFIG_DIR
/resume-cursor~/.cursor/projects · ~/.cursor/chatsCURSOR_HOME
/resume-codex~/.codex/sessions/**/rollout-*.jsonlCODEX_HOME
/resume-grok~/.grok/sessions/<encoded-cwd>/<id>GROK_HOME
/resume-foreignall of the above, merged
/copyany store → full transcript on the clipboardsame overrides

Project-scoped matching. $HOME never counts as a match for every project underneath it, subdirectories and ancestor repo roots resolve correctly, and sessions recorded on Windows match even when you resume on macOS or Linux.


Install

Runs inside Pi on Node 20+. No runtime dependencies beyond Pi itself. Restart Pi after installing so the extension loads. Then, in any project with history worth keeping:

$ pi
 /resume-grok latest
 /copy latest