Repository navigation
refactor(agents): one follower for every agent's atif/1 tail, and Codex's and Gemini's tails in modules of their own - #940
Merged
Conversation
…d Codex's and Gemini's tails get modules of their own The three bridges each followed their CLI's files their own way, Codex's and Gemini's with copies of one loop. utils/tail_follow is the one follower now, taken by each image through shared_sources.toml; Claude Code's tail gains take(), its read committed. Codex's rollout tail moves to codex_rollout.py and Gemini's transcript tail to gemini_transcript.py, each given how to find its files rather than reaching back into the bridge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… helpers, and Codex's sub-agent says where its records go tst/manual/atif_recording.py holds what both recorders did alike (the image built as a release builds it, a turn sent and read back with its live pages, the key kept out), and tst/util/atif_recorded.py the loading, replaying and checks the three agents' recorded tests repeated. Codex's adapter keeps a sub-agent's place as one state, held, embedded or an earlier task's, rather than two flags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
marked this pull request as ready for review
November 27, 2026 23:32
…ox maps to its own folder A host install on a local sandbox runs on this machine as this user, who can't make /workspace at the root, so Gemini's install failed there before it copied anything. Every other shipped agent works in /app, which the local sandbox maps to a folder of its own. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…one call, and its image and install carry every module the server imports The tail's read and advance were split so a read the follower cancelled midway was read again. The shared follower never cancels a read, so read now moves past what it gives, as Codex's and Gemini's tails do, and the follower calls it directly. Claude Code's image-contract test now checks, as Codex's and Gemini's do, that the Dockerfile and install.sh carry every module the server imports, the shared ones included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
A follow-up to #924 that changes no behaviour, with one exception: when Claude Code's CLI run raises or is cancelled, what its transcript gained is now fed as well, as Codex and Gemini already did. Before, only a run that returned had that last read. Before this PR:
This PR gives each of these one home.
What changes
One follower (
utils/tail_follow/tail_follow.py)tail_follow.followingreads a tail while the CLI runs and once more after it exits, whichever way the run ends. A read still in flight when the run ends is fed, not dropped.shared_sources.tomland copy it beside the bridge, as feat(agents): Codex follows the env's clock, its CLI on real time and the model told the env's date #926'sagent_clockandmodel_relayare taken. Their own follow/stop functions go.readandadvancewere split so a read cancelled midway was read again, and the shared follower never cancels one. The follower callsreaddirectly.shared_sources.toml. Its install now copies a shared file to its basename, as Codex's and Claude Code's do.The tails in modules of their own
RolloutTail,rollout_auxand the fork handling) moves tocodex_rollout.py.SessionTail,session_aux,transcript_messages) moves togemini_transcript.py.find, and Codex's sessions folder), rather than reaching back into the bridge.SESSIONS_DIR,find_rollout_pathandfind_session_filestay in the bridges, where the rest of the agent and its tests use them.Shared test helpers
tst/util/atif_recorded.pyholds what the three agents' recorded tests repeated: loading and replaying a scenario, writing the expected documents again, and the checks for usage sums, each model call's time and model, and each call's result. Claude Code's shared tool files plug in through hooks.tst/manual/atif_recording.pyholds what both recorders did alike: build the image as a release builds it, send a turn and read it back with its live pages, and keep the key out.Codex's sub-agent state. A sub-agent's place is one state,
held,embeddedorearlier, rather than the two flagsdeclaredandearlier.Gemini's host install works in
/app, as every other shipped agent's does. On a local sandbox a host install runs on this machine as this user, who can't make/workspaceat the root, so Gemini's failed there before it copied anything. The local sandbox maps/appto a folder of its own.Testing
shared_sources.toml, as Codex's does.install.shcarry every module the server imports. It fails with the follower dropped frominstall.sh./workspace./compactbetween turns, recorded again through the image built from the last commit.install_agentfrom each build context, with atif/1 prescribed and live pages, about $0.35:/appfix: onto the host and into the container, two turns of one conversation each, both passing.🤖 Generated with Claude Code


Confidence Score: 5/5
The changes appear safe to merge; no blocking issues were found.Summary
The PR gives Claude Code, Codex, and Gemini one shared transcript follower and moves Codex’s and Gemini’s tails into separate modules.
/appworkspace.Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR CLI[CLI writes transcript] --> Tail[Agent-specific tail] Tail --> Follower[Shared follower] Follower --> Adapter[ATIF adapter] Exit[CLI exits or raises] --> Final[Finish current read and read once more] Final --> FollowerReviews (8) · Last reviewed commit: "refactor(agents): Claude Code's transcri..." · Reviewed by Greptile