本文由 AI 分析生成
Summary
Describes the three-tier Claude Code agent stack attributed to Boris Cherny (head of Claude Code): Tier 1 /loop for session-scoped daytime cadences via slash commands, Tier 2 cloud-hosted Routines for overnight cron-style runs against fresh clones, and Tier 3 /batch/dynamic JavaScript workflows that fan a task out to hundreds of worktree-isolated subagents with a maker/adversarial-reviewer split. Includes a concrete 800-agent monorepo rename example and how the tiers feed each other via shared inbox/audit files.
描述歸於 Boris Cherny(Claude Code 負責人)的三層代理堆疊:第一層 /loop 為工作階段內、日間用的固定排程指令;第二層 Routines 為雲端託管、針對全新 clone 執行的夜間 cron 式排程;第三層 /batch 與動態 JavaScript 工作流,將任務拆分給數百個以 worktree 隔離的子代理,並配置製作者/對抗式審查者分工。文中以一個 800 代理規模的 monorepo 改名範例說明,以及三層如何透過共享的 inbox/audit 檔案互相串接。
Key Points
- Tier 1
/loop: session-scoped, min 1-minute interval, up to 50 active tasks, runs slash commands from.claude/commands/, can spawn a restricted-toolset subagent via--agent=. - Tier 2 Routines: cloud-hosted against a fresh clone, no open session needed, min 1-hour interval, Anthropic adds up to 30 min of scheduling jitter.
- Tier 3
/batchand dynamic workflows: JavaScript harnesses usingagent(),parallel(),pipeline()that Claude writes on the fly; each spawned agent gets its own worktree and is adversarially reviewed by a second agent instance before results synthesize. - The tiers connect through shared state: Routines write findings to
.claude/audit/or.claude/inbox/; daytime loops read and act on that; oversized jobs get escalated to/batchor a dynamic workflow. - A real cited example: an 800-agent swarm migrating every
user.emailcallsite touser.primaryEmailacross a 4,000-file monorepo, each agent in its own worktree, running tests and a second-agent adversarial review per file. - A top comment raises a real concern (verified against the source thread, not vault-attributed fact): periodic CLAUDE.md “distiller” loops that only ever append rules compound a per-token cost across every overnight spawn, since the file is reread on every fresh clone.
Insights
The Reddit comments are part of the source material and contain unverified/skeptical claims (one accuses Cherny of inflating token spend for IPO optics) — flagged here as the kind of content that should be weighted as discussion, not fact. The CLAUDE.md-distiller cost-compounding comment is the most concretely actionable critique in the whole batch of loop-engineering clippings: a rule added once gets paid for on every single spawn forever, which argues for periodically auditing distilled rules for actual hit-rate, not just appending.
Connections
- Loops explained Claude, GPT, Mira and what actually works
- Loop Engineering The AI skill every builder needs in 2026
- Loop engineering the 14-step roadmap from prompter to loop designer.
- loop-engineering
- claude-code
Raw Excerpt
Routines write structured output to
.claude/audit/or.claude/inbox/. Loops in your morning session read from there and act on it. … The compound effect is in the system, not the model.