Skip to content

Wake a session only for input that asks for its attention - #7231

Merged
max-sixty merged 2 commits into
mainfrom
agent-ad89bd567e6b25253
Nov 26, 2026
Merged

max-sixty merged 2 commits into
mainfrom
agent-ad89bd567e6b25253

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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, deliverable returns both; wake_inputs dropped the answered comment and returned the advice alone, which the watch between turns, nudge_pending and server_rows.nudge_interrupted each treated as new input ("has new input").

wake_inputs now skips any event requires_agent_attention rejects, 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_inputs beside delivery.deliverable; the bug predates the move.

Tests: test_advice_wakes_nobody_once_what_came_with_it_is_answered checks 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.

This was written by Claude Code on behalf of max-sixty

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`.
@max-sixty
max-sixty merged commit 9685991 into main Nov 26, 2026
6 checks passed
@max-sixty
max-sixty deleted the agent-ad89bd567e6b25253 branch November 26, 2026 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants