agent-handoff-kit keeps multi-agent collaboration small enough for every new agent chat to load quickly.
Root instruction files should stay small. Use AGENTS.md, CLAUDE.md, Cursor rules, or similar files for every-session behavior: startup order, branch safety, handoff rules, verification expectations, and links to deeper docs. Keep architecture, product facts, release history, security details, and long templates in task-relevant docs.
- Stable branch: the branch humans merge into, usually
main. - Agent branch: one branch owned by one agent session.
- Active log:
SESSIONS.md, newest entries first. - Archive:
SESSIONS_ARCHIVE.md, older entries preserved verbatim. - Chat handoff: continue work in a fresh chat without pushing.
- Full handoff: prepare a branch for human review and merge.
Every agent starts by reading:
- Project startup instructions, such as
AGENTS.md - Top entry in
SESSIONS.md - Current branch status and recent commits, if continuing work
- Task-relevant docs or source files
Then create a branch:
git checkout main
git pull --ff-only
git checkout -b codex/YYYY-MM-DD-short-scopeUse the matching prefix for the agent: codex/, claude/, cursor/, or aider/.
Agents should:
- Stay on their branch.
- Commit logical checkpoints.
- Stage intentional files only.
- Avoid unrelated refactors.
- Preserve user and agent changes they did not make.
- Record open questions in chat until full handoff.
Before every commit:
git status --short --branchUse chat handoff when context is getting long or another chat should continue the same branch.
Do not:
- Update
SESSIONS.md - Update
SESSIONS_ARCHIVE.md - Push
- Print merge commands
Include:
- Branch and HEAD commit
- Clean or dirty worktree state
- Commits on the branch
- Changed files and why they matter
- Tests/checks run
- Open risks or blockers
- Exact next steps
- Any files intentionally left uncommitted
- A self-contained continuation prompt that can be pasted alone into a new chat
Use full handoff when work is ready for human review.
Steps:
- Run
git status --short --branch. - Commit remaining intentional changes.
- Add a new entry to the top of
SESSIONS.md. - Keep only the latest 4 full entries in
SESSIONS.md. - Move older entries to
SESSIONS_ARCHIVE.md. - Commit session-log changes separately.
- Push the branch.
- Print merge commands for the human reviewer.
## YYYY-MM-DD - <Agent> - <one-line scope>
**Branch:** <branch-name>
**Merged:** pending (human merges after review)
**Scope:** <what was done and why>
**Changes:**
- <file or area>: <what changed>
**Commits:** <short hash and subject>
**Tests:** <what was tested, or "none - gap">
**Open:** <anything unresolved or known broken>
**Next:** <which agent or human should do what next>