Handoffpilot

Save a coding agent's full working state to a handoff file before it hits the context limit, then resume in a fresh session without re-explaining everything.

Install
cmdop skills install agensi-handoffpilot

HandoffPilot is a skill for Claude Code and Codex that addresses a specific pain point in agent-assisted development: losing progress when a session fills its context window, hits a limit, or needs to restart. Rather than asking the model to ad-hoc summarize what happened, HandoffPilot writes a structured handoff file into a .claude/handoffs/ directory. That file captures the active plan, git branch, uncommitted changes, recent commits, decisions made, failed attempts, blockers, open questions, and a next-steps checklist.

When a new session resumes, the agent reads only the latest handoff file rather than the full conversation history, keeping token usage low. It summarizes the captured state, checks for branch or worktree drift, and prompts to continue where work left off. The output is Markdown, which is readable by humans and parseable by agents after a restart.

The skill is appropriate when ending a session, approaching the context limit, switching between Claude Code and Codex, or handing work off to a fresh agent. It bundles reusable templates for decisions, blockers, and checklists, a helper script for git-state capture, a sample handoff file, and installation instructions. It is designed to be understood quickly and used repeatedly across long-running refactors or multi-session development workflows.

Use cases

  • Save full agent working state before hitting a context window limit
  • Resume a coding session in a fresh agent without re-explaining project history
  • Switch context between Claude Code and Codex mid-task
  • Capture failed attempts and blockers so the next agent avoids repeating mistakes
  • Hand off an in-progress refactor to another developer or agent
  • Review a human-readable Markdown record of decisions made during an agent session

When to use it

  • Agent sessions that regularly hit context window limits on long-running tasks
  • Projects where multiple agents or tools (Claude Code and Codex) share a codebase
  • Workflows involving multi-day or multi-session refactors
  • Teams where humans need to review what an agent decided or skipped

When not to use it

  • Projects that do not use Claude Code or Codex as the agent runtime
  • Short, single-session tasks where context limits are not a concern
  • Environments where writing files to a `.claude/handoffs/` directory is not permitted
  • Use cases requiring real-time or live state sync rather than file-based snapshots