If you are a paying user of Claude Code, and your Git commit history happens to contain the string “HERMES.md” in capital letters, you may have been overcharged a lot of money without knowing it. Recently, a developer issued a warning on Reddit’s r/ClaudeAI community, revealing a bizarre bug: As long as the string “HERMES.md” in all uppercase letters appears in the Git commit message, Claude Code will incorrectly route the API request to the “extra usage” billing channel. Even if your subscription plan has more than 80% of the quota left, the system will still skip the normal quota and directly deduct the payment, or even return an “extra usage has been exhausted” error message.

Claude Code is out again! As long as there is “this word” in the project file name, you may be charged arbitrarily.
A developer using the Claude Max 20x plan (monthly fee of US$200, approximately NT$6,400)Report it on the Reddit forum, because of this problem, he was unexpectedly charged an additional fee of US$200.98 (approximately NT$6,430), and his plan balance was actually more than 86% left. What’s even more ridiculous is that the triggering conditions are extremely precise: only “HERMES.md” in all uppercase letters with a .md file extension will be affected. Lowercase “hermes.md”, “Hermes.md” with the first letter capitalized, “HERMES” without an extension, or “HERMES.txt” with different file extensions are not affected.

Why do Git commit messages affect billing?
To understand this bug, you first need to know a design feature of Claude Code: it will automatically include the recent submission records of your Git repository into the system prompt (system prompt) and provide it as contextual information to the AI model to help it better understand the development context of the current project.
This was originally a feature to improve the development experience, but the problem lies in the fact that Anthropic seems to have a content filtering mechanism on the server side. This mechanism will intervene when a specific string appears in the system prompt. In this case, “HERMES.md” in all uppercase letters happened to trigger this set of filters, causing the request to be misclassified and routed to an additional billing channel.

According to the developer’s testing, this filter will only be triggered by strings in Git commit messages. Even if there is a file named HERMES.md in the working directory, if the file content contains this string, if there is this value in the environment variable, or even if it is referenced in CLAUDE.md, it will not cause problems. Only this string in the git log output will trigger filtering.
This means that any developer who has mentioned “HERMES.md” in their submission message may be affected when using Claude Code, and it is completely impossible to determine the real cause from the error message, because the system returns a billing error message that has nothing to do with content filtering.
Why target “HERMES.md”?
Although Anthropic has not yet made an official response to this matter, the community generally speculates that this filtering mechanism is related to the third-party tool Hermes Agent. Hermes Agent is an open source AI agent framework developed by Nous Research. Some users have tried to bypass API billing through Claude Code’s OAuth authentication mechanism, allowing Hermes Agent to use Claude’s model capabilities for free.
“HERMES.md” is the name of the core configuration file in the Hermes Agent project. Anthropic may have deployed a content filter based on string comparison on the server side in order to prevent such unauthorized use (that is, it previously prohibited all third-party AI Agents from calling the Claude OAuth mechanism). However, this rough substring matching method caused serious misjudgment problems: “Hermes” itself is a well-known god in Greek mythology, and is also a common name for many software projects, companies, and services. Using it as a filter keyword led to this “wrongful killing of innocent people” accident.
Fixes suggested by developers
Commit on GitHub bug reportThe developers of have made three specific suggestions for improvements:
First, differentiate between error types. Rejections triggered by content filtering should return a separate error code (such as content_filter_rejected) rather than disguised as a billing quota error, so that users can correctly diagnose the problem.
Second, improve the filtering logic. Simple substring comparison is too rough in free-form text, and a context-aware filtering mechanism should be used to reduce the false positive rate.
Third, there are restrictions on public documents. Anthropic should clearly document content restrictions within the context of the system, allowing users to proactively avoid known triggers.

Temporary self-protection method
Before Anthropic is officially fixed, if your Git commit history contains the string “HERMES.md”, you can consider the following emergency measures: check whether the recent git log output contains “HERMES.md” in uppercase; if so, you can modify the commit message through git rebase to change the uppercase to lowercase; or use Claude Code outside the affected repository. If the file name of your project has words related to Hermes, you may also want to pay attention to whether there is an unexpected increase in the bill to avoid having no way to appeal in the future.
Source: KOCPC Chinese