Fixed: "Thread has 1 pending interrupt(s) not addressed by resume" in the AG-UI Client
My chat showed an approval card for a waiting AG-UI interrupt. When I wrote a new message instead of answering the card, the message never left the browser: the AG-UI client threw AGUIError: Thread has 1 pending interrupt(s) not addressed by resume. AG-UI requires the run after an interrupt to answer every open request, even one the person moved past. Sending the message with a cancelled answer for the open request fixed it.
What I Was Doing
In Part 14 of the Microsoft Agent Framework series, the Next.js chat app shows a card when the agent's run stops for approval. The agent is built with Microsoft Agent Framework and served over AG-UI, a protocol for streaming agents to user interfaces, and the chat talks to it with the AG-UI client, @ag-ui/client 1.0.5. The agent's password reset needs approval, so a run that calls it ends with an interrupt, and the card's Approve and Reject answer it with runAgent({ resume }).
The function that sends a new message was still the one from before the cards. It adds the message and starts a run, without answers:
function send(text: string) {
agentRef.current ??= new ChatAgent();
const agent = agentRef.current;
agent.addMessage({ id: randomUUID(), role: "user", content: text });
setMessages([...agent.messages]);
setDraft("");
void run(agent);
}
I signed in, asked I forgot my password and I'm locked out. Can you reset it?, and the card appeared:

Instead of answering it, I wrote Before that, is my laptop compliant?
What I Expected
The agent's answer about the laptop. In Part 13 I had sent a new message to the same API, from a .http file, while a reset waited for approval: Agent Framework rejected the waiting call and answered the new message.
What I Got
No answer. Under my message, the chat said The chat couldn't reach the agent. Please try again., and the card stayed:

The chat's catch writes the real error to the browser's console, and the console had it (paths shortened):
The agent run failed. AGUIError: Thread has 1 pending interrupt(s) not addressed by resume: ficc_call_GIAr8usHuKCbpSKqrscQoM0U
at ChatAgent.onInitialize (…/node_modules_@ag-ui_client_dist_index_mjs_….js:3263:37)
at ChatAgent.runAgent (…/node_modules_@ag-ui_client_dist_index_mjs_….js:3130:35)
at ChatAgent.runAgent (…/node_modules_@ag-ui_client_dist_index_mjs_….js:3470:88)
at run (…/app/chat.tsx:144:25)
The Next.js development overlay showed the same error and pointed at the runAgent call:

ficc_call_GIAr8usHuKCbpSKqrscQoM0U is the ID of the interrupt the card was showing.
What I Checked
Whether the message reached the server. The chat app's terminal logs every request to its /api/chat route. It had a POST /api/chat for the question that produced the card, and none for my second message. The error came before anything was sent.
Where the error comes from. The call stack starts in onInitialize of @ag-ui/client, which runAgent calls before it sends a run. The client's type definitions describe the two pieces involved. pendingInterrupts holds Interrupts emitted by the most recent run that have not yet been resolved; it's Populated when RUN_FINISHED arrives with outcome.type === "interrupt" and Cleared when a subsequent run completes successfully. And runAgent's resume parameter is Per-interrupt responses addressing every open interrupt from the previous run. My send passed no resume, while pendingInterrupts still held the card's interrupt.
AG-UI's documentation. The Interrupts page lists the rules for continuing a thread. Two of them describe my situation:
Cover all open interrupts. A single
resumearray must address every open interrupt from the interrupted run. Partial resumes are not supported.Pending interrupts block new input. If a thread has unresolved interrupts, any
RunAgentInputon that thread must include aresumeaddressing them.
The same page has the answer for a request the person didn't answer: the status cancelled, for when the user abandoned without providing meaningful input, with no payload. The specification makes checking the rule the client's job: A consumer MUST reject a resuming input that leaves an interrupt uncovered before the run starts — before anything is sent, because Omission is not abandonment.
What Agent Framework does with a cancelled answer. I sent the API a run with both, a new message and a cancelled entry for a waiting reset. The run started with the waiting call's result, Tool call invocation was rejected by the approver and must not be retried. No approval response was provided for this approval required tool call., and then the agent answered the new message. So a cancelled answer is safe: it rejects the waiting call, which is what the person meant by moving on.
Why It Happens
The AG-UI client remembers the interrupts of the last run and refuses to start a run that doesn't answer all of them, as the protocol tells it to. In Part 13, no client was involved: the .http file sent the new message straight to the API, which handled it on its own. In the chat, the client checks first, and a new message without answers is a run it won't send.
The Fix
Answer every open request when the person sends a new message. A request they moved past gets status: "cancelled", with no payload:
function send(text: string) {
agentRef.current ??= new ChatAgent();
const agent = agentRef.current;
agent.addMessage({ id: randomUUID(), role: "user", content: text });
setMessages([...agent.messages]);
setDraft("");
// A new message while the agent waits for approval moves on without
// answering. The run must still say so for every open request: AG-UI
// doesn't start a run that leaves one unanswered.
const skipped = [...agent.pendingInterrupts];
setDecisions((current) => {
const next = { ...current };
for (const open of skipped) {
if (open.toolCallId) {
next[open.toolCallId] = "cancelled";
}
}
return next;
});
void run(
agent,
skipped.length > 0
? skipped.map((open) => ({ interruptId: open.id, status: "cancelled" }))
: undefined,
);
}
| Code | What it does |
|---|---|
agent.pendingInterrupts | The interrupts the client is holding: the ones the run must answer |
status: "cancelled" | AG-UI's answer for a request the person didn't answer |
setDecisions(…) | The chat records the request as Not answered, so the card turns into a line |
undefined when nothing is open | An ordinary message sends no resume at all |
In the series, the chat's own server route checks every body it gets, so the route had to accept a body with both a message and answers. That change is in Part 14.
After the Fix
The same steps: ask for the reset, ignore the card, and write Before that, is my laptop compliant? The card became a line, Not answered: Reset my password, and the agent answered the new question:

The browser's console stayed empty, and the chat app's terminal logged the request this time.
Common Mistakes
| Mistake | What happens | Do this instead |
|---|---|---|
| Starting a run with only a new message while a request is open | AGUIError: Thread has 1 pending interrupt(s) not addressed by resume | Send a cancelled entry for every open request with the message |
| Answering one of two open requests | The same error, for the other one | Answer all of them in the same run |
Sending cancelled with a payload | AG-UI says the payload should be omitted for cancelled | Send only interruptId and status |
Swallowing the error in a catch | The chat shows a generic message and nobody sees why | Log the error to the console in the catch |
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Thread has N pending interrupt(s) not addressed by resume | The run doesn't answer every interrupt of the previous run | Pass a resume entry for each one |
| The error appears, but no request shows in the network log | The client refuses the run before sending it | Fix the resume; the server is fine |
FAQ
Why not disable the message box while a card waits?
That follows AG-UI's rule too: the person must answer before they can write. The chat in the series lets them move on instead, because writing something else is what people do when they change their mind, and the agent reacts to the new message at once. Either way, every run answers every open request.
What does the agent see when a request is cancelled?
With Microsoft Agent Framework's AG-UI server, the waiting call is rejected: its result is Tool call invocation was rejected by the approver and must not be retried. No approval response was provided for this approval required tool call. The agent then answers the new message. When I wrote Wait, I remembered it. Never mind. instead of answering a reset, it answered No problem—your password wasn't reset, and nothing changed.
Does the error appear with every AG-UI agent?
The check is in the AG-UI client, so it applies whatever agent the chat talks to: the client refuses the run before the agent hears about it.
Conclusion
Thread has 1 pending interrupt(s) not addressed by resume is the AG-UI client keeping the protocol's rule: the run after an interrupt must answer every open request, and nothing is sent until it does. When the person writes something else instead of answering, send their message with a cancelled entry for each open request. The agent rejects the waiting call and answers the new message.
Additional Resources
- AG-UI: Interrupts — the rules for resuming, and what
resolvedandcancelledmean. - AG-UI specification 1.0: Interrupts and Resume — why the client checks the answers before a run starts.
- Human-in-the-Loop with AG-UI — how Microsoft Agent Framework turns an approval request into an AG-UI interrupt.
