AI Coding Agent Handoffs: Why HANDOFF.md Needs Verifiable Evidence
Learn how to preserve context across AI coding agent sessions with reliable handoffs. Explore the limitations of traditional HANDOFF.md files, why task summaries aren't enough, and how Git state, test results, file changes, and verifiable evidence help agents resume development work with greater confidence.
On this page
- The Problem With Traditional HANDOFF.md Files
- A Handoff Should Distinguish Facts From Claims
- What an Evidence-Based Handoff Looks Like
- 1. Current Repository State
- 2. Task Completion With Evidence
- 3. Test Results and Code Drift
- 4. Files Changed During the Session
- 5. Next Steps and Unresolved Work
- A Real Example: When Two Handoffs Tell Different Stories
- Why This Matters When Switching AI Coding Agents
- HANDOFF.md Is Still Useful. It Just Needs a Reliable Foundation.
- Building Project Continuity With PCSKit
- Final Thoughts
AI Coding Agent Handoffs: Why HANDOFF.md Needs Verifiable Evidence
AI coding agents can write code, run tests, modify files, and work across entire repositories. But there's one problem that becomes increasingly frustrating when working with them: what happens when one agent stops and another has to continue the work?
Maybe the context window is exhausted. Maybe a session gets interrupted. Maybe you switch from Claude to Cursor, or simply start a new conversation.
In these situations, the next agent needs to understand what happened before it can continue.
A common solution is to create a HANDOFF.md file containing the completed work, pending tasks, modified files, known issues, and next steps.
It sounds simple. And it is useful.
But there's a fundamental problem:
How does the next agent know whether the information in that handoff is actually true?
The Problem With Traditional HANDOFF.md Files#
Imagine an AI coding agent working on a project.
Before its context runs out, it writes:
- Implemented the new export functionality.
- Updated the CLI interface.
- Added tests.
- All tests are passing.
- Next, improve the documentation.
The next agent reads this file and continues working.
But consider a few questions:
- Did the previous agent actually implement the functionality?
- Were the tests executed, or did the agent simply claim they passed?
- Were those tests run against the current version of the code?
- Did the repository change after the tests were executed?
- Are the completed tasks genuinely verified?
A traditional handoff can communicate what an agent reported, but that doesn't automatically make the information reliable.
This distinction matters because AI agents can make mistakes, misunderstand task completion, or leave behind incomplete work.
The problem isn't that HANDOFF.md is a bad format.
The problem is treating a written summary as proof of what happened.
A Handoff Should Distinguish Facts From Claims#
A more reliable handoff needs to distinguish between three kinds of information:
1. Verified
Information directly observed or checked by the system.
For example:
- The current Git branch and commit.
- Files detected as modified.
- A test command executed by the system.
- The exit code and result of that test run.
2. Reported
Information provided by an AI agent or a person but not independently verified.
For example:
- An agent says it completed a task.
- An agent reports that a feature is working.
- An agent suggests what should happen next.
3. Inferred
Information concluded from other available facts.
These categories should not be mixed.
If an agent reports that a task is complete, the handoff should preserve that claim as a report. It shouldn't silently turn it into a verified fact.
This is the foundation of an evidence-based handoff.
What an Evidence-Based Handoff Looks Like#
Let's look at a practical example.
Suppose an AI agent is working on a CLI exporter and its session ends after implementing a JSON export flag.
A useful handoff should communicate more than a simple completion summary.
It should show:
1. Current Repository State#
The next agent needs to know where the project stands.
Useful information includes:
- Current Git branch.
- Current commit.
- Files changed during the session.
- Uncommitted changes.
- Differences between repository snapshots.
Without this information, the next agent might assume that the code is unchanged when it isn't.
2. Task Completion With Evidence#
A task marked as complete should not automatically be treated as verified.
For example:
| Task | Status | Evidence |
|---|---|---|
| Add JSON export flag | Done | Passing test linked to task |
| Update help text | Done | Agent report only |
| Connect flag to CLI entry | In progress | No completion evidence |
This is a much more useful representation than a list of completed tasks.
It tells the next agent what was reported, what has supporting evidence, and what still needs attention.
3. Test Results and Code Drift#
A passing test result is useful, but its relationship with the current code matters.
Imagine this sequence:
- An agent runs the test suite.
- The tests pass.
- The agent modifies several files.
- The session ends.
Can the next agent assume that the current code is still covered by that passing test?
No.
The code has changed since the test was executed.
A reliable handoff should distinguish between a passing test run that matches the current repository state and one that belongs to an older code state.
This prevents stale test results from being presented as current verification.
4. Files Changed During the Session#
The next agent should know which files were modified, added, or removed.
This helps it understand the scope of previous work without having to reconstruct everything from scratch.
Git snapshots and comparisons can provide useful evidence about those changes.
5. Next Steps and Unresolved Work#
A handoff should preserve unfinished work, blockers, and important notes.
But it should also preserve their source.
If the previous agent suggested a next step, that should remain an agent-reported suggestion, not become an independently verified requirement.
The next agent can then review it before acting.
A Real Example: When Two Handoffs Tell Different Stories#
Consider two actual handoff examples generated by PCSKit.
In the first example, a task called Add the --json flag to the exporter was marked as done.
PCSKit linked it to a passing test run that it had executed. The test run matched the repository state at the time of the handoff.
However, another task, Update the help text, was also marked as done by the agent but had no passing test run linked to it.
PCSKit kept these tasks separate:
- One had a linked passing test.
- The other was reported as complete but remained unverified.
A third task was still marked as in progress.
The handoff also showed an uncommitted change in src/export.js and recorded both a previous failed test run and a newer passing run.
That is important information for the next agent.
Now consider the second example, generated during an earlier stage of development.
It showed a task marked as done by the agent, but no verified completed tasks.
A typecheck had passed, but the working tree had changed since that test started. A newer test run had failed.
The original task was not recorded, and no exact next steps were available.
Instead of hiding these gaps, the handoff exposed them.
These examples demonstrate an important principle:
A good handoff doesn't need to make the previous session look successful. It needs to represent the available evidence honestly.
Why This Matters When Switching AI Coding Agents#
AI coding workflows are no longer limited to one assistant or one conversation.
A developer might use Claude for implementation, Cursor for reviewing changes, and another agent for debugging or testing.
Each agent may have a different context window, memory system, tools, and understanding of the project.
A handoff provides a shared record that helps the next agent understand the previous work.
But for that record to be useful across agents, it needs more than natural-language summaries.
It needs a consistent representation of:
- What the agent reported.
- What the system independently observed.
- Which tests were executed.
- Which code state those tests belong to.
- What changed after those tests.
- What remains incomplete.
This makes project continuity less dependent on the memory or honesty of an individual AI session.
HANDOFF.md Is Still Useful. It Just Needs a Reliable Foundation.#
None of this means we should stop using HANDOFF.md.
In fact, Markdown is a practical format for sharing project context with both developers and AI agents.
The important distinction is between the handoff document and the system that produces and verifies its contents.
HANDOFF.md is the delivery format.
Evidence-based handoff is the approach that makes its information more trustworthy.
The document communicates the project's state. The underlying evidence helps the next agent understand which parts can be trusted, which parts are only reported, and which parts still need verification.
Building Project Continuity With PCSKit#
This is the problem I wanted to address while building PCSKit.
PCSKit is an open-source project continuity tool designed for AI-assisted development workflows.
Instead of relying entirely on an agent-generated summary, it brings together project information such as:
- Git state and repository snapshots.
- Session history.
- Task records and notes.
- Test runs executed by PCSKit.
- File changes and repository differences.
- Handoff information with provenance labels.
Its handoff separates verified observations, agent-reported information, and inferred conclusions.
When a developer resumes work, PCSKit can verify the handoff against the current repository state and identify changes that happened after the recorded state.
The goal isn't to make AI agents remember everything.
It's to give them a reliable record of what happened so they can continue working with less guesswork.
You can explore PCSKit here:
GitHub: https://github.com/KNIHAL/pcskit
Final Thoughts#
AI coding agents are becoming increasingly capable, but long-running development work still needs continuity.
A conversation summary can tell the next agent what the previous agent said.
A well-structured handoff can tell it what work remains.
But an evidence-based handoff can go one step further: it can show what was observed, what was reported, and whether the available evidence still matches the current code.
That's a much stronger foundation for continuing software development across interrupted sessions and different AI coding agents.
Don't just hand over context. Hand over evidence.
Get new posts by email
High-signal notes on AI, automation and building systems. No spam.