aee297868e1b4f19a0d72accab549af59c6d1efc
A turn's approval cards were queued in whichever order the batch happened to resolve. Tools run concurrently and each awaits `willExecute` and then the approval gate before it reaches `requestApproval`, so which of two calls arrives first is a race between two tasks on the global executor — the same pair could be presented either way round on two runs of the same prompt. Nothing was unsafe about it: every card names its own tool and shows its own arguments, so the answer is never given to the wrong question. It is simply a needless surprise in the one place the app stops and asks the user to authorize something, and "1 of 2" reads as an order it was not keeping. Planning is sequential — `AgentToolScheduler` preflights the whole batch before any of it runs, because the batch's concurrency is not known until every call has been classified — so `invocation.createdAt` already records the order the model asked in. Inserting by it costs a linear scan of a queue that is almost always empty and makes the presented order the model's own. `denyingTheHeadLeavesTheNextRequestAnswerable` has been passing on that race all along, which is worth writing down: it asserts that the *second* tool is the one that runs, so it only passed while the first call happened to win. It went red the moment an unrelated change perturbed the timing by one task hop, and that is what surfaced this. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Description
AI-driven remote workspace for Mac, iPhone, and iPad.
https://termind.akinokaede.com
23 MiB
0 Stars
1 Watchers
0 Forks
Languages
Swift
98.9%
Python
0.8%
Ruby
0.3%