Sparkie

Hand off from Claude Code to Codex when you hit a usage limit

Handing off from Claude Code to Codex means writing down the goal, the current state of the repo, and what is left, then starting Codex in the same directory with that summary as its first prompt.

Why a handoff beats starting over

When a usage window runs out in the middle of a task, the useful part of the session is not the transcript. It is a short list of what you asked for, what changed, what was tried and failed, and what still needs checking. A second agent that gets only the repo has to rediscover all of that.

The manual method

  • Capture the repo state: git status and git diff --stat show what the first agent changed. Commit or stash work in progress on a branch so the second agent sees a clean, named starting point.
  • Write a handoff note, for example HANDOFF.md in the repo root, covering the goal, the files involved, decisions already made, approaches that failed and why, and what remains to verify (tests to run, behaviour to check).
  • If Claude Code still has some quota, ask it to write that note itself. If it does not, write it from git diff and the last part of the conversation.
  • Remove secrets from the note before it goes anywhere: API keys, tokens, and credentials in URLs.
  • Start Codex in the same directory and give it the note as its first prompt, for example codex "Read HANDOFF.md and continue the task. Run the tests before you report done.".

Two small habits help. Keep durable project rules in the files each agent reads on its own (CLAUDE.md for Claude Code, AGENTS.md for Codex), so the second agent follows the same conventions. And ask the new agent to restate the task and remaining steps before it edits anything, which catches a misread note early.

Common ways a handoff goes wrong

  • Uncommitted changes the note never mentions, so the second agent overwrites or duplicates them.
  • A note that records the plan but not the failed attempts, so the new agent repeats them.
  • Secrets pasted into the note and then into another provider's prompt.
  • Claims of finished work with no evidence. Ask for the test command and its result rather than a summary.

How Sparkie automates this

Sparkie is a macOS app that runs Claude Code and Codex in real terminals and keeps their transcripts. When it detects that a Claude or Codex usage limit has run out, the tab switches to a limited state and offers a one-click handoff: it generates a summary of the changes and the unfinished items, masks credentials first, and continues in the other agent with a safe launch command.

Since v0.40 the handoff brief is structured: goal, files, decisions, failed approaches, remaining verification, and pointers to evidence, with sensitive data stripped. When a brief is imported it is checked against the target repo and is not attached automatically if they do not match.

Since v0.41 you can also right-click any past session and choose to continue with its brief. The brief is pasted into the current terminal and left at the prompt for you to review; nothing is sent automatically. It is only pasted when the foreground program is a running agent that supports bracketed paste, and a plain shell is refused so the summary cannot run as commands.

Known limits: Sparkie offers the usage-limit handoff only when the limit has actually run out, and a codex command typed by hand in a shell is not tracked. Sparkie is free during the macOS beta and needs no account; it uses your own Claude Code and Codex subscriptions.