Repository navigation
Wake a session only for input that asks for its attention - #7231
Merged
Merged
Conversation
A session was woken for nothing it had to answer. Advice, such as a render reading's note that a diagram's labels are small, rides in the batch with the input that next reaches the agent (`delivery.deliverable`). When the agent answered that input, say a comment, before its receipt, `wake_inputs` dropped the settled comment but kept the advice, so the watch between turns woke the session for it, and a watch ending or the server after an Escape nudged it. `wake_inputs` now keeps only what admission marked for the agent's attention (`requires_agent_attention`). The receipt batch stays whole: the advice still goes to the agent with the next input, as before. A model test covers the three routes: a watch between turns, the nudge a watch sends as it ends, and `server_rows.nudge_interrupted`.
leaf-agent
approved these changes
Nov 26, 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.
A session was woken, or nudged, for advice when nothing it had to answer was left. With an advisory render pending beside a comment the agent had already answered before its receipt,
deliverablereturns both;wake_inputsdropped the answered comment and returned the advice alone, which the watch between turns,nudge_pendingandserver_rows.nudge_interruptedeach treated as new input ("has new input").wake_inputsnow skips any eventrequires_agent_attentionrejects, the predicate admission already marks input with, so only input marked for the agent's attention wakes it. The receipt batch is unchanged, so the advice still reaches the agent with its next input.Codex found this while reviewing #7222, which moved
wake_inputsbesidedelivery.deliverable; the bug predates the move.Tests:
test_advice_wakes_nobody_once_what_came_with_it_is_answeredchecks the batch still holds both and that none of the three routes wakes or nudges; each route failed it before the fix.lint-imports, pre-commit, and 309 tests across 8 covering model files.