Tool retries and compensating actions
1 Jul 2026 · 6 min read
Production tool execution needs retry rules plus compensating actions when an operation partially succeeds.
External tools fail in partial ways. A runner should know whether to retry, verify, compensate, or halt.
AstraRunner treats this as an execution-platform concern: the run needs durable state, traceable decisions, cost visibility, and enough structure for teams to review what happened after the agent finishes.
Patterns that work
- Classify tool failures by retry safety.
- Verify external state after timeout.
- Use compensating actions for reversible side effects.
- Escalate irreversible ambiguity to humans.
Implementation checklist
- Define compensating action per write tool.
- Store external operation IDs.
- Require approval before destructive compensation.
- Test partial-success scenarios.
Watch outs
- Compensation is not always a true rollback.
- Retries can duplicate effects without idempotency.
- Ambiguous external state should not be guessed by the model.
Related reading
How this fits the Astra stack
AstraRunner owns the operational path for agent work: orchestration, scheduling, approval gates, traces, costs, and role-agent handoffs. AstraMemory owns durable context and retrieval. AstraGenie turns those capabilities into product workflows for teams that want automation without rebuilding the platform layer.