Skip to main content

Shepherd: Forking Meta-Agents 5x Faster Than Docker with Typed Traces

1 min read

Shepherd: A Runtime Substrate for Meta-Agents with Git-Like Execution Traces

Meta-agents—systems that supervise, optimize, or evolve other agents—require efficient ways to replay, fork, and modify execution histories. Current approaches rely on slow containerization like Docker, which hinders rapid iteration, and fail to reuse expensive prompt caches across reruns. This limits debugging long agent runs and scaling techniques like counterfactual optimization or RL training.

Shepherd formalizes meta-agent operations as pure functions mechanized in Lean, a theorem prover. Every agent-environment interaction becomes a typed event in a Git-like execution trace. This trace enables precise forking and replay of any past state. Key innovation: forking the agent process and filesystem is 5× faster than Docker, with over 95% prompt-cache reuse on replay.

Demonstrations show concrete gains:

  • Runtime intervention: A supervisor agent boosts pair-coding pass rates from 28.8% to 54.7% on CooperBench.
  • Counterfactual meta-optimization: Branching exploration beats baselines by up to 11 points across four benchmarks, cutting wall-clock time by 58%.
  • Tree-RL training: Forking rollouts at key turns lifts TerminalBench-2 from 34.2% to 39.4%.

For builders, Shepherd unlocks practical workflows. Prototype agent behaviors by forking traces instead of restarting from scratch. A/B test supervisor logic on live runs. Accelerate agent development cycles without the overhead of full replays. Open-sourced, it lowers the barrier to meta-agent experimentation.

Builder takeaway: Next time you'''re building a multi-agent system, log interactions as typed events for forking. Integrate Shepherd to slash iteration time—start with their runtime supervisor for coding agents.

Source: Simon Yu, Derek Chong, Ananjan Nandi, Dilara Soylu, Jiuding Sun, Christopher D. Manning, Weiyan Shi — ArXiv cs.AI, May 2026

PDF | arXiv

Get Updates

New posts on systems thinking, AI, and building things. No spam, unsubscribe anytime.

By subscribing, you agree to receive occasional emails. You can unsubscribe at any time.

What should I write about?

Got a topic you'd like me to cover? I read every suggestion.

More in Blog