Repository navigation
Lookout: a turn's end reaches the lead with its reply, or waits for it - #378
Merged
Merged
Conversation
A steer went out as soon as the person's words were read, while a task's turn-end reply could still be on its way; the steer took the turn's end without it, and the reply was dropped when it came. A resting lead's note had the same gap once SETTLE_MAX ran out with a read in flight. Updates now keeps the turns whose reply is being read. A note leaves such a turn's end for a later note, sends nothing when that is all there is, and the read clears its turn whether or not it found words; a dropped connection clears them all. The person's words in a steer still go at once. Fixes #359. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH7ReQfFZ1hChr3jXE
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
A task whose only news is a turn whose reply is still being read took one of the note's task places and told nothing, so with enough of them a task with news, an approval among them, waited behind. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_013jkdGH7ReQfFZ1hChr3jXE
This was referenced Oct 30, 2026
Merged
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.
Fixes #359.
The problem
When the person writes in a task while the lead is mid-turn, a steer goes out as soon as those words have been read. It doesn't wait for other reads that are still running. If a task's turn-end reply was still being fetched at that moment,
Updates::take()put the turn's end into the steer with no reply. When the read came back,replied()found nothing pending and dropped the reply. A resting lead's note had the same gap onceSETTLE_MAX(15 s) ran out with a read still in flight.Pattern
Claude Code's background-task notification and Codex's subagent
waitboth hand back a finished subagent together with its final message, never the "done" without the result. The lookout now does the same: a turn's end is told with its reply, or not yet.What changes
Updateskeepsreplying, the set of turns whose reply is being read. The lookout adds a turn when it starts a reply read.replied()always removes it, whether or not the read found words, so a failed read never holds a turn. A dropped connection clears the whole set, since the old reads answer a channel that's gone.take()leaves a held turn's end (actortheirs) pending for the next note. The rest of the task's news, the person's words included, still goes out now.wake()puts the news back and sends no note, rather than an empty one.Tests
a_steer_leaves_a_turn_whose_reply_is_being_read_for_the_next_note: the steer carries the person's words and not the turn. No note goes while the read is out. The next note has the turn with its reply.a_reply_read_with_no_words_holds_its_turn_no_morecargo test -p sonnyandcargo clippy --workspace --all-targets -D warningspass locally. CI runs the live lookout suite.No visible change, so no screenshots.