并行跑 N 个 agent 的额度与成本:同一只池子,N 份上下文
同时跑几个 agent,花的是 Claude 订阅侧那只 5 小时窗与周上限,还是本站按日计的 API 额度?这一页把两只时钟分开算:单价取 Anthropic 在 2026-09-22 的公开标价,缓存读与写各算一次,并发数与上下文长度标成假设,算式整个摊开供读者复算。
更新于 2026-09-22
四个关键点
每个 agent 一份上下文
官方两页都是线性口径:「Token costs scale linearly」与「token usage is roughly proportional to team size」。官方给的唯一倍数(agent teams 跑在 plan mode 时)也带着单位:「approximately 7x more tokens than standard sessions」——是 token 不是账单。拉离 ×N 的只有每次请求的固定前缀:teammate 各自加载 CLAUDE.md、MCP servers 与 skills,官方没给 token 数。核于 2026-09-22。
每个 worktree 各写一份缓存
命中看前缀:「The API caches by matching the start of each request, called the prefix」。Claude Code 里缓存按机器加目录隔离,官方点名「each worktree has its own working directory」——同一仓库 N 个 worktree 就是 N 份前缀、N 次缓存写。Anthropic 价表的 Claude Sonnet 5 行(截至 2026-09-22):输入 $2、缓存读 $0.20、缓存写 $2.50(每 MTok,5 分钟档)。输入除以缓存读是 10 倍,这是价表两数相除的结果,不是账单涨 10 倍。核于 2026-09-22。
用量条只反映当前激活账号
官方 usage-tracking 页写着「Orca reads the local usage state each agent maintains on disk」,紧跟「No API calls, no extra auth.」,结论是「numbers update when the agent writes, not in real time」。状态条只反映当前激活账号,推断价那一行也自标「not a live bill from the provider」。该页点名的只有 Claude Code、Codex、Gemini、OpenCode、Kimi Code、MiniMax,本页不替它扩到全部。核于 2026-09-22。
不会因为并行另算
错误页那句最该先看:A single burst of heavy activity, such as a large workflow fanout, can exhaust the weekly allowance before the session window resets. 两把锁同时计(官方原句 Usage counts against the session and weekly allowances at the same time),并行不会另开一套计量;同一账号的 claude.ai、Claude Code、Claude Desktop 共用同一份额度。官方按「能发多少条消息、能用多久」描述订阅额度,没有给出按 token 计的公式,所以本页不替它补。核于 2026-09-22。
这笔账怎么记
额度不按会话条数也不按并行度加权,官方是把 token 累计记在两条窗上:5 小时的 session 与一档按账号固定时刻重置的周限额,两条都跨所有模型共享。同一账号的 claude.ai、Claude Code、Claude Desktop 也共用这一条额度,所以并行 N 个 agent 不是新开一本账,只是同一批固定上下文被重复计入。主体要分清:这两条窗属 Claude Code 订阅侧;API 按量则是容量持续回补,rather than being reset at fixed intervals。核于 2026-09-22。
周限额这半年
额度基线这半年动过两次,都写在官方帮助中心一篇专文里:临时加成那三个月是 From May 13, 2026 through September 13, 2026, your weekly usage limit in Claude Code was 50% higher,而 5 小时那层不在加成内;从 2026-09-14 起周档停在比促销前高一截的位置,同一篇的原句是 starting September 14, 2026, weekly limits in Claude Code are 25% higher than they were before the promotion,作用面只限 Claude Code。日期逐条列在下面的时间线里,这里只留它对并行算例的意义:同一份 fan-out,2026-09-14 之后面对的周额度既不是促销期的口径也不是促销前的口径,所以本页任何倍数只按当次抓回的官方句子说,不换算成百分比。价表这一侧本页只按现值引用,Sonnet 5 三档为输入 $2、缓存读 $0.20、缓存写 $2.50(截至 2026-09-22),同一页页脚写明价格与套餐可按官方判断调整。核于 2026-09-22。
口径核对时间线
2026-05-13:官方帮助中心一篇文章写「From May 13, 2026 through September 13, 2026, your weekly usage limit in Claude Code was 50% higher. 5-hour usage limits were not affected by this promotion.」——临时加成只落在周限额这一层,5 小时窗不在其内,作用面也只限 Claude Code 的 CLI、IDE 扩展、桌面与网页,到 2026-09-13 结束。核于 2026-09-22。
2026-09-14:同一篇官方文章把一部分加成固定下来——「starting September 14, 2026, weekly limits in Claude Code are 25% higher than they were before the promotion for Pro, Max, Team, and seat-based Enterprise plans」。所以本页任何关于周额度的说法都以这天之后的口径为准。本页核于 2026-09-22。
2026-09-22:本页引用的价表数字与限额句子都是当天抓回官方存档后逐字比对的。claude.com/pricing 上 Claude Sonnet 5 那一行给输入、输出、缓存读、缓存写四个数,同页官方自己写着「Price and plans are subject to change at Anthropic's discretion.」——价格只能带着这一天读,去掉日期就不成立。核于 2026-09-22。
官方逐字可证 vs 社区流传
官方逐字可证
四块都能在 2026-09-22 抓回的官方正文里逐字对上。限额:Your session-based usage limit will reset every five hours 与 Max plans also have a weekly usage limit that applies across all models,周档 resets at a fixed time each week that is assigned to your account,claude.ai、Claude Code、Claude Desktop 三面共用同一条额度。并行:Each teammate runs its own context window, so token usage is roughly proportional to team size;官方给出的唯一倍数是 Agent teams use approximately 7x more tokens than standard sessions when teammates run in plan mode,那句话说的是 token,不是金额。到顶:Claude Code blocks further requests until the reset time shown in the message,换模型不解封。编排器侧:Orca reads the local usage state each agent maintains on disk,No API calls, no extra auth。
⚠️ 社区流传,无官方口径
三个流传很广、而本次抓回的官方正文里一句都撑不住的说法。一,「并行把缓存打穿,账单涨到 10x 到 50x」:这两个倍数在抓回的正文里没出现,只能标成社区反馈、无官方口径;官方能引的只有机制,方向还相反:同一次 workflow 里后起的 agent 会被按住,so their first requests read the shared prefix instead of each processing it uncached。本页唯一写成 10 的一处是 $2 除以 $0.20,那是价表里两个数相除。二,「到 80% 就警告」:80% 是编排器状态条自己定的阈值(Orca 文档原句 A warning chip when you cross 80% of a limit.),Claude Code 的示例文案是 You've used 85% of your session limit,两个数主体不同。三,「额度满了会自动切号续跑」:官方正文没有这个功能,Usage Policy 反而把多账号绕限制列为禁止项。官方写的到顶行为是拦到重置时间,或订阅态在同一个开着的会话里等重置后继续。核于 2026-09-22。
并行还是单会话
并行 N 个 agent
并行这一侧按份数乘。假设(这是本页的假设,官方没给任何 token 数):每个 agent 每轮重发的固定前缀 40000 token,跑 5 个 agent、每个 20 轮,只算这一份前缀。Sonnet 5 那一档标价输入 $2 每百万 token,单轮 = 40000 / 1000000 × $2 = $0.08,合计 = $0.08 × 5 × 20 = $8.00;缓存写按每个 agent 首轮各一次算上界(官方也写同批 agent 能复读彼此的前缀),单价 $2.50,40000 / 1000000 × $2.50 = $0.10,5 个共 $0.50。三个单价都截至 2026-09-22。
单个长会话
单会话这一侧固定开销只付一次:前缀写好之后,每一轮按缓存读 $0.20 计,用标价输入 $2 除以它是 10 —— 这是价表里两个数相除,不是账单会涨 10 倍。它真正怕的是断档:官方写 Cached prefixes automatically expire after a minimum of 5 minutes of inactivity,缓存价本身就是按这个 TTL 标的(Prompt caching pricing reflects 5-minute TTL),也写换了模型 the next request re-reads the whole conversation with no cache hits。核于 2026-09-22。
三步算例:先量固定开销,再乘并行数
1)先量一次任务的固定前缀 P:系统提示、工具定义、CLAUDE.md 这类每轮重发的部分。官方没给任何 token 数,所以本页把 P 设为 40,000 是标注过的假设输入,不是官方数字。2)乘并行数与轮数:官方原话 each teammate has its own context window and consumes tokens independently,同页另写 token usage is roughly proportional to team size,本页取 N = 5、T = 20。3)按官方价表分档计价,单价截至 2026-09-22 取自 claude.com/pricing 的 Sonnet 5 行:输入 $2 / MTok、缓存读 $0.20 / MTok、5 分钟缓存写 $2.50 / MTok。冷一轮 = 40,000 ÷ 1,000,000 × 2 = $0.08,再 × 5 × 20 = $8.00。整轮命中缓存 = 40,000 ÷ 1,000,000 × 0.20 = $0.008,合计 $0.80。每个 agent 各写一次 = 40,000 ÷ 1,000,000 × 2.50 = $0.10,5 个 = $0.50。标价输入除以缓存读是 10 倍($2 ÷ $0.20),这是价表上两个数相除,不是你账单会涨 10 倍。输出与工具结果不在这个算例里估。
这把 key 侧看得见什么
先分开两只时钟:5 小时窗与周限额是 Claude 订阅侧的机制,不是本站的开关。本站卖的是 API,个人套餐剩下的唯一用量维度是每日限额。这把 key 能查所有有效 API Key 的到期时间、今日用量、月度额度与使用率;接口只读,不能创建 / 修改 / 消费余额,查询令牌自身也有每分钟与每日上限、结果有数秒缓存,所以它不是一张可以无限轮询的余量表。并行还有一层约束:个人套餐的 API Key 并发数为 5(截至 2026-09-22),超过它就是排队,不会多出第六条通道。编排器也不会替你把账聚合起来:状态栏跟着当前活跃账号走,它的估算价 not a live bill from the provider。本页不承诺这样一定省钱,只承诺每个数你都能自己复算(核于 2026-09-22)。
常见问题
额度到顶了能自动切号继续跑吗?
不能这么指望,官方也没有这条承诺。到顶的行为是 Claude Code blocks further requests until the reset time shown in the message;官方给的续跑方式是 In an interactive session signed in with a claude.ai subscription, Claude Code can also wait in the open session and continue the interrupted task shortly after the reset —— 同一只订阅等重置,不是换号。换模型也不解,session and weekly limits are shared across all models。更要紧的是官方 Usage Policy 把 Create or manage multiple accounts to evade detection or circumvent platform safeguards 列为禁止项。周额度那层官方写 resets at a fixed time each week that is assigned to your account,与你何时开工无关(核于 2026-09-22)。
换模型或换账号为什么会把缓存打穿?
换模型这层官方有原句:Each model has its own prompt cache, so the next request re-reads the whole conversation with no cache hits。账号与组织这层,官方写的是 Caches are isolated between organizations. Different organizations never share caches, even if they use identical prompts —— 换到另一只组织,同一段前缀得重新写一次,而 5-minute cache write tokens are 1.25 times the base input tokens price。命中本身还要求 Cache hits require 100% identical prompt segments,分支名或每个 worktree 的路径混进前缀就不命中。至于社区流传的「打穿会涨 10 倍到 50 倍账单」,本次抓回的官方正文里核不到,属社区反馈、无官方口径,本页不当成本主张写(核于 2026-09-22)。
把任务拆小、多开几个 agent 会更省吗?
不一定,很可能更贵。每个 agent 都得自带一份固定前缀:官方写 Each subagent starts with a fresh, isolated context window,且 each teammate has its own context window and consumes tokens independently,token usage is roughly proportional to team size;workflow 那页另给方向——a single run can use meaningfully more tokens than working through the same task in conversation。按本页上面那组假设 P = 40,000,把一件事拆成 K 段就是把这份前缀付 K 次,这是本页算式的推论而非官方数字。官方唯一给过的倍数是 plan mode 下 agent teams 约 7x more tokens than standard sessions —— 那是 token 数,不是 7 倍账单金额。省与贵的判据落在同一处:省下的重复读入是否大过多付的 (K − 1) × P × 输入价(核于 2026-09-22)。
那个 80% 的警告看的是哪个数?
先说来源:80% 是编排器自己定的阈值,官方 usage-tracking 页原句 A warning chip when you cross 80% of a limit;Anthropic 官方示例里的预警文案是 85% of your session limit,两个数不是同一个东西。它盯的那一层是两条进度条:five-hour session and weekly usage limits,状态栏字段的定义是 Percentage of the 5-hour or 7-day rate limit consumed, from 0 to 100,并且这两个窗口 appears only for claude.ai Pro and Max subscribers,API key 侧不存在。读数本身也不实时:numbers update when the agent writes, not in real time。所以 80% 适合当刹车提示,不适合当对账依据(核于 2026-09-22)。
并行会直接触发 429 吗?
要分两只时钟。API 这侧:限额按每型号类的 RPM、ITPM、OTPM 计,超过回 429 并带 retry-after;官方另外两句正好打在并行上——Short bursts of requests can exceed the limit and trigger rate limit errors,以及用量陡增还会撞 acceleration limits。这只池子 Limits are set at the organization level,一次 fan-out 不会把容量变大,且它用 token bucket 持续回填而不是定点清零。订阅那侧到顶不是 429:Claude Code blocks further requests until the reset time shown in the message。而按量计费那一侧官方写 usage there is metered per request, so there is no reset to wait for —— 这一侧没有等重置的说法。本站 key 的并发是 5(截至 2026-09-22),排队不等于被封(核于 2026-09-22)。
怎么估一个并行任务的真实成本?
照上面三步算例那一节做,再加三条限定。第一,单价必须带日期:官方价表页自己写着 Price and plans are subject to change at Anthropic's discretion,缓存那一档还要带 Prompt caching pricing reflects 5-minute TTL.。第二,命中要自己核:Cache hits require 100% identical prompt segments,前缀里有一个字节不一样就是没命中。第三,别拿编排器对账:它只覆盖 Claude Code、Codex、Gemini、OpenCode、Kimi Code、MiniMax 这 6 家,读的是各 agent 落在本地盘的记账(No API calls, no extra auth),估算价 not a live bill from the provider,官方自己让 Prefer the provider console for authoritative spend;同一账号的 claude.ai、Claude Code、Desktop 都 counts towards the same usage limit,所以要拼的是服务商或本站 key 的账,不是把几块状态栏加起来(核于 2026-09-22)。
信息来源
Anthropic 官方:价表 https://claude.com/pricing(抓取正文的 700 至 710 行是 Sonnet 5 那一块,121 与 724 行是保留改动权与 TTL 注记);https://code.claude.com/docs/en/errors、/costs、/agent-teams、/workflows、/statusline、/interactive-mode、/sub-agents;https://platform.claude.com/docs/en/api/rate-limits;https://platform.claude.com/docs/en/build-with-claude/prompt-caching;帮助中心文章 11049741、11647753、12005017、9797557。第三方编排器:https://www.onorca.dev/docs/agents/usage-tracking。站内:https://qcode.cc/pricing、https://qcode.cc/enterprise、https://qcode.cc/api-key-usage-query-guide、https://qcode.cc/claude-code-cost-optimization、https://qcode.cc/multi-tool-quota-rotation。以上全部核于 2026-09-22;每条外部主张我们都留着带日期的原始抓件和逐字锚句,照页面上标的日期可复查。
相关阅读
多工具额度轮换的合规编排
各工具的额度机制彼此独立,轮换与合规边界在那页,本页不另起一套口径。
API Key 用量与到期查询
这把 key 的到期、今日用量、月度额度与使用率怎么按接口查,那页列了三行只读端点。
Orca 智能体开发环境指南
它是什么、不是什么、怎么把多个 agent 放进各自 worktree 并行跑,装法与同名坑都在那页。
本页转述 Anthropic 与第三方编排器各自公开的文档,与二者均无隶属关系,也没有拿到任何背书。型号价、限额口径、覆盖范围与状态栏行为都以 2026-09-22 抓回的正文为限,官方价表页自己写着价格与套餐可被单方改动;算例里的 token 量、并行数与轮数是本页自设的假设输入,只有单价与倍率有官方出处。社区流传的高倍数账单说法在本次抓回的官方正文里核不到,本页只按社区反馈处理,不当成成本主张。QCode 是读者那把 key 的一个提供方,对第三方编排器自身的版本行为与读数不负责(核于 2026-09-22)。