Rehearse the fallback, not the happy path: what an agent's sandbox has to run
Published · Updated
Extensive testing in sandboxed environments is the easy sentence to nod at. For an agent publishing 8 articles a day with 0 manual intervention, the sandbox is where the failure paths get exercised.
Anthropic's guidance on agents closes with a line that is easy to agree with and hard to budget for: extensive testing in sandboxed environments, along with the appropriate guardrails. For a pipeline that publishes 8 SEO articles a day with 0 manual intervention, a sandbox is not a pre-launch ritual. It is the only place where the paths that matter most, the ones that exist for failure, run often enough to be trusted.
The sandbox is where you spend the token multiple deliberately
In Anthropic's data, agents typically use about 4× more tokens than chat interactions, and multi-agent systems about 15× more. The multiple applies to rehearsal as well as production, because a sandbox run of a real agent exercises the same dynamic tool usage: agents are systems where the model directs its own processes and tool usage. Workflows orchestrated through predefined code paths are cheaper to exercise. Choosing which steps are agentic also sets the price of testing them.
Rehearse the paths that only exist for failure
The personal media platform we built runs AI-written articles with resilient multi-model fallback across 3 fallback levels. In a healthy week, the first level may handle everything, which leaves the other paths unexercised in production by definition. Anthropic combines the adaptability of agents with deterministic safeguards like retry logic and regular checkpoints. A safeguard that never fires under test is an assumption, so force each fallback level and each retry branch in the sandbox on a schedule.
A stopping condition should be hit, not just configured
Stopping conditions such as a maximum number of iterations are common precisely to maintain control, and the autonomous nature of agents brings higher costs and the potential for compounding errors. Both only become observable when the limit is actually reached. A sandbox run that tops out at the iteration cap shows you what the agent leaves behind: a half-finished draft, a claimed row, an incomplete translation. That residue is the thing to design. The cap is the easy part.
Resumption is testable, not hopeful
Rather than restarting from scratch, Anthropic built systems that can resume from where the agent was when the errors occurred, with agents summarising completed work phases and storing essential information in external memory before proceeding to new tasks. That design is directly testable: interrupt the process mid-phase, restart it, and compare what gets re-executed against what should be. At 8 publications a day in 7 languages, a bad resume appears as duplicate output rather than as an error.
What a sandbox cannot establish
Rehearsal demonstrates behaviour, not entitlement. An agent that passes every sandbox run can still be over-permissioned, and the root cause of excessive agency is typically one or more of excessive functionality, excessive permissions or excessive autonomy. None of the three is visible from output quality. Implement authorisation in downstream systems rather than relying on an LLM to decide whether an action is allowed, and use rate-limiting to reduce how many undesirable actions can occur in a given period.
Let the cadence write the rehearsal list
The four-market platform is deployed across 4 country domains in 7 languages, publishing 8 SEO articles every day with 0 manual intervention. That shape is the sandbox agenda: a publishing path per domain, a generation path per language, every fallback level, the iteration cap, and the interrupt-and-resume case. Where an action is high-impact and irreversible, human-in-the-loop approval keeps it off the unattended daily path instead of relying on rehearsal to catch it.
Treat the sandbox as a standing environment with its own schedule rather than a gate crossed once before launch. Give it a list derived from the production cadence, run the failure branches on purpose, and keep the artefacts each interrupted run leaves behind, because those are the states an unsupervised agent will eventually produce on its own. The guardrails you have never watched fire are documentation, not controls.
Takeaway
Sources
Anthropic — Building effective agents — https://www.anthropic.com/engineering/building-effective-agents
Anthropic — How we built our multi-agent research system — https://www.anthropic.com/engineering/multi-agent-research-system
OWASP Gen AI Security Project — LLM06:2025 Excessive Agency — https://genai.owasp.org/llmrisk/llm062025-excessive-agency/
Neurolinks case study — Four markets, one codebase — https://neurolinks.be/work/tatano-energy
Neurolinks case study — A personal brand that publishes itself — https://neurolinks.be/work/matthieu-pesesse-media
Working on a project where these methods apply?