Agent Handoff

Context handoffs,
done right.

Open source. MIT licensed. When a coding agent is near its context limit, agent-handoff captures objective, repo state, changed files, and next steps — so any agent can resume safely.

$ npm i @atakanturgut/agent-handoff
Open Source · MIT

Free to use, fork, and build on

agent-handoff is fully open source under the MIT license. No cloud service. No paid API calls. No hidden behavior. Just a local CLI that works with the tools you already use.

Works with
  • Claude Code
  • Codex
  • Gemini CLI
  • Any agent
Protocol
  • handoff.md
  • .handoff-needed
  • .agent-handoff/state.json
Guarantees
  • No cloud dependency
  • No paid LLM calls
  • No transcript scraping
Usage

Get running in minutes

Install once. Works globally across all your projects.

01

Install

npm i @atakanturgut/agent-handoff
02

Set up Claude Code integration

agent-handoff install claude-code --threshold 90 --mode warn --yes

Installs a status-line hook that monitors context usage. At 90% context, it signals your agent to write a handoff.

03

Initialize a project

agent-handoff init-project --yes

Creates or updates CLAUDE.md with the handoff protocol block.

04

Continue in another agent

agent-handoff print-prompt codex

Prints a continuation prompt for Codex, Gemini, or any agent. Paste it in. The new agent reads handoff.md and resumes safely.

Full documentation