HERMES.md in commit messages causes requests to route to extra usage billing
HERMES.md in commit messages causes requests to route to extra usage billing
Git 提交信息中的 HERMES.md 导致请求被错误计入额外使用费而非套餐配额
Summary
When a git repository’s recent commit history contains the case-sensitive string HERMES.md, Claude Code routes API requests to “extra usage” billing instead of the included Max plan quota. This silently burned through $200 in extra usage credits while my Max 20x plan capacity remained largely untouched (13% weekly usage).
摘要
当 Git 仓库的近期提交历史中包含区分大小写的字符串 HERMES.md 时,Claude Code 会将 API 请求路由至“额外使用费”(extra usage)计费,而非扣除已包含的 Max 套餐配额。这导致我的 200 美元额外使用额度在不知不觉中被耗尽,而我的 Max 20x 套餐容量却几乎未被使用(每周仅消耗 13%)。
Environment
- Claude Code v2.1.119
- macOS (Apple Silicon)
- Max 20x plan ($200/month)
- Model: claude-opus-4-6[1m] (also reproduces with claude-opus-4-7)
环境
- Claude Code v2.1.119
- macOS (Apple Silicon)
- Max 20x 套餐(200 美元/月)
- 模型:claude-opus-4-6[1m](在 claude-opus-4-7 中同样可复现)
Reproduction
The trigger is the string HERMES.md in git commit messages — not the presence of a file with that name on disk. Claude Code includes recent commits in its system prompt, and something server-side routes the request differently when this string is present.
复现步骤
触发该问题的关键在于 Git 提交信息中包含字符串 HERMES.md,而非磁盘上存在同名文件。Claude Code 会将近期提交记录包含在系统提示词(system prompt)中,而服务器端在检测到该字符串时,会以不同的方式路由请求。
Impact
- $200.98 in extra usage credits consumed for requests that should have been covered by the included Max 20x plan quota.
- Multiple projects became completely unusable once extra usage was depleted, while the plan dashboard showed 86%+ remaining weekly capacity.
- The error message (“out of extra usage”) gives no indication that content-based routing is the cause, making this extremely difficult to diagnose.
- Any user with
HERMES.mdin recent git commits would silently have their usage billed to extra credits.
影响
- 本应由 Max 20x 套餐配额覆盖的请求,导致了 200.98 美元的额外使用费扣除。
- 一旦额外额度耗尽,多个项目便完全无法使用,尽管套餐仪表盘显示每周配额仍有 86% 以上的剩余。
- 错误提示(“out of extra usage”)未提供任何关于“基于内容路由”导致问题的线索,使得该问题极难排查。
- 任何在近期 Git 提交中包含
HERMES.md的用户,其使用量都会在不知情的情况下被计入额外额度。
Expected behavior
API request billing should not depend on the content of git commit messages in the system prompt. All requests from a Max plan subscriber should route to the included plan quota first.
预期行为
API 请求的计费不应依赖于系统提示词中 Git 提交信息的内容。所有来自 Max 套餐订阅者的请求应优先路由至套餐配额。
How I found this
Systematic binary search: cloning affected repos, testing orphan branches, then isolating individual commit message strings until HERMES.md was identified as the exact trigger.
排查过程
系统性的二分查找:克隆受影响的仓库,测试孤立分支(orphan branches),然后逐一隔离提交信息字符串,最终确定 HERMES.md 是导致问题的确切触发点。