Repository navigation
Conversation
contextablemark
left a comment
There was a problem hiding this comment.
I’d hold this for the resume fixes. I could answer a single active approval, but mixed waits and expired approvals still left the conversation stuck. A failed resume also gave me no feedback. I reproduced those cases in ChannelChat with the pinned SDK and a mocked runtime.
| pending: readonly HeldInterrupt[], | ||
| approved: boolean, | ||
| ): InterruptAnswer[] { | ||
| return botRaisedInterrupts(pending).map((interrupt) => |
There was a problem hiding this comment.
P1. Mixed waits block the Bot’s answer. If the SDK holds one Bot interrupt and one OpenBot-owned interrupt, this drops the OpenBot ID from resume. AG-UI validates coverage against every pending ID before the run starts. I replayed both kinds together and clicked Allow. No request left the browser, and the card returned with no error. Please reconcile the OpenBot-owned wait before resuming the Bot’s wait, while keeping the OpenBot decision on its existing server path. The helper test covers the filtered payload, so please add a ChannelChat test that verifies the answer actually goes out.
| ): InterruptAnswer[] { | ||
| return botRaisedInterrupts(pending).map((interrupt) => | ||
| asksForApproval(interrupt) | ||
| ? { interruptId: interrupt.id, status: "resolved", payload: { approved } } |
There was a problem hiding this comment.
P2. An expired approval can leave the conversation stuck. For a wait with an elapsed expiresAt, the pinned SDK rejects resolved before sending the request. I clicked both Allow and Don’t allow after replaying an expired approval. Neither sent a request, and there was no way to cancel the wait. Please check expiry when the person clicks and give them a way to continue with status: "cancelled".
| setRunsInFlight((count) => count + 1); | ||
| try { | ||
| await whileObserved(agent, () => | ||
| copilotkit.runAgent({ agent, resume }), |
There was a problem hiding this comment.
P2. The resume skips the conversation’s run handling. With a mocked HTTP 503, the SDK reported an error but resolved the promise. The card’s catch never ran, and the conversation showed no failure. A successful resume showed the Bot’s reply in the transcript but sent no activity update for the conversation list. Please route this through the existing run tracking or cover both outcomes explicitly, including a visible error when the answer fails to send.
| }); | ||
| } catch (error) { | ||
| if (!(error instanceof ClientError) || error.status !== 403) throw error; | ||
| return getDeployment(DEPLOYMENT_ORGANIZATION, options); |
There was a problem hiding this comment.
Please update the PR’s API checklist to call out this browser request change. A 403 from the anonymous deployment read now triggers a second GET with the browser’s cookies, using the existing endpoint and response contract.
What this changes
Split out of #2326 so it can merge on its own. Two commits:
A Bot that stops its own run to ask can be answered. A Bot connected by its address can pause a run on an AG-UI interrupt of its own, as a harness does before it runs one of its own tools. The server already passes that interrupt and its answer through (
endpointResume); the app showed nothing, and the agent then refused every later run. The conversation now shows a card with the tool and its arguments and Allow / Don't allow. An interrupt that is not a yes or no gets "Carry on without it", which cancels it.A single-user OpenBot in a container answers the page's deployment question. Asked without cookies it said 403 on every page, so the release check and attachment limits were missing. The page asks once more with its cookies. The first, refused request still shows in the console.
Where it runs
resume, on the path a run already takes.Boundary and audit
The two unticked boxes need a reviewer's call. The approval the card answers is about the Bot's own tool, run inside the Bot's process. It never went through the gateway, and Allow or Don't allow writes no audit row. This PR does not change that; it makes the question answerable.
API and database
api/, no app's requests, no database change and norelease-policy.json.Changelog
Bots.
One container.
Proof
On this branch:
bun run typecheckinapp: clean.biome linton the touched files: clean.bun test tests/bot-raised-interrupts.test.ts tests/second-organization.test.tsx tests/failure-said.test.ts: 17 pass.Earlier, on an older base, in a single-container OpenBot with this app build and an AWS Strands harness Bot connected by address, driven through the browser:
shell; Allow runs the tool, Don't allow tells the Bot it was refused, and a follow-up message is answered either way.Not done:
shows "Thinking" within 200 ms ... from homefailed once. I could not run it locally (it needs the CI's bun), so this PR's run is the check of whether the card is the cause.