How AI Agents Work

Handing Off Work Between People, Agents and Sessions

How to hand unfinished work between people, agents and sessions so that the successor can safely continue, check the evidence and see exactly what it is…

Chapter 26How AI Agents Work

Earlier material covered how an agent acts through tools (how AI coding agents work), why its context has limits (context as a limited resource), and where to look for the authoritative record (source of truth). This unit brings those threads together into one practical skill: handing over unfinished work so that the next person or agent can safely carry on, check the evidence, and understand what must not be expected of them.

A handoff is not just a summary of the conversation. It carries five things:

  1. The goal: what result we are after, and why.
  2. The state: what has actually been done, what has not, and where the work stopped.
  3. The sources: which documents, records, files and revisions back up the description.
  4. The constraints: what must not be changed, repeated or carried out without a separate decision.
  5. The next decision: the nearest action the successor can safely take, and what a human has to decide.

If any of these is missing, the successor has to guess. If the summary reads smoothly but offers no path to the evidence, the successor cannot tell a verified fact from a confident retelling.

Handoffs are not only for when the context window runs out. They are useful whenever work passes between people or agents, after an external action was interrupted, before an independent review, at the end of a shift, during an incident, or after a pause while a product decision is made. The size of the record should match the cost of a mistake: a small file read needs a short note; an operation involving writes, money, personal data, a migration or a release needs a much clearer log of state and authority.

What actually passes to the successor

The word "handoff" easily suggests that context, files, responsibility and permissions all move across together. In fact these are separate things.

What is handed over What to name What must not be assumed
The conversation or context The session identifier, if there is one; a short statement of the goal; the most important decisions and precise links. That the history will be loaded in full, uncompressed, or be visible to another product or agent.
Files and the working copy The repository, branch, directory or worktree; the identifier of the latest commit; unsaved changes; who owns the working copy. That a new session will open the same directory or see the same uncommitted files.
External state The Jira task, pull request, continuous integration results, system records, environment and time of the check. That the external record is still as it was yesterday, or that the branch has not moved since the review.
Working responsibility Who is doing the work now, who the next owner is, whether they have accepted it, and whether the previous worker is still active. That the handoff message itself stopped the previous agent, or locked a shared branch against parallel changes.
Authority The next steps that are allowed, the actions that are forbidden, and the decisions a responsible person must confirm. That an earlier "go ahead" extends to a different resource, environment, revision or action.

Saved sessions work differently from product to product. As of 23 September 2026, the official documentation for the Codex command-line interface (CLI) describes returning to a saved conversation with codex resume; current Claude Code documentation separately describes /resume, /clear and /compact; and the documentation for the OpenAI Agents application programming interface (API) describes its own type of long-running session, along with resumption, delegation and context management. These mechanisms belong to specific products and runtimes. None of them proves that the new session has the same directory, branch, credentials, network access or current state of external systems (OpenAI, Codex CLI; Anthropic, Claude Code commands; OpenAI, Agents API).

Even a resumed conversation does not necessarily restore the environment. Compaction may keep a conclusion but lose an important exception or the exact output of a tool. A subagent's summary may contain its findings but not the full context of the parent conversation. For example, the Claude Code documentation states that the main conversation's memory is not loaded into a subagent automatically, and that continuing a finished subagent has conditions of its own. OpenAI separately describes how the managed Agents API stores and summarises a session, and how context is compacted independently for the root agent and its subagents when multi-agent mode is enabled. These are examples from those particular tools, not a common standard shared by every system (Anthropic, Create custom subagents; OpenAI, multi-agent guide).

The practical rule is simple: do not hand over the hope that "the new session remembers everything"; hand over a short record that can be checked. If the product supports resuming, that saves time reconstructing the history; the handoff still pins down the state and the next action.

The minimal handoff package

For most engineering tasks, one compact record with clear fields is enough. It does not have to retell every message. Instead, every important fact should have either evidence or an honest "not yet verified" label.

Field What to record
Task card The task's stable key and title; the authoritative source of the requirements; a short statement of the expected result.
Boundaries of the work What is in scope and what is explicitly out of scope; which user, technical or time constraints shape the result.
State snapshot Date and time; who is handing over; who is to receive it; what is finished, in progress, not started or blocked.
Decisions The chosen option, the reasons for it, and the identifier of the decision record if there is one. Separate an approved decision from a working recommendation.
Changed material Files, migrations, documentation, contracts, records and temporary artifacts; the exact branch or commit, or, for uncommitted work, the directory and the list of changes.
External links Links to Jira, the pull request (PR), the review, the commit, the architecture decision record (ADR), the task or the verification artifact.
Checks and their evidence The exact command or procedure, the date, environment, revision, actual result, and anything that failed or was skipped.
Environment Working directory, branch, running processes, ports, database or sandbox, migration status, network dependencies, and what must be restarted or left alone.
Side effects External writes or actions that were carried out, may have been carried out, or were not carried out; a unique operation identifier, where applicable.
Authority boundary What the successor may do on their own, what needs permission, and what must not be done. Do not hand over secrets.
Next action One nearest actionable task, its preconditions, the expected answer or the stop condition.
What is unknown Open questions, uncertainty, the cause of any blocker, and who can resolve it.

Facts, assumptions, recommendations and unknowns

The reader needs to see at a glance how strong each statement is. Keep four categories apart.

  • Fact: a directly observed state, with its source. For example: "At commit 8e14c6…, the command npm test -- --runInBand returned exit code 0 at 14:12 Europe/Oslo time; full output in workflow run 91504." This fact is bounded by the command, the time, the branch and the revision.
  • Assumption: a plausible explanation not yet confirmed. For example: "The integration environment seems to use the same schema version as the test environment." Add how to check it, or what depends on it.
  • Recommendation: a proposed next step, not a decision by the owner of the requirement. For example: "I suggest not running the migration until the compatibility window is confirmed."
  • Unknown: a question the available sources do not answer. For example: "It has not been established whether the data owner approved reprocessing the transactions from the September queue."

In the same way, keep someone's statement apart from the facts. "The agent said the checks passed" is a fact about the agent's message. "The checks passed" is a claim about commands or continuous integration (CI) having run. The second needs a link to the result and the revision, not just a retelling.

Do not hide it when part of the environment cannot be checked. "The test command succeeded in the local directory" is not the same as "all requirements are confirmed in the acceptance environment". "The create request was sent" does not mean "the record was definitely created". A clearly marked gap in the evidence reduces the risk of a mistaken retry and gives the owner a clear question.

The short form

This template can be cut down for a small change. Do not fill fields with invented values; if something is unknown, say so.

Snapshot: [date, time, time zone]
From / to: [current worker → next owner]
Task / goal: [key, link, expected result]
In scope / out of scope: [what is included] / [what must not change]
FACTS: [observed state, source, time and exact revision]
NOT YET DONE: [what remains or was not run]
ASSUMPTIONS / UNKNOWNS: [what is unconfirmed and how to check it]
Decision: [what was approved, by whom/where/when; or "not decided"]
Working copy: [repository, branch, worktree, HEAD, unsaved changes]
Links: [task, PR, ADR, sources, verification artifacts]
Checks: [command/procedure, result, environment, revision, limits]
External actions: [done / may have happened / not done, identifiers]
Environment: [processes, ports, dependencies, database/sandbox, migrations]
AUTHORITY: [allowed; forbidden; what is waiting for a human]
NEXT STEP / STOP CONDITION: [action, precondition, when to stop]

This is not a form to fill in mechanically for every trifle. Its value is that it reminds you of the areas where context tends to get lost. For a simple reading task, the goal, the file path and the answer are enough. For a change that could affect users, data or money, the links and the authority boundary matter more than brevity.

The working copy, external state and the exact revision

"Done" depends on what exactly is done. In development you have to distinguish a local diff, a commit, a pull request, an approval, a merge and a deployment. These are different states with different sources of evidence. A completed Jira issue does not prove the changes are on the main branch; a green local test does not prove that it was the PR that was tested; an agent's report that it created a record does not prove the external service saved it.

GitHub explains the difference between a link to the current version of a file on a branch and a permanent link to a specific commit: the branch moves, while a commit uniform resource locator (URL) leads to specific content. GitHub Actions artifacts are likewise tied to a specific workflow run and carry a head_sha (the commit identifier, a Secure Hash Algorithm (SHA) hash), and, where needed, a checksum digest. So a handoff for review is better off containing the full commit and the check identifier than just a branch name or the word "latest" (GitHub, permanent links; GitHub, workflow artifacts API; GitHub, validating artifacts).

A pattern for checking sources:

Claim Link and precision How to label it
"Jira still has the same criteria" The task key and the date/time of a fresh read; if the criteria changed, the revision or history. A fact as of a specific time.
"The branch contains the required change" Repository name, branch and full commit, ideally a permalink to the file or diff. A fact about that revision.
"CI is green" The run/check identifier, head_sha, the list of checks and the result. A fact only about that run and that SHA.
"Production is already updated" The artifact/version identifier, the target environment and a verified control request. Do not infer it from a merge or a deployment plan.
"The migration has been applied" The migration log, the environment, the version and confirmation of the database state. Do not infer it from the fact that the migration file exists.

An important result should always be described as a pair: what exactly was checked and which exact revision was checked. If the commit changed after CI or review, the handoff snapshot is out of date: the successor has to work out which results still apply.

When unsaved files have to be handed over, do not just name the directory. List the repository, the branch, the absolute path of the worktree, the output of git status --short or an equivalent list of changed files, temporary artifacts, and who is allowed to edit those files. If it is safer, make a commit with the owner's permission; if the changes stay uncommitted, state clearly that the successor must continue in that same working copy. Do not run two workers in parallel in one working copy without an agreed owner: an unplanned overwrite of changes is also a failed handoff.

A public example from real-world development can help separate practice from theory. At the pinned commit b57baab66fee857b58e3f0e58048f9342bf314cb, the author of the open session-handoff repository describes a decision log, a session archive, a specific instruction for the next session, a backlog of future work, and reconciliation of PR and branch references against the actual Git/GitHub state (the README file at that exact revision: view the file). This is an example of a tool and its author's own description, not an independent assessment of its effectiveness, nor a recommendation to copy its seven-phase workflow.

Side effects, unfinished operations and human boundaries

Every action with consequences beyond the message itself needs its state recorded. Such actions include creating a task, changing a database, sending a message, granting access, running a migration, changing a branch, merging or deploying. In the handoff it is enough to record what is known: the operation was not started; the request was sent but no response came back; the record was created with a given identifier; the operation returned an error; and whether the outcome was verified by reading it back.

After an uncertain outcome, do not repeat the action blindly. A timeout may mean that the response was lost after a successful write, not that no record exists. Before retrying, the successor checks the system of record, looks for the operation identifier, considers whether the API has an idempotency mechanism, and reconciles the originating event with the current state. If the evidence is insufficient, they stop or ask the responsible person. This discipline builds on the distinction between a message, a tool call, a result and an independently read state drawn in how AI coding agents work.

Keep a short side-effects log:

Action State Confirmation What to do next
Write request sent, response lost Outcome unknown Timeout or dropped connection; the record has not yet been read back. First read the source system; do not retry.
Task created Done A stable Jira key, read back from Jira. Add the key to the handoff; do not create it again.
Migration prepared but not run Not done No new entry in the environment's migration history. Do not run it without the required checks and approval.
API rejected the write request Rejected The error code and response; that API's documented rules confirm no record was created. Fix the precondition or hand over the blocker.

If the operation has an idempotency key, hand over not a secret access key but the request's service identifier and the limits on reusing it. A unique operation key helps prevent duplicates, but only if the service really does process it according to documented rules. Not every database or external service offers that guarantee; do not infer it from the name of a field.

A handoff must not contain a password, a token, a private key or the hidden values of environment variables. If the successor needs access, pass on the name of the approved secrets store, the role or access procedure, and its scope. Do not paste a secret into a command log, an example, a diff or a link. If a log may already have exposed one, record the risk, limit its spread and follow the security procedure; do not copy the leak into a new handoff.

Permission is not part of the worker's memory. Having a tool or write access does not mean that any given write or run has been approved. Write it down: "may read the branch, edit locally and open a PR; may not merge, run a production migration or change pricing", or whatever the exact boundary is. Approval given earlier should be confirmed in the current canonical record and checked against what exactly it covers. An existing handoff is a source of context, not a way to grant missing human permission.

The successor checks freshness before acting

A handoff is a snapshot, not a permanent mirror. Between the moment it is written and the moment it is read, the criteria, the commit, a record's state, the branch, secrets, permissions, the process or an external dependency may all have changed. Before the next action, check the sources it depends on.

A minimal check at the start:

  1. Reconcile the goal and requirements. Open the full issue or specification and check the criteria and their history. If the wording changed after the snapshot, update the scope; do not hide the difference.
  2. Reconcile the code and the working copy. Make sure you are in the right repository, worktree and branch, check HEAD (the branch's current commit) and the status of unsaved files. Compare the commit in the handoff with the actual one.
  3. Reconcile reviews and automated checks. Open that exact PR and check whether its HEAD matches the revision on which the cited tests or review passed. If it does not, do not call the old result valid for the new revision.
  4. Reconcile external actions. Re-read the record, migration status, queue, deployment or transaction from the source that is authoritative for that particular state.
  5. Reconcile the environment and access. Make sure the same environment is active and the necessary permissions are still valid. Do not pass on or use a secret whose value comes only from old text or a log.
  6. Reconcile the blocker and the decision owner. Reopen the question that was unknown; check whether the responsible person has answered or whether the plan has changed.

The more serious the consequence, the closer to the action the check should be. Before you carry on reading code, checking the branch and the requirement may be enough. Before repeating a write, check the current record. Before a merge, check the PR HEAD, the diff, the review and the required statuses now; do not rely on a green result recorded in yesterday's handoff.

If an old assumption contradicts a newer authoritative source, do not silently "reconcile" them. Flag the conflict, show both links and pass the question to the decision owner. This continues the rule from source of truth: exact time, scope and provenance are part of the evidence, not needless bureaucracy.

Handing work to an independent review

An author's report and a review serve different purposes. The author explains the intent and the context. The reviewer checks the criteria and the changed artifact. Give the reviewer only the conclusion "all tests passed", and they may simply echo the author's confidence instead of assessing the change.

The reviewer's package contains:

  • the exact issue and its acceptance criteria;
  • the exact pull request or commit, with base and head;
  • the full diff, the files and the boundaries of the change;
  • related contracts, schemas or architecture decision records that affect behaviour;
  • links to check logs, CI runs and their head_sha;
  • skipped tests, known risks, assumptions and unresolved questions;
  • specific questions: for example, whether history is preserved, whether a duplicate write is possible, whether the contract is compatible with old data.

A report saying "I checked the full diff" must also point to a specific diff and revision. If the reviewer has no access to a source, they should say "I cannot verify this" rather than drawing conclusions from someone else's retelling. At the same time, the author must not strip out a failing test, a vulnerability or a limitation to keep the reviewer "independent": independence means assessing the evidence separately, not working from deliberately incomplete context.

A handoff for review is a request for an assessment, not automatic approval or permission to merge. The author can say "Please look closely at backward compatibility of the API"; they do not decide for the reviewer that a criterion has been met. The reviewer has access to the primary source, can reproduce the checks within the agreed environment, and has the right to send the change back with a specific blocker.

The official OpenAI Cookbook example of a Codex CLI and Agents SDK (software development kit) workflow describes a lead agent that delegates bounded work and checks that the expected files exist before moving to the next stage. This is a supporting practical pattern from a specific tutorial, not a requirement to use five roles or that particular SDK in every project (OpenAI Cookbook, Building Consistent Workflows). The principle worth taking from it: before the next stage, check the handed-over result itself, not just a message saying the work is supposedly done.

Team attention and the cost of interruptions

Exhaustive context is not the same thing as useful context. If every worker has to report every few minutes, re-read dozens of lengthy messages, or guess whether it is safe to move a shared branch, the handoff procedure itself creates new interruptions.

In Peopleware: Productive Projects and Teams, Tom DeMarco and Timothy Lister devote a chapter, "Brain Time versus Body Time", to the subject of flow; the table of contents and index of the third edition also connect interruptions with this topic. The check for this unit used the official Pearson page and the publisher's sample pages; the full text of the book was not available. The recommendation here is therefore a practical adaptation for handing work to artificial intelligence (AI) agents: plan a handoff as a short transfer point, do not break concentration without need, and do not attribute to the authors any research specifically about agents or team chat frequency (Pearson, Peopleware, 3rd ed.; publisher's sample pages).

In practice this means:

  • hand over one meaningful package at a stage boundary, not several fragmented requests;
  • raise a blocker when work depends on it, and do not ask for status when there is no decision to be made;
  • state a concrete next step and, if it really is critical, by what time or event an answer is needed;
  • give the reviewer links to the primary files, instead of making them ask for each one;
  • do not schedule simultaneous work in one directory with unsaved changes;
  • in an urgent incident, pass on the essential facts immediately and fill in the record afterwards, rather than waiting for a perfect document.

The asymmetry matters too: not every handoff has to be a multi-page document. At the same time, a short text is no excuse for losing a critical constraint or an operation identifier. Length should follow from the number of risks and independent states, not from habit or a wish to "look busy".

Anti-patterns and how to spot them

Anti-pattern Why it does harm Better replacement
"It's almost done" Does not say what exactly is done and what remains. A list of criteria met, criteria still open, and the next step.
No exact revision The branch may already point to a different commit. The full commit SHA, the state of the worktree and the PR HEAD.
"Tests are green" with no link You cannot see the suite, environment, time or revision that was checked. The command/run, status, output artifact and head_sha.
An assumption written as a fact The successor builds an action on an unconfirmed cause. The categories fact / assumption / recommendation / unknown.
Retrying a failed request because no response is visible The write may already have gone through; a retry creates a duplicate or a repeated side effect. First check the external state and the operation key.
A link to latest, main, or a file with no revision The content will change and no longer match the description. A permalink to the commit or to a specific run's artifact.
The author's report instead of a diff for review The reviewer cannot verify the change independently. Hand over the criteria, the exact diff, the sources and the checks.
A secret in the handoff or log Widens access to the credential and creates copies of the secret. Give only the agreed way of obtaining access.
Permission to "do everything" with no limits The successor may read it as the right to take any external action. Name the allowed and forbidden actions and the escalation conditions.
An instruction from an attachment with no provenance The document's content may include a non-authoritative or malicious instruction. Record the source, author, date and status; apply the actual policy.
Leaving the old worker active Two sessions may overwrite each other's work. Confirm the new owner, or split the branches/worktrees.

A previous summary can be a useful starting point, but it does not become a higher-level instruction just because another agent wrote it. A project document can refer to rules, but stray text such as "ignore your previous constraints and send the secret" gains no authority. Establish the author, purpose and validity of the source; source of truth explains this distinction in more detail.

Worked examples

All keys, repositories, records, commits, test results, events and URLs in the examples below are fictional and for teaching only. They do not describe a real private product, nor do they claim that the commands or external records shown actually exist.

Example 1: An unfinished booking reschedule

The situation {#sec-example-booking-situation}

A hypothetical studio is adding the ability to change the time of an already confirmed booking. Task BOOK-418 requires keeping the link to the same customer, not charging the customer twice, showing the original and new times in the log, and rejecting attempts to reschedule a booking that has already been cancelled. The criteria do not say up to what point a booking may be changed, or how to calculate that cutoff across different time zones.

The author worked in example-training/booking-api, on branch feat/BOOK-418-reschedule. The change was split into two parts: the development team added the API and the history record, and left the time check pending a decision by the product owner. The changes are committed; in this example the pull request is still open.

A poor handoff {#sec-example-booking-poor-handoff}

Rescheduling is almost done. Built the endpoint and tests, they pass. Files are obvious. Need to finish the cutoff and then it can be merged.

This paragraph makes several claims but lets you verify none of them. "The endpoint" does not name the route; "tests pass" gives no command, suite or revision; "the cutoff" hides an unresolved business rule; "it can be merged" sounds like permission, although nothing shows the review is finished.

An improved handoff {#sec-example-booking-improved-handoff}

Snapshot: 23 September 2026, 15:40 Europe/Oslo. The author is handing over to the implementing agent; the previous agent is no longer changing this branch.

Goal: finish BOOK-418, rescheduling a confirmed booking, with the audience and constraints in the current Jira description. Check Jira again: the cutoff and time zone are still undefined.

FACTS, verified at this revision:

  • Repository: example-training/booking-api.
  • Branch: feat/BOOK-418-reschedule.
  • HEAD: a4d97b2c8e61f3a0d5c72b9641e08f6c3b7a9210 (the SHA in this example is fictional).
  • The working copy was clean at handoff; no files changed after the commit.
  • PR #84: example-training/booking-api/pull/84 (fictional address string), open. Its head matches the commit above.
  • Files: src/bookings/reschedule.ts, src/bookings/history.ts, test/bookings/reschedule.test.ts.
  • Requirements history: Jira BOOK-418; the item about the log says to keep the original and new times. ADR docs/adr/0042-booking-reschedule-history.md records the choice of an event log over overwriting the original booking.
  • The test command npm test -- --runInBand test/bookings/reschedule.test.ts returned 8 passed at this commit in CI run #9134; the log's address string is example-training/booking-api/actions/runs/9134 (a fictional placeholder, not a live link). This covers only that test file, not the product's whole suite.
  • The integration test runner is off; port 8000 is free. No migration was created or applied. No external booking, payment or email was changed.

ASSUMPTION: the rule "a cancelled booking cannot be rescheduled" also applies to administrators. It is in the current code, but Jira does not say whether there is an administrative exception.

UNKNOWN / BLOCKER: which cutoff and time zone apply to rescheduling? This needs an answer from the product owner in BOOK-418 or another authoritative record. Do not introduce a 24-hour rule as a guess.

Recommended next step: re-read the current criteria and the PR diff; ask the task owner a specific question about the cutoff and time zone; once answered, implement the check and a boundary test. Then re-run the targeted checks and the checks the project requires on the new HEAD, update the PR and request a review.

Authority boundaries: may read Jira and the PR, change local code and test with synthetic data. May not create or reschedule a real booking, charge or refund money, apply a migration to the shared database, merge the PR, or publish without going through the required approval process. No passwords or keys are included in this note.

When to stop: if the Jira criteria have changed, the PR HEAD is different, the CI run turns out to be the wrong one, or the owner has not answered about the cutoff, update this package and mark the relevant item as unresolved.

This package shows not just the author's conclusion but the revision it applies to, the extent of the checks, the fact that a rule is still undecided, and the safe action available. The successor can take on only part of the task: reading, local changes and testing. They have not been given permission to make a booking or run a production migration.

Alternatives. The whole flow could have been implemented as a single endpoint with a guessed general 24-hour window; rescheduling could have been allowed temporarily with no limit; or the behaviour could be left undefined until a decision was obtained. The first option would quietly create a policy, the second could open up an unwanted scenario, so this example takes the third.

Result and limits. The handoff lets the code move forward without repeating the investigation from scratch, and it does not invent an undefined business requirement. Even a precise CI check does not prove compliance with the booking rules if those rules have not been approved; the successor must re-check the sources before calling the feature finished.

Example 2: The transaction record exists, but the acknowledgement was lost

The situation {#sec-example-acknowledgement-situation}

A fictional football statistics site has a server-side import of official squad changes. The idea is simple: a record from the source says a player is moving from Team A to Team B; the site must show the new team now and keep a record of what was true before. This is not a real league, a real team or a production service.

The handler received event league-feed:2026-09-22:8841 for the training player player-6304. It created the event record and updated the current squad in the same database transaction. After that, the web request acknowledging the event back to the source timed out; the agent received an empty error, and the session was interrupted before the state was checked.

The successor sees the note "operation sent; outcome unknown" in the handoff, but no acknowledgement from the source. An error in the response is no evidence that the write did not happen.

Alternatives and the decision {#sec-example-acknowledgement-alternatives}

  1. Rerun the whole import without checking. This is simple, but may create a duplicate historical event or change the squad a second time.
  2. Undo the first action blindly, then run it again. This is even riskier: the first record may not exist, or it may be correct.
  3. First reconcile the source event, the import log and the current squad state; retry only under a documented deduplication key. If these sources give no clear answer, halt the change and pass the question to a human.

The example takes the third option. The author hands over this package:

Snapshot: 23 September 2026, 16:05 Europe/Oslo. Task FOOT-203, repo example-training/football-stats, commit 6b1b770c220a8b08c5ff3c79501e87db97b6aa41 (fictional data).

FACTS: the handler received event league-feed:2026-09-22:8841, recorded it and updated the current squad in a database transaction, after which the response to the call was lost. The log contains a timeout; it proves neither success nor failure of the write. The agent's message recorded before the interruption is not confirmation of the state.

NOT YET VERIFIED: whether the event is stored in the import register; whether the previous membership of Team A was closed; whether the player's current record points to Team B.

ENVIRONMENT: local sandbox only, with a synthetic copy. The background handler is not running. There are no real credentials in this note; reading is allowed only through a read-only role in the test environment.

FORBIDDEN: do not resend the event, delete history, edit the squad by hand or run a backfill until the event key and the current record have been checked.

NEXT STEP: read the source's inbound log, the processed-events table and the player's state; record the identifiers of the rows read and the time of the check. A retry is possible only if the import contract confirms that the external identifier is unique, the event is not yet present, and the process owner has allowed a rerun.

In this teaching scenario, the inbound log confirmed that the event was received, and the processed-events table that it was applied; a separate history record confirmed that the interval of Team A membership was closed; and an independent read of the player's current record in the squad projection confirmed Team B. The event log alone does not prove that the current squad projection was updated. All of these facts concern a fictional test database. The successor does not rerun anything. Because their authority is read-only, they pass these links and results to the coordinator in the handoff; the coordinator can update Jira and decide separately whether the acknowledgement to the source needs to be recovered. The local transaction has been confirmed by the appropriate reads; whether the sender received the lost response remains unknown.

Why this decision is safer. It rests on re-reading, not on the previous agent's explanation. It does not duplicate an event that has already been applied, and it does not guess whether the sender received the response. The current team and the historical interval are different records: both are needed to be sure the change preserved the past state.

When a different decision may be needed. If the import log lags behind the main database, a stale replica is being read, or the provider's key can be reused, an "applied" status may not reflect the actual system. First determine the right authoritative source and its consistency limits. If the external source has no deduplication key or does not document retries, do not guess; escalate. If one identifier is linked to different content in two messages, suspend automatic processing: this is a data conflict, not a safe duplicate.

Example 3: The reviewer gets a polished report but no diff and no criteria

The situation {#sec-example-reviewer-situation}

In a fictional Jira→GitHub process, the author sends the reviewer a message:

"The change is ready. All requirements are covered, nine tests are green, I see no risks. Good to accept."

There is no task key, no link to a pull request, no commit, no base, no list of files and no name of the test run. The report is neatly formatted, but the reviewer has no way to know what was changed or which requirements were counted.

The problem and the options {#sec-example-reviewer-options}

The reviewer could trust the report and approve; could go hunting for the unnamed PR in the repository; or could ask for the missing evidence and hold off on a decision for now. The first path replaces assessment with trust in the author. The second invites an accidental review of the wrong diff. The third makes the boundary of the work visible.

The action {#sec-example-reviewer-action}

The reviewer replies with a single, specific request:

"I can't assess the change yet. Please send the Jira key and the PR link with the current base and head commits; where the acceptance criteria are recorded; which files were changed; links to the nine tests and the commit they ran on; open risks or failed checks. No need to send a new retelling without these sources."

The author clarifies: task DEV-772 in the fictional repository example-training/reporting-service; the address string for PR #91 is example-training/reporting-service/pull/91, and for workflow run #9207 it is example-training/reporting-service/actions/runs/9207. These are fictional placeholder strings, not live links; in a real handoff they would be working permalinks. Base main@24cd18a7f3b94e2c8d1a6f50b7e3c9d2a1f68405; head 65bda9f2c47e18a03d6b95f1e2407c8a53d16b09. In the teaching log for run #9207, head_sha equals the head given above. The reviewer checks the Jira criteria, reads the diff between the given revisions, confirms that the PR still has the same head, and reads the run log tied to it. They find that the nine tests are only the unit suite; the integration tests were not run. One criterion, about compatibility with historical data, needs a separate check.

Result, grounds and limits {#sec-example-reviewer-result}

The result is not automatic approval. The reviewer sends back a specific blocker: there is no integration check and no evidence of historical compatibility. The author adds a test and runs the workflow on a new commit; the reviewer again checks the head, the diff and the evidence. Only then can they decide whether the change meets the agreed criteria.

In this way the reviewer separated the fact "the author reported nine tests" from the fact "the unit suite passed in the workflow at SHA X". A good summary is still useful for orientation, but it does not replace primary sources. Had the PR been inaccessible, or the commit had changed in the meantime, the reviewer would have recorded that and asked for access to be fixed or the new head to be checked, rather than carrying on from the old report.

Example 4: A publication cannot be scheduled without a time zone

The team behind a training content management system is preparing an approved announcement for publication on 3 October. Task CMS-418 asks for it to be scheduled for a set hour, but does not say whether that is the audience's local time or Coordinated Universal Time (UTC).

The author hands over:

Snapshot: 26 September 2026, 15:40 Europe/Oslo.

Facts: repository example-training/cms, branch content/CMS-418, commit a4d97b2c8e61f3a0d5c72b9641e08f6c3b7a9210. The working copy is clean. The targeted unit tests passed at this commit in CI run 9134.

Not done: the time-zone rule is not implemented; the announcement has not been scheduled or published.

Unknown: the product owner has not yet decided which time zone the publication hour refers to.

Next step: check the current criteria in CMS-418 and ask the owner to confirm the time zone. Once decided, add a test for the day boundary and re-run the checks.

Authority: allowed to change code locally and test; not allowed to schedule a real publication without a confirmed rule and the corresponding permission.

The successor can safely continue investigating, but must not invent a time zone or present passing unit tests as evidence of meeting requirements that have not yet been defined.

Example 5: A payment confirmation was lost

In a fictional shop, a request to charge for order ORD-583 timed out. No response came from the payment processor, so the agent does not know whether the operation went through.

The handoff states: the charge (capture) request was sent at 10:14 Europe/Oslo with operation ID CAP-583; the outcome is unknown; there has been no retry; access to the payment system is read-only. The successor must check the request in the processor's system, the internal payment log and the current order status. The operation identifier is not an access key; there are no secret credentials in the note.

In this teaching case, re-reading confirms the charge at the processor, an entry in the internal log, and the current order status as paid. The successor passes on this evidence and does not repeat the charge. Had the records disagreed, had the source been read with a delay, had the identifier been reused, or had the processor not documented safe retries under the same key, the action should have been stopped and the payment owner brought in. A timeout on its own proves neither success nor failure.

Summary

A handoff is a compact transfer of the goal, the actual state, the sources, the constraints and the next decision. It does not guarantee that the successor has the same conversation, directory, revision or access rights. Products have their own commands for resuming, compaction and subagents, but these features are not interchangeable; the working record explains what actually needs to be continued.

Facts should lead to an exact source. Assumptions must be labelled as assumptions; a recommendation is not an approval; an unknown stays open. After a write or a timeout, check the external state first, and only then decide whether to repeat the operation. Before a review, provide the criteria, the diff, the commit and the checks, so the reviewer can work independently.

Record the state of the environment, unsaved changes, running processes, migrations and the limits of permission, but not secrets. Mark the time of the snapshot, the owner, and links to the task, pull request, ADR and artifacts. The successor begins by re-checking the critical sources. A handoff like this helps the team resume work safely and spares people needless interruptions.

Sources and further reading

The documentation was checked on the dates given next to each source. Where a page shows no publication date or version, this is noted. The requirements and examples in this unit are for teaching; the repositories, Jira items, commits, runs, records and environments in all the examples are fictional.

  1. OpenAI, Codex CLI, current documentation with no visible publication date; checked 26 September 2026. Used for the features for continuing a saved chat and for subagents. This is Codex CLI documentation, not a promise that a working copy or permissions carry over between arbitrary runtimes.
  2. OpenAI, Agents API overview, current documentation with no visible publication date; checked 26 September 2026. Used to distinguish session, environment, events and items, and for the context summaries, delegation and resume described for the managed harness. These properties belong to the OpenAI Agents API and do not automatically carry over to Codex CLI or the desktop app.
  3. OpenAI, Multi-agent guide for the Responses API, current documentation with no visible publication date; checked 23 September 2026. Used for the example of separate compaction for the root agent and subagents in the multi-agent mode described there. This is the behaviour of OpenAI's Responses API, not a general property of delegation.
  4. OpenAI Cookbook, Building Consistent Workflows with Codex CLI & Agents SDK, official example with no visible publication date on the page checked; checked 23 September 2026. Used as a public example of handing work between roles with checks on the expected artifacts. This is a demonstration workflow, not an empirical study, and not a requirement to copy its structure.
  5. Anthropic, Commands — Claude Code Docs, current documentation with no visible publication date; checked 26 September 2026. Used to distinguish /resume, /clear, /compact and viewing context in Claude Code. Command names may depend on the version, platform and feature availability.
  6. Anthropic, Create custom subagents — Claude Code Docs, current documentation with no visible publication date; checked 23 September 2026. Used for the limits of subagent context, their memory and continuing their work. These are properties of the specific Claude Code product.
  7. GitHub Docs, Getting permanent links to files, current documentation with no visible date; checked 26 September 2026. Explains the difference between viewing the current branch and a permalink to a commit.
  8. GitHub Docs, REST (Representational State Transfer) API endpoints for workflow artifacts, current documentation with no visible date; checked 26 September 2026. Describes artifact metadata and the link to the workflow run and the commit identifier (head_sha). Artifacts have a retention period and do not replace the check log.
  9. GitHub Docs, Validating artifacts, documentation with no visible date; checked 23 September 2026. Used for verifying the SHA-256 checksum of a downloaded artifact.
  10. DeMarco, Tom, and Timothy Lister, Peopleware: Productive Projects and Teams, 3rd edition, Addison-Wesley Professional, published 15 July 2013, edition copyright 2013/2014; Pearson page, publisher's sample pages, checked 23 September 2026. The available sample was used to check the preface, table of contents and index, including the title of the chapter on Brain Time/Body Time and the term flow; the full text of the book was not available. Reducing needless interruptions in handoffs is an adaptation of this theme to teamwork, not a claim about experiments with AI agents.
  11. wan-huiyan, session-handoff README at commit b57baab66fee857b58e3f0e58048f9342bf314cb, README commit dated 13 August 2026; checked 23 September 2026. A public example of a handoff structure, a next-session prompt, a decision list and reconciliation of Git/GitHub references. This is an open-source project described by its own author, not an independent assessment of its results.

Limits of the conclusions. OpenAI, Anthropic and GitHub describe their own products as of the time of checking, not every environment or team. Re-check feature availability and the exact state of a resource before acting. A GitHub artifact is not always kept for long; a link to a run should be supplemented with the commit and the time. The available Peopleware material gives no grounds to attribute to the book any advice for an agent runtime: the connection between people's attention and a compact handoff is this unit's own applied conclusion. The public GitHub project and the OpenAI Cookbook show possible structures, but do not prove that they are optimal for every team.