Headless Interrupts
Answer agent interrupts from any React Native view, outside the chat.
What is this?
Sometimes the agent's question belongs outside the chat: on a dashboard, in a bottom sheet, or in a native alert. A headless interrupt lets any view show the question and resume the run with the answer. No chat needs to be mounted.
On React Native this is also how a custom chat shows interrupts. The root CopilotChat, CopilotPopup, and CopilotSidebar don't draw them, so your own UI places them.
Use
useHumanInTheLoopon this framework. Headless interrupts need an agent that emits an AG-UI interrupt (RUN_FINISHEDwithoutcome.type === "interrupt") or anon_interruptcustom event, and a working resume path. On the Built-in Agent, interrupts are temporarily unavailable.useHumanInTheLooppauses on a tool call instead. It works on every framework that supports tool calls.
When should I use this?
- Non-chat screens: dashboards, settings, forms, or anywhere you want the agent's question without the transcript.
- Your own chat: the question appears as a row in your
FlatList, or as its footer. - Testing: a fixed button grid is easier to drive from Detox or Maestro than a picker that appears after a model call.
- Custom flow control: you need to know exactly when the interrupt arrived (for example, to disable other controls) and when it was answered.
If you just want a picker in the rendered chat, use useInterrupt with the default renderInChat: true. For pauses that the model decides on, use useHumanInTheLoop.
How is this guide?