Repository navigation
feat(protocol): a live atif/1 read names the header it holds and how far it holds each sub-agent - #903
Merged
Conversation
…far it holds each sub-agent A task's cursor read may name the digest of the header the reader holds and a cursor per sub-agent; the agent then answers the header's digest, leaves the header out while it's unchanged, and serves each of the task's sub-agents by its closed steps past its cursor (its header only when that changed), whether or not the step that started it has closed. A read naming neither gets today's page. The card declares both fields, and the live follower names them only to an agent whose card does, keeping its own dedupe otherwise. A page that carries only a sub-agent's new steps is stored as it comes. Integration tests hold the registry still for each test: a release publishing one of a bundle's images between two runs of it made the second plan a pull where the first built. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… shipped agents' pinned cards declare it Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…both get the answer stored first Parallel disk builds look the disk tools image up from threads: two first lookups racing could each store their own answer, the later replacing the first, so one test could still switch between building and pulling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…swers don't carry them is followed as before The follower took the card's word and read every answer for digests; an agent binding its own get handler answers in today's shape, so its sub-agents reached the page writer without their ids and headers, and were never stored. An answer with no sub-agent digests now passes its whole sub-agents as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rops what it holds on a native fallback Each held sub-agent is a typed record rather than a dict read by string keys; a sub-agent's header is taken when the answer names a digest other than the one held; a native fallback clears what the follower holds, so the loop asks only whether it holds anything. The live tests share one step helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Since #890, a prompt step whose atif/1 copy replaces native follows that copy live. This PR makes those live reads say what the reader already holds, so the agent sends only what's new:
Released agents keep working as before: the follower names the new fields only to an agent whose card declares them. The PR also fixes a flaky integration test.
What changes
The protocol (
a2a_agent/extensions.py,_atif_copy.py,framework.py)TaskEventsTrajectoryRequest) takes two optional fields:header_digest: the digest of the header the reader holds,""for none;subagent_cursors: for each sub-agent, the laststep_idthe reader holds and its header's digest (SubagentCursor),{}at first.header_digest:header_digest;headerout while the two match.subagent_cursors:subagent_header_digestsnames each sub-agent's header digest.The live follow (
a2a_agent/trajectory_follower.py,snapshot_utils/live_trajectory.py,prompt_agent.py)live_reads_take_cursors(card)says whether an agent's card takes them, and the follower names them only then (LiveAtif.cursors).gethandler, so its generated card declares the fields while its answers don't carry them. An answer with no sub-agent digests is taken in today's shape, and its whole sub-agents pass as they are.The flaky test (
tst/integration/conftest.py,tst/util/published_image.py)_registry_digestkeeps what it finds published for the process, but not what it doesn't, so the second run asked again.Decided with Edgar
Choices to review
ContextEventsTrajectoryRequest) don't take the new fields: the live follow reads tasks.CliRunner). A test that runsagent-envas a subprocess isn't held.Testing
test_a2a_atif_serving.py), with a new scenario: a sub-agent writing steps while the call that started it waits for its result.test_a2a_trajectory_log.py).test_prompt_agent_live_atif.py):tst/unit/test_published_image_hold.py): an image published after the test's first lookup stays unpublished to it; one published before keeps its first digest.task_step,a2a_agent,agentsand the protocol suite: 8,047 passed.computer_exec_test.py, and three agent tests that fail the same way on a cleanmainhere.🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues were found.Summary
Adds negotiated header digests and sub-agent cursors to live
atif/1reads.Diagram
Reviews (9) · Last reviewed commit: "refactor(a2a): the follower holds each s..." · Reviewed by Greptile