这他*的真是宝藏 Anthropic 刚刚分享了 Claude Code 最实用的技巧之一。 思路是:Haiku 5.5 在上下文达到 100k 时会出现价格断崖。超过这个门槛,每个 token 的费用就会变成 5x。所以,绝不让智能体达到这个门槛。 同样的工作,两种做法:一个大智能体原本要花 $6.15。用 9 个小智能体,最终花了 $0.85。完全相同的任务,节省了 86%。 只需这样启动 Claude Code: claude --model opus # agents: model: haiku, each < 100k 分工如下: → Opus 5.5 负责统筹,把工作拆成多条并行任务线,最后合并 → Haiku 5.5 智能体完成其余所有工作,每个都保持在 100k 以下 → 当一个智能体接近门槛时,就拆成两个,而不是继续膨胀 → Opus 读取 9 份摘要,从不读取智能体的原始上下文 关键数字:在 100k 以下,Haiku 每百万 token 的输入价格为 $0.10,输出价格为 $0.50。超过 100k 后,就会跳到 $0.50 和 $2.50。 同样的模型,同样的 token,账单却变成 5x,而且发生时没有任何提醒。 这次运行中,a4 已到 90k,还剩 10k;a7 已到 84k,还剩 16k。两者都在越过门槛之前进行了拆分。a11 以 41k 的全新上下文启动,使用低价档。 9 个智能体,6 次拆分,结果还是恰好有 1 个越过了界限。就是这一个智能体,让账单从 $0.40 变成了 $0.85。 缓存读取也计入 100k,这正是大多数人踩坑的地方。 Opus 统筹。Haiku 集群协作。谁都不越过价格断崖。 JEV 工程是在更下一层做同样的事:这次运行中的 1,900 个分支决策——拆分还是保留、选择哪个智能体、重试还是停止——都在代码中以 0.93 的锐度得到处理,而锐度为 0.42 的拆分或保留决策,恰好就是触发拆分的位置 完整结构树 ▸ Opus 5.5 主导会话,拆分工作,并在最后合并 ▸ 每个子智能体都运行 Haiku 5.5,上下文硬上限为 100k ▸ 接近 100k 的智能体会拆成两个,而不是继续增长并超过上限 ▸ 每个分支只重新读取它真正需要的上下文 ▸ Opus 5.5 只读取摘要,从不读取智能体的原始上下文 ▸ JEV 在代码中处理微型分支决策,只将需要拆分的情况上报 把这棵结构树和这段提示词粘贴到 Claude Code 中 ↓ “围绕这棵结构树重建我的 Claude Code 配置: 1. 主会话使用 Opus 5.5 作为负责人:拆分工作、合并结果,不编写代码。 2. 将每个子智能体设为 Haiku 5.5,上下文硬上限为 100k,包含缓存读取。 3. 当一个智能体接近 100k 时,将它拆成两个智能体,而不是任由其增长。 4. 每个分支只重新读取所需的上下文,绝不读取完整历史。 5. 向 CLAUDE.md 添加一条规则:任何智能体都不得超过 100k,没有例外。 6. 将确定性的分支决策(拆分还是保留、智能体选择、重试)交由 JEV 处理。 先以差异对比形式向我展示每一项改动。在我说开始之前,不要进行任何编辑。” ↳ http://code.claude.com/docs/en/model-config 保存下来,这一行就值你账单的 86%。
看原文
THIS IS ACTUAL F*CKING GOLD Anthropic just shared one of the best tricks for Claude Code. The idea: Haiku 5.5 has a price cliff at 100k context. Cross it and every token costs 5x more. So you never let an agent get there. Same work, two ways: one big agent would have cost $6.15. Nine small ones came out at $0.85. That is 86% saved on the exact same job. You just launch Claude Code like this: claude --model opus # agents: model: haiku, each < 100k here's the split: → Opus 5.5 leads, splits the work into lanes and merges at the end → Haiku 5.5 agents do everything else, each one kept under 100k → when an agent nears the cliff it forks in two instead of growing → Opus reads 9 summaries, never raw agent context the numbers that matter: under 100k Haiku is $0.10 in and $0.50 out per million. over 100k it jumps to $0.50 and $2.50. same model, same tokens, 5x the bill, and nothing warns you when it happens. in this run a4 was at 90k with 10k left and a7 at 84k with 16k left. both got forked before they crossed. a11 started fresh at 41k on the cheap tier. 9 agents, 6 splits, and exactly 1 crossed the line anyway. that one agent is the reason the bill was $0.85 instead of $0.40. cache reads count toward the 100k too, which is what catches most people out. Opus leads. Haiku swarms. Nobody crosses the cliff. JEV engineering is the same move one layer down: 1,900 forks this run - split or keep, which agent, retry or stop - resolved in code at 0.93 sharpness, and the split-or-keep call at 0.42 is exactly where a fork gets triggered the full tree ▸ Opus 5.5 leads the session, splits the work and merges at the end ▸ every subagent runs on Haiku 5.5 with a hard 100k context ceiling ▸ an agent nearing 100k forks in two instead of growing past it ▸ each fork re-reads only the context it actually needs ▸ Opus 5.5 reads summaries only, never raw agent context ▸ JEV resolves micro-forks in code and escalates only the split ones paste the tree and this prompt into Claude Code ↓ "Rebuild my Claude Code setup around this tree: 1. Run the main session on Opus 5.5 as lead: split work, merge results, write no code. 2. Set every subagent to Haiku 5.5 with a hard context ceiling of 100k, cache reads included. 3. When an agent approaches 100k, fork it into two agents instead of letting it grow. 4. Each fork re-reads only the context it needs, never the full history. 5. Add one rule to CLAUDE.md: no agent is ever allowed to cross 100k, no exceptions. 6. Route deterministic forks (split or keep, agent choice, retries) through JEV. Show me every change as a diff first. No edits until I say go." ↳ http://code.claude.com/docs/en/model-config save it, this one line is worth 86% of your bill.