Skip to content

Let a turn finish quietly past a question an earlier turn left open - #498

Closed
rpavlovs wants to merge 1 commit into
hamedgitty:mainfrom
rpavlovs:quiet-older-question
Closed

rpavlovs wants to merge 1 commit into
hamedgitty:mainfrom
rpavlovs:quiet-older-question

Conversation

@rpavlovs

@rpavlovs rpavlovs commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

A question an agent asked without waiting stays open for as long as the person likes. Until now, any open question in a conversation refused bloks quiet for every later turn there, so a later turn nobody waits on (another agent's bloks say, a service wake) had to answer with a full reply just because an older question was still on screen. The person then got a reply and a notification about nothing, while the question itself was already waiting for them.

This narrows the open-question guard to the turn's own work:

  • Each open request now records the lane turn it was asked in (askedIn) and whether it only asks. A request asked again is the later turn's.
  • Each lane records the turn its current work began in (workSince), set only by new work. A retry, the backup or a pickup may go on with work older than the lane's latest turn (an incident can be tried again after other turns), so it records none, and every open request still holds it.
  • heldByRequest lets a quiet finish pass only a question asked before that work began. An approval, a question of the turn's own work, a request nobody knows the turn of, or any open request in a retry, the backup or a pickup still refuses with open_request. The same check runs at acceptance and when the turn ends, so a question asked after acceptance still cancels the finish.
  • The earlier question is untouched: its card, request maps, answer routing and the lane's waiting state stay as they were, and answering it afterwards starts a turn as before.
  • A turn takes the conversation's unread dot when it starts. Before this change, a turn in a conversation with an open question could never finish quietly, so its reply always put a dot back. When a quiet finish passes an earlier question, it now gives the dot back, unless the person opened the conversation during the turn.

Everything else is unchanged: the person's words in or on their way into the turn, shown output, rooms, check-in rules, refusal wording, the CLI and notification paths. There is no new setting, route or permission.

Tests:

  • test/quiet-finish-unit.test.ts: which open requests hold a quiet finish.
  • test/codex-async-questions.test.ts: an earlier async question plus another agent's turn. The turn finishes quietly, the conversation still waits and keeps its unread dot, and the card stays open. A question of the turn's own and the person's own turn still refuse. Opening the conversation during the turn leaves no dot. Answering the question afterwards still reaches the agent. A retry after a failed try that asked, and a failed turn tried again from its incident after other work in between, still refuse with open_request.
  • Docs: docs/ARCHITECTURE.md, the bloks quiet paragraph.

An open question in a conversation refused bloks quiet for every later
turn there, so a turn nobody waits on had to reply just because an older
question was still on screen. Each open request now records the lane
turn it was asked in, and each lane the turn its current work began in.
A quiet finish passes only a question asked before that work began; an
approval, a question of the turn's own work, or a request whose turn is
not known still refuses. A retry, the backup or a pickup may go on with
work older than the conversation's latest turn, so it records no start,
and every open request still holds it. The earlier question stays open,
waiting and answerable, and a quiet finish that passed one gives back
the unread dot the turn took on starting, unless the person opened the
conversation meanwhile.
@hamedgitty hamedgitty closed this Nov 10, 2026
@hamedgitty

Copy link
Copy Markdown
Owner

Thanks, Roman. Narrowing the open-question check to the turn's own work is the right call, and it holds wherever the start of the work isn't known. Giving the unread dot back was a nice catch too. It's landed as you wrote it, with you as author. It's in 3.2.8, out now. Closing as merged.

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