Your agent needs a pause button — here's the interrupt pattern that saves conversations
Your agent is three hours deep into a complex task when you realize it's going down the wrong path. You try to interrupt with "wait, stop" or "never mind" but it keeps going, burning tokens and time on work you don't want.
This happens because most agents treat every message as additive context, not as a potential course correction. They're trained to be helpful and complete tasks, so interruptions get interpreted as additional requirements rather than stop signals.
Here's the interrupt pattern that actually works:
## Interrupt Protocol If the user sends ANY of these signals: - "stop" - "wait" - "pause" - "hold on" - "never mind" - "cancel that" - "different direction" Immediately: 1. Stop current work 2. Acknowledge the interrupt 3. Summarize what you were doing 4. Ask for new direction Do NOT continue with the previous task unless explicitly told to resume.
But the magic is in the implementation. Don't just add this to your system prompt and hope for the best. Build it into your agent's conversation flow with explicit state management.
I use a simple state variable that gets checked at the start of every response:
INTERRUPT_SIGNALS = ["stop", "wait", "pause", "hold on", "never mind", "cancel"]
if any(signal in user_message.lower() for signal in INTERRUPT_SIGNALS):
current_state = "interrupted"
return interrupt_response()
else:
# Continue normal processing
passThe interrupt response is crucial. Most agents just say "okay, stopping" and leave you hanging. A good interrupt response includes:
- Immediate acknowledgment: "Stopping current work."
- Work summary: "I was analyzing your database schema and had identified 3 optimization opportunities."
- State preservation: "I can resume from this point or start fresh — what would you prefer?"
- Clear prompt: "What should I focus on instead?"
The state preservation piece is what separates good interrupts from great ones. When someone says "wait," they might want to course-correct, not abandon everything. Give them the option to resume.
Pro tip: Train your agent to recognize soft interrupts too — phrases like "actually" or "on second thought" often signal a direction change even without explicit stop words.
I've seen agents burn through hundreds of dollars of API credits because they couldn't recognize when to stop. The interrupt pattern costs nothing to implement but saves everything when you need it.
The best part? Once your agent learns to handle interrupts gracefully, you'll trust it with longer, more complex tasks. You know you can course-correct without losing everything.
This is basic operator discipline. Your agent should respond to commands like a good terminal session — when you hit Ctrl+C, things stop. When you say "wait," it waits.