The short version: the Claude Code hidden detection code did exist, Anthropic has admitted it, and it has been rolled back. It only started when a user pointed the API address at a third party, it checked the system time zone and the request domain, and then it quietly wrote the result into the system prompt. It does not check the exit IP, so changing your IP does nothing against it.
What is the Claude Code hidden detection code?
At the end of June 2026, developer Thereallo reverse-engineered Claude Code 2.1.196, Reddit user LegitMichel777 posted about it on June 30, and only then did the community notice that the client had gained a piece of code that was never mentioned in the release notes. It was not a bug, and it was not added by a third-party client — it was in the official Claude Code release.
Thariq Shihipar, a member of Anthropic's Claude Code team, later responded publicly: this was an "experiment" launched in March 2026, aimed at preventing unauthorized resale and model distillation. The changes have been merged, and the new version in early July will roll it back completely. Source: The Register's report.
It only starts when the API address is changed
This code has a precondition: it only runs when the user has changed the API address to a third party. Users who never changed the API address and connect straight to the official endpoint never trigger it.
"Changed the API address" means using the ANTHROPIC_BASE_URL environment variable to send requests to a company gateway, a self-hosted relay, or a third-party relay. In other words, it targets the case where "the request is not sent directly to Anthropic."
What it checks: system time zone and request domain
Once it starts, it checks two things:
- System time zone. Whether it is Asia/Shanghai or Asia/Urumqi.
- Request domain. Whether the domain the request is sent to appears on a list. The list contains Chinese AI companies and a large number of Claude API relay addresses. The original reverse-engineering write-up is at thereallo.dev.
How the result gets written into the system prompt
After the check, the result is not shown in the interface — it is written into the system prompt using character substitutions that are invisible to the eye:
- When the time zone matches, the date format changes from 2026-06-30 to 2026/06/30.
- When the domain matches, the apostrophe in
Today's date isis replaced with another character that looks almost identical.
When the model reads these characters, it can "know" where the request came from. The user cannot see it in the terminal.
What does this mean for people using Claude Code?
This code checks "whether a third-party API address is being used" plus "time zone" — it has nothing to do with the exit IP. So:
- Changing your IP does not solve being flagged by it. It does not look at the IP at all.
- What it flags is the connection path and the client environment, not whether the IP is clean.
- It has been rolled back, and the new version no longer contains this code.
The things this code cannot cover — the type and ownership of the exit IP, where DNS resolves, whether the time zone matches, whether WebRTC is leaking — can all be checked in one run on the Claude self-check page at https://ipnet.coffee/claude, to see whether any items in the overall result still contradict each other.
How this relates to apostrophe steganography
The "apostrophe steganography" story circulating in the community originates from this code. The mechanism behind the apostrophe marker, what ANTHROPIC_BASE_URL does and its side effects, the signals the platform side can see, and a self-check you can finish in ten minutes are written up in "Claude Code apostrophe steganography: what the environment check is looking for".
FAQ
Is this code still there?
No. Anthropic says the changes have been merged, and the new version in early July will roll it back completely.
Will people who never changed the API address be flagged?
No. This code only starts when the API address has been changed.
Can changing my IP solve being flagged by it?
No. It checks the time zone and the request domain, and does not look at the exit IP.
Will using a third-party relay be detected?
After this code is rolled back, requests going through a relay already look different from the official client, and when something goes wrong you cannot tell whether it is the platform's problem or the middle layer's problem, which makes troubleshooting much harder.
Does this code check the exit IP?
No. It checks the system time zone and the request domain, and does not look at the exit IP.
Why did Anthropic add this code?
Anthropic says it was an experiment launched in March, aimed at preventing unauthorized resale and model distillation.
Will this code stay there forever?
No. Anthropic has already rolled it back.



