DEV Community

Cover image for Handoff notes between AIs: keep guesses from turning into facts when Claude plans and Codex builds
Kento IKEDA for AWS Community Builders

Posted on Originally published at zenn.dev

Handoff notes between AIs: keep guesses from turning into facts when Claude plans and Codex builds

When you use more than one AI tool, there are times when you want to take a plan you worked out with Claude and hand it to another tool to implement. Claude and I do the planning, and Codex does the building. But the AI on the receiving end sometimes misreads the premise, redoes research that was already done, or treats an unverified hypothesis as a fact.

For these handoffs, I do not paste in the conversation. Instead, I have the AI that made the plan write a handoff document, and I pass that along. In this article I use a real document I handed to Codex to show what I have the AI write, when I bother with a document at all, and what I change depending on which tool receives it.

The flow of a conversation does not carry over

Within one AI tool, the AI itself knows the order things were researched in, which hypotheses were dropped along the way, and how much was confirmed. Another tool cannot see any of that. The receiving AI can only read what I, as the go-between, give it.

It might seem enough to paste the conversation, or to let the other AI read the chat log through MCP or a connector. But a chat log mixes confirmed facts with guesses made on the spot. Even if the receiving AI can read more, the chat text does not always make clear which parts were confirmed. So the receiving AI may take a guess as a fact and build on it. And whatever premise is not written down, it has to fill in by guessing.

When people hand work to each other, the person taking over can ask about anything unclear. An AI may ask back too, but it may also pick the most plausible interpretation and carry on. When rework happens, it is worth looking at how the information was passed before doubting the receiving AI's ability.

How a handoff note is structured

I have the AI that made the plan write the handoff note roughly in this structure.

Heading Contents
Status How far things have progressed, and what the receiving AI is being asked to do
Background What was being done, and what was noticed
Prerequisites and environment Versions, steps, and anything else the receiving AI needs to reproduce the same state
Confirmed findings What was verified in the code or logs, with quotes
Concerns What has not been verified yet, and risks worth watching
Proposal The direction to take. Say what has not been started yet, and that the receiving AI decides which option to pick
References Where the primary sources live (repositories, log paths, and so on)

When I hand over a bug fix, I adjust the structure to the work, for example by splitting the confirmed findings into "Steps to reproduce" and "Root cause," as in the example below.

The order follows what the receiving AI wants to know first. Status goes at the top so that the reader knows what to do right away. If the note starts with the background, the receiving AI reads a long explanation without knowing its own role.

Confirmed findings, concerns, and the proposal each get their own heading, which separates facts from guesses at the heading level. With separate headings, the receiving AI can read the confirmed findings as facts, and the concerns and proposal as material to weigh.

A real example: handing an open source bug to Codex

While I was building a hands-on workshop for AWS Blocks (an open source project now being renamed CDK Blocks), I ran into a problem: when I started the development server, it stopped partway with no error at all. The cause turned out to be the handler that receives an error when the port the development server wants is already taken by another process. It only sent telemetry. It printed nothing on screen and did not exit.

I wrote about the move from AWS Blocks to CDK Blocks in another article (in Japanese).

https://zenn.dev/genda_jp/articles/3d4beb31a2c53e

I had Claude write up what we found and the direction for a fix as a document for handing the fix to Codex. The document was written in Japanese. Its headings, translated, were:

# aws-blocks: hangs silently when the customer-facing port hits EADDRINUSE

## Status
## How it was found
## Environment
## Steps to reproduce
## Root cause (confirmed in the code)
## Impact
## Proposed direction for a fix (not implemented, needs discussion)
## References
Enter fullscreen mode Exit fullscreen mode

The status section said this (also translated):

Not reported (no duplicates within the Issue search as of 2026-07-04). Handing off to Codex.
Codex reportedly already has merged PRs in `aws-devtools-labs/aws-blocks`,
so whether to file an Issue or open a PR directly is left to Codex.
Enter fullscreen mode Exit fullscreen mode

The first line gives the current state and how far it was checked. The second and third lines say who takes over and what they are asked to decide.

The "Root cause" heading is marked "confirmed in the code," and the relevant code is quoted. The error handler looked like this:

server.on('error', (err: NodeJS.ErrnoException) => {
  const errorCode = err.code === 'EADDRINUSE' ? 'PORT_IN_USE' : 'UNKNOWN';
  buildAndSendEvent({ command: 'dev', state: 'FAIL', duration: Date.now() - devStartTime, error: { code: errorCode, phase: 'startup' } });
});
Enter fullscreen mode Exit fullscreen mode

When the port is in use (EADDRINUSE), it only sends a telemetry event. Nothing shows the error and nothing exits. Quoting the code lets the receiving AI open the code and check it, instead of taking the explanation of the cause on faith.

On the other hand, the "Proposed direction for a fix" heading is marked "not implemented, needs discussion." It lists two options side by side, showing the error and exiting, or restarting on a different port, and notes that the second is friendlier to users but changes behavior and so needs a design decision. It ends by asking Codex to decide which to take, in line with the direction of any existing Issues or Discussions.

When Codex received this document, it first searched the Issues and pull requests again. It found an Issue about the same port conflict, and a pull request from a maintainer to fix it. The pull request title mentioned handling EADDRINUSE on port 3000, so the fix proposed in the handoff note was very likely already part of it.

So instead of opening a new pull request, I decided to add a reproduction report as a comment on that one. When I asked Codex whether to stay quiet or comment, it recommended commenting, because the pull request was already approved and a comment could serve as an extra reproduction rather than a new request. Before commenting, Codex confirmed in a minimal setup in a temporary directory that the same problem still happened with the latest code when port 3000 was occupied. The pull request was merged that same day.

Five things I watch for in a handoff note

When I have an AI write a handoff note, I watch for the following five things. I do not check the contents closely before handing it over. If something is missing, the receiving AI will ask, and I can fill it in then.

First, do not mix confirmed facts and guesses in the same paragraph. The receiving AI tends to treat whatever is written as fact, so I have guesses placed under separate headings or marked "not implemented" or "needs discussion" to keep them apart from facts.

Second, say what the receiving AI is trusted to decide. Without this, the receiving AI tends either to decide everything on its own or to come back to confirm every small detail. In the AWS Blocks example, the note said that the choice between an Issue and a pull request, and between the two fixes, was left to Codex, so Codex could act on the assumption that those two decisions were its own.

Third, write down what was checked and when. The status in the example says "no duplicates within the Issue search as of 2026-07-04." If it only said "no duplicates," the receiving AI would treat that as settled. With the scope and the date, the receiving AI can notice that pull requests were not searched, or that someone may have reported it since, and check for itself. In the example, Codex did not take "no duplicates" at face value. It searched Issues and pull requests again and found the fix already in progress. This matters most in places like open source, where other people are working at the same time.

Fourth, say where the primary sources are. A sentence explaining the cause does not let the receiving AI check whether it is right. Adding quoted code or the path to the logs lets it verify before starting work. In the example, the references section listed the hands-on repository where the problem was first found and the path to the notes from that session.

Fifth, describe the environment the original AI investigated in. The receiving AI knows its own environment, but unless it is written down, it cannot know which OS and which package versions the original AI used. In the example, the "Environment" heading listed the OS, Node.js, npm, and the versions of the related packages, along with which package and version contained the problematic code. Knowing the environment lets the receiving AI check whether it can reproduce under the same conditions, and notice when differences in its own environment might change the result.

When to write a document

I do not turn every handoff into a document. Writing one for work that continues in the same tool's conversation, or for a small request that fits in a few lines, would only add effort.

I write one when any of the following is true:

  • The receiving tool is a different one, so the flow of the conversation does not carry over
  • The work spans days, and I may need to reread it later
  • The output is hard to take back, for example when it goes into someone else's repository

The third criterion comes from where the output lands and how easy it is to redo. The more visible and irreversible the output, the more a misunderstood premise costs, and the more a document is worth it.

What changes with the receiving tool

The structure stays the same, but which headings to make thicker depends on the character of the receiving AI. I split work between Claude, Codex, and Kiro, and I vary the notes based on how I hand work to each.

For work I hand to Codex as a whole, such as a pull request to an open source project, I have the status spell out a wider scope of what Codex may decide. Since Codex will proceed without checking in along the way, if the first document lacks material to decide with or a clear scope, it may head off in the wrong direction. The example status, which left even the choice between an Issue and a pull request to Codex, follows this pattern.

For work that I do together with Claude, checking in as we go, such as everyday tasks, it fits better to have the note say where to stop and confirm, rather than to make the proposal thicker.

With Kiro, which I use for spec-driven development, the mechanism of creating requirements, design, and tasks files in order is itself a document-based handoff. For a handoff note going to Kiro, centering it on what corresponds to the first stage, the requirements, meaning "what we want to build" and "what must not be done," fits the way Kiro works.

Handoff notes that stay in the repository

Once a handoff note is passed along, it may look like its job is done. But if you keep it in the repository, you can look back later at what was confirmed and what was handed off. And when you want to switch the receiving tool, you can pass the same document as is.

This structure would probably work between people as well. The sections for background, environment, and steps to reproduce are almost the same as those in bug report templates and incident handoffs, and there is nothing special about them for AI. The difference is that a person can ask back to fill in gaps, while AIs passing work to each other do not. A document written thoroughly enough to hand to an AI also makes an easy-to-read handoff for teammates, and for yourself when you read it again later.

When work passes from one AI to another, it is even clearer than with people that only what is written gets through. If you have the AI write down in one document what is known and what is being handed off, the receiving AI can act on it as a reliable premise.


This is Day 2 of "A Year with AI," a 25-day advent calendar I am writing on my own. See Day 0 for what the series covers. The original Japanese version is on Zenn.

Top comments (0)