Interrupts and Placeholders
How to fit asynchronous interrupts into a synchronous format: normally the LLM sees an ideal synchronous trajectory; only on interrupt is a placeholder inserted.
Rules:
- assistant message is written immediately;
- tool result is written upon completion;
- interrupt during tool execution gets a placeholder tool result (“tool is running in the background”);
- interrupt during thinking discards unwritten reasoning;
- non-urgent events are queued.
Risk: the model may hallucinate the result of an unfinished tool – it hasn’t been trained on the “result not yet arrived” situation.
Related: Event-driven asynchronous agent, ReAct cycle