Bug: aborted daemon extension UI requests remain clickable and return Unknown extension UI request #1964
Replies: 1 comment
|
Follow-up from a real isolated source-built daemon/client canary: the first patch ( Corrected head: Fresh run-scoped canary evidence: capable client received the exact request and exact cancellation; |
Uh oh!
There was an error while loading. Please reload this page.
Problem
When a daemon extension UI dialog is aborted or times out after a competing decision (for example, Slack consent wins), the daemon removes the pending request but does not notify the connected interactive client. The terminal keeps the stale dialog. A later click sends
extension_ui_responsefor the retired ID and receivesUnknown extension UI request.Reproduction
An executable regression covers: daemon emits dialog -> request aborts -> daemon request is removed -> interactive client still holds the exact ID -> late click attempts a response. On current
main(97b994c) it makes one stale response call and surfaces the unknown-request error.Proposed fix
Add a schema-revision-17, capability-gated
extension_ui_cancelledoutbound event. On actual pending-request cleanup, the daemon emits{ activeSessionId, id }; only clients that advertiseextension_ui_cancellationreceive it; the agent connection forwards it within the active-session guard; the interactive client retires only that exact ID. Unknown cancellation IDs are no-ops. Unknown, duplicate, wrong-session, and legacy response handling remains fail-closed. A normal valid response is tested to emit no cancellation.Tested fork commit: tamikomssi/prime-agent@c299890
Branch: https://github.com/tamikomssi/prime-agent/tree/fix/extension-ui-cancel-correlation
Verification:
npm run checkpasses; five touched suites pass (429 tests); focused Claude Opus 5 security review returned PASS with no blocking findings. Broader suite retains unrelated environment/fixture failures outside the changed suites.May I submit this as a pull request?
All reactions