Interruptible Agents
In this article
- Explain why a Cancel button should store a request that the agent checks at a safe point, instead of killing the work.
- Decide the final state and the one-line message for a cancel during a read, during a pending approval and after a confirmed write.
- Explain why a cancel can arrive too late, and why a double click is harmless.
- Tell an interrupt, a pause and a takeover apart, and say why a takeover must freeze the agent first.
- Terms defined here: safe cancellation point, takeover.
Overview
You press Cancel on an agent that is halfway through a refund. What has already happened when the click lands, and what should still stop? We will press it at three moments of one run: a made-up online shop's support agent refunding 250.00 EUR on order O-2042, which looks up the order, issues the refund once a manager approves, then emails the customer.
After this you can design cancel so it stops the agent cleanly, choose the final state and the one-line message for each moment, and explain how a human can step in without the agent acting at the same time.
Sign in to keep reading
The rest of this article opens with an account. An account also keeps your progress and quiz results on every device, and lets you follow news for up to five topics.
Still to read in this article
- Why a kill is the wrong cancel
- A stop message races the work
- A durable cancel intent
- Three moments to press Cancel
- What the message must say
- Interrupt, pause, takeover
- The rule at work
- Common mistakes
- In production
- Sources
- Check yourself, 13 questions