Repository navigation
Conversation
The OPEN goes right after subagent_message_sent and the JOIN right before subagent_reply_received, so a follow puts each subagent turn in its bracket.
The stream runtime keeps the order now, so the gates, the stall deadlines and the give-up path go. The resume point carries the follow state.
A retried append then dedupes the marker and its OPEN or JOIN together.
A dispatch retry writes the same OPEN again, so the follow resumes the subagent where it paused.
Owner
Author
|
Link Records are paused after the 2026-10-19 SDK review. Replaced by #6, the Brook v3 stack. |
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.
What changed?
This PR replaces the client-side stream merge with Brook Link Records and
follow(). It's stacked on #4.subagent_message_sentand itsOPENin one append. The parent writes aJOINandsubagent_reply_receivedin one append, with the subagent'sturn_endcursor asuntil. A retried append dedupes each marker and its link together.SubagentTurnErrorandSubagentNoReplythe activity reads on toturn_endand putsconsumed_cursorin the error details. The parent writes theJOINwith it and moveslast_consumed_cursor.AgentClient.send_messageandattachread the agent tree with onefollow()of the root's stream (harness/agent_follow.py).stream_merge/and its tests are gone, and so aresubagent_stall_grace_seconds, the per-child deadlines and the give-up path.seq@cursorpoint still decodes, as the root cursor only. The point moves at batch ends, so a resume from inside a batch repeats the rest of that batch.subagent_max_depth(4) andsubagent_max_open(16) options. ASKIPPEDorUNAVAILABLElink becomessubagent_stream_unavailablewith the reason.e160426e), which takes plain values and links in one append.Events with no bracket can come in another order than before. The brackets and each stream's own order hold, and the same store content always gives the same order.
Why?
Jason asked for one logical stream for an agent and its subagents. With Link Records the stream runtime gives that order to every SDK, so the harness doesn't rebuild it in a client merge. The stall deadlines go too, since the
JOIN'suntilrecord is in the store before theJOINis written.How did you test it?
Link to a test plan if any -