Repository navigation
Approvals render in the workbench thread again, and a parked worker says it needs you - #1118
Merged
pratikbuilds merged 8 commits intoOct 17, 2026
Merged
Conversation
The Needs you section listed a parked ask with a static Waiting pill and no way to resolve it, so the only remaining approval surface could not unpark the run. The row now shows the call it is gating and Approve / Deny, and a 409 says the ask can no longer be answered instead of echoing the status code.
A run that parks on an approval sends no mail and ticks no inbox event, so the approvals list stayed stale and the worker kept reading as working while it was blocked on the person.
Approvals render in the thread where the decision happens, with Allow once, Always allow, Ask every time and Deny. Only asks raised by a live agent address are shown, since an ask whose run is gone can no longer be answered.
Answering an ask resumes the run, which can park again on its next tool call. The turn is marked pending again so the next ask surfaces, and the answered row is dropped from the cache first, since the stale list would otherwise settle the resumed turn before its refetch lands.
pratikbuilds
marked this pull request as ready for review
October 13, 2026 13:04
An ask left pending by a run that is gone can't be answered, so it must not settle the live worker's pending turn; the worker's own ask still does.
A pending ask from a run that is gone settled every new turn at once, which stopped the approvals poll, so the live worker's next ask never surfaced and the pill read Live. The turn now settles only on the live worker's own ask, the same check the Needs you status uses.
TheGreatAxios
approved these changes
Oct 17, 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.
Summary
Closes #1117. A worker parked on an approval looked like it was still working: the thread showed nothing, the pill said "working", and the drawer's Needs you row had no buttons. Approvals now render in the thread where the decision happens, as DESIGN.md describes.
The thread only shows asks raised by a live agent address. An ask whose run is gone (e.g. after a hub restart) can't be answered, so it stays in the drawer only, where a 409 now reads "already resolved or its worker stopped" instead of "The server answered 409."
A parked run sends no mail and ticks no inbox event, so nothing refetched the approvals list. Polling now follows the pending turn:
Dropping the row first matters: with the stale row still cached, the resumed turn settled immediately and the next ask in the same reply never surfaced.
Evidence
e2e/browser/approval.test.ts, against scripted inference (aimock) on an isolated database:After: 2 pass, 0 fail.
Typecheck, lint, fmt and the apps/web unit tests (186) pass.
bun run checkfails at the test step in five packages this PR doesn't touch (approvals,deferred-tools,url-path,workflows,worker): they have no test files, andbun testexits non-zero when it finds none.Merge Danger
Door: two-way
UI and e2e only. No schema, API, or data changes.
Blast Radius: workbench-thread
Approvals polling runs every 5s per bench only while a turn is pending, as the timeline poll already does.
createChatApprovalActionshad no callers before this PR.Notes for review:
startWorkbenchhelper ine2e/lib/first-run.tscovers the same race; this test can switch to it once that lands.e2e/lib/hub.tsboots the browser-suite hub on the rawDATABASE_URL, i.e. the dev database from.env. Running these suites besidebun run devputs two hubs on one database, and the dev hub picks up the suite's sidecar allocations. That's why the worker sometimes never launched in these suites. Worth its own issue.