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 upon completion; interrupt during tool execution gets a placeholder tool result (“tool running in background”); interrupt during thinking discards unwritten reasoning; non-urgent events are queued. Risk: model may hallucinate result of unfinished tool – it hasn’t been trained on the “result not yet arrived” situation.
Related: [Event-driven Asynchronous Agent], [ReAct Cycle]