Problem Statement
Interrupts are currently only available for tools in one specific hook (AfterToolCallEvent). This limits the ability to implement checkpointing and branching capabilities at other points in the agent lifecycle. We need the ability to interrupt agent execution from any hook event to support advanced durability patterns.
Proposed Solution
Extend the interrupt mechanism to all hook events (e.g., BeforeModelInvocationEvent, AfterModelInvocationEvent, BeforeToolCallEvent, AgentInitializedEvent, etc.). This would allow hook implementations to signal an interrupt at any point in the agent execution flow.
Use Case
We are building a durability plugin that provides checkpointing and branching capabilities for Strands agents. To implement this, we need to be able to pause agent execution at various points—not just after tool calls. For example:
- Checkpoint before a model invocation to preserve state
- Interrupt before a tool call to implement approval workflows
- Branch execution paths based on conditions evaluated at different lifecycle stages
Alternatives Solutions
We have implemented workarounds by manipulating internal state, but this is fragile and not officially supported.
Additional Context
No response
Problem Statement
Interrupts are currently only available for tools in one specific hook (AfterToolCallEvent). This limits the ability to implement checkpointing and branching capabilities at other points in the agent lifecycle. We need the ability to interrupt agent execution from any hook event to support advanced durability patterns.
Proposed Solution
Extend the interrupt mechanism to all hook events (e.g., BeforeModelInvocationEvent, AfterModelInvocationEvent, BeforeToolCallEvent, AgentInitializedEvent, etc.). This would allow hook implementations to signal an interrupt at any point in the agent execution flow.
Use Case
We are building a durability plugin that provides checkpointing and branching capabilities for Strands agents. To implement this, we need to be able to pause agent execution at various points—not just after tool calls. For example:
Alternatives Solutions
We have implemented workarounds by manipulating internal state, but this is fragile and not officially supported.
Additional Context
No response