Agent Harness Outside the Sandbox: Durable Execution & Cold Starts

Mendral's blog argues that the agent harness — the loop that drives an LLM by sending prompts, executing tool calls, and feeding results back — should run outside the sandbox, especially for multi-user agents. They contrast two architectures and detail the three challenges they solved when adopting the outside model.
Two Architectures
- Harness inside the sandbox: The loop lives in the same container as the code it works on. Tool calls (bash, read, write) execute locally. Skills and memories are files on the container's filesystem. This is what Claude Code does locally. Simple execution model, but credentials are inside the sandbox, the sandbox is the session (losing it loses progress), and multi-user becomes a distributed filesystem problem.
- Harness outside the sandbox: The loop runs on the backend and calls into a sandbox over an API to execute tools. Credentials stay out of the sandbox (no permission model needed). Sandboxes can be suspended when idle, become cattle (survive failures), and multi-user sharing is a shared database problem, not a distributed filesystem one.
Three Challenges Solved
- Durable execution: Agent sessions can run hours and must survive deploys and failures. Mendral uses Inngest for checkpointing — each turn is a step, and the loop picks up where it left off if the server restarts.
- Sandbox lifecycle with low cold starts: The loop is suspended most of the time (e.g., during LLM calls). They use Blaxel to resume sandboxes from standby in ~25ms, avoiding seconds-long cold starts during interactive turns.
- Filesystem abstraction: With harness and sandbox on different machines, a shared filesystem is no longer available. Mendral notes they had to handle this, but the post focuses on the first two as the key solved problems.
The post concludes that the outside model is superior for multi-user setups despite the complexity of durable execution and cold start handling.
📖 Read the full source: HN AI Agents
👀 See Also

Inference Pricing Analysis Shows 4.4x Spread for Same Model Across Providers
Analysis of inference pricing for Llama 3.1 70B Instruct shows a 4.4x cost difference between providers, with DeepInfra at $0.20/$0.27 per million tokens and Together at $0.88/$0.88. For reasoning models, the spread reaches ~30x between DeepSeek R1 and OpenAI o1.
Claude Code v2.1.210 Fixes Worktree Isolation, Ultracode Opt-In, and Dozens of Bugs
Highlights include subagent worktree isolation fix, ultracode keyword opt-in fix, new elapsed-time counter, and permission rule deprecations.

GPU Power Consumption Deviates from Token Predictor Theory in Small LLMs
An experiment testing the 'stochastic parrot' theory on four 8B-parameter models found GPU power consumption often scales non-linearly with token count, with divergence rates ranging from 7.7% to 36.7%. The study also revealed persistent residual heat after philosophical queries and order-dependent effects.

Anthropic blocks third-party harnesses from Claude subscription limits, workaround available
Anthropic has restricted third-party harnesses from accessing Claude subscription limits, potentially disrupting workflows that rely on these tools. A Reddit user reports developing an open-source workaround after nearly losing months of training data.