{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "frankie-xu-threadport--hand-off-capsule-to-codex-from-cli",
 "repo": "Frankie-Xu/threadport",
 "repo_url": "https://github.com/Frankie-Xu/threadport",
 "repo_slug": "frankie-xu-threadport",
 "title": "Hand off a Claude session to Codex through the CLI",
 "page_title": "How to hand off a Claude session to Codex through the CLI with Threadport",
 "summary": "Extract a Capsule from a Claude session file and write a Codex handoff file with the handoff command.",
 "who": "A developer or automation script that needs a validated, file-based handoff from a Claude session to Codex without opening the workbench.",
 "problem": "Moving a task between agents usually means copying chat text by hand, which loses the observed state and invites mistakes.",
 "outcome": "You get a Capsule JSON file, a validated Codex handoff JSON file, and a clear confirmation that both files passed validation.",
 "steps": [
  "Run `npm ci` in the Threadport checkout.",
  "Run `npm run build`.",
  "Run `node dist/src/cli.js extract --from claude --session ./session.jsonl --project .` and note the output path it prints.",
  "Run `node dist/src/cli.js validate /path/printed/by/extract.json`.",
  "Run `node dist/src/cli.js handoff --to codex /path/to/capsule.json --format json --out ./handoff.json`, then run `node dist/src/cli.js validate --handoff ./handoff.json`."
 ],
 "agent_prompt": "Using the Frankie-Xu/threadport repo after `npm ci` and `npm run build`, extract a Capsule from <session-file> with --from claude and --project <project-directory>, then create a Codex handoff at <handoff-path>. Report both printed output paths and confirm that `node dist/src/cli.js validate --handoff <handoff-path>` succeeds.",
 "agents": [
  "claude-code",
  "codex"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "The CLI validates before writing and does not run next_action, but the README warns that secret scanning is heuristic and does not guarantee removal of all credentials.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "typescript",
 "requirements": [
  "Node.js 24 or newer (the README requires Node >=24.0.0 for this checkout)",
  "A local clone of Frankie-Xu/threadport with npm available",
  "Local Claude or Codex session logs, or a Cursor Copy Transcript export saved as UTF-8 text",
  "The target Agent (Claude or Codex) installed locally if you want to launch a continuation"
 ],
 "risk": "sensitive",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "The extracted Capsule may contain code excerpts and paths from the session; the README says to inspect artifacts before sharing them."
  }
 ],
 "best": false,
 "score": 0.9,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/frankie-xu-threadport/hand-off-capsule-to-codex-from-cli/",
 "md": "https://dedupedai.com/use-cases/frankie-xu-threadport/hand-off-capsule-to-codex-from-cli/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/frankie-xu-threadport--hand-off-capsule-to-codex-from-cli.json",
 "api_version": "v1"
}
