Repository navigation
app: a suggested choice's clock runs only once a surface has drawn its card - #2155
Merged
Merged
Conversation
…the card The desktop launches every agent with a 12 s ChoiceClockSeconds, and the clock started at the raise: an errand whose card no surface drew had its suggested answer taken 12 s later for a person who never saw the question (decidedBy "dial"). Now a choice on the surface's clock is raised with no clock and waits for asks.shown (StartQuestionClock), blocking or not, with no bound; a project's own autonomy row still runs from the raise. The hello says so (asks.clock.drawn), so a surface knows to send asks.shown once its card is on screen. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ShowAsk updated the ask it answered but emitted nothing, and the lane's own restate then matched it and was dropped, so a second window (or the caller, when it read events) could miss the countdown the engine was counting. A changed clock now re-announces the ask once. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 changes
A suggested choice's clock now runs only after a surface has drawn the card and its countdown.
proposed_task_clock_s, 12 s by default). Before this change, the clock started when the question was raised.decidedBy: "dial"). This happened even when the question blocked the turn.Now:
tools_ask: a choice on the surface's clock is raised with no clock (noclock_until), blocking or not, and with no time limit. A choice that no surface has drawn never picks an answer by itself.asks.shown(StartQuestionClock) starts the clock for its full length from that moment.asks.shownchanges is announced to every window withask.opened. Before, the reply updated only the caller, and the lane's own restate was dropped as a duplicate.asks.clock.drawn, so a surface knows to sendasks.shownwhen the card is on screen.The desktop side (the decision dock sends
asks.shownonce the card is visible and painted, only to an engine that announcesasks.clock.drawn) is on the desk branchfeat/asks-shown.Tests
internal/session/tools_ask_drawn_test.go(new, written to fail before the change):asks.shown, the clock gets its full length and picks the suggested answer.internal/appwire/askdrawn_test.go: an engine that hasasks.shownannouncesasks.clock.drawn; an older engine does not.cmd/codeaf/appquestionhold_test.go: now draws the card first, and checks that the clock it starts reaches the events.Validation
internal/session: 9 tests fail with the same names on app/v3 itself.internal/taxonomy: fails on app/v3 too.cmd/codeaf: four tests fail the same way on app/v3 when both trees run the same engine binary (R2, R3, both C1).cmd/codeaf:TestAppTakeInstallFailureS5is flaky on app/v3 (3 of 6 runs fail).make changelog-checkalready reports 255 entries on app/v3 (mostlyprmissing). This PR's entry carries its PR number.Live check
The desktop app (with the dock change that sends
asks.shown) ran on this engine build (rev d6b0e1d, hello listsasks.clock.drawn). All 26 model calls used OpenRouterdeepseek/deepseek-v4.1-flash. Total spend was $0.03.ask.openedcarried noclock_until. For 41 s nothing was sent, nothing was answered, and the ask stayed open as "1 needs you".asks.shown. The engine re-announced the ask withclock_until05:14:47.867, 12.3 s later, and the card counted down "Picks cat in 12s". At 05:14:47.869 the clock took the suggestion (ask.closed, option 1).asks.shownto a 12 s clock, then the pick. Its own reply said: "No answer came before the clock ran out, so my suggested pick stood".🤖 Generated with Claude Code