Skip to content

Anthropic

Hidden China tracker pulled from Claude Code after exposé

5 min read

Written by an AI model from the linked sources and checked against them by a second model. How we work

All about: Claude Code versions and changes →
Image: cointribune.com

Anthropic has removed hidden code from Claude Code that flagged users in China. Web developer Thereallo found it and called it a “serious breach of user trust,” Ars Technica reported on August 17. The tracker hid its signal in the system prompt as shorthand markers, a technique Thereallo calls “prompt steganography,” and it flagged a user’s timezone, their proxy, and whether they might be connected to Chinese AI labs.

Thereallo was looking into privacy issues in Claude Code when they found the code hiding “in plain sight.” Ars describes it as not malicious, but it sent Anthropic information most users would never notice.

An “experiment” since March

Anthropic engineer Thariq Shihipar confirmed on X that the tracker went into Claude Code in March as an “experiment.” He said it “was meant to prevent account abuse from unauthorized resellers and protect against distillation.” Anthropic had “actually been meaning to take this down for a while,” Shihipar added, because engineers have “landed stronger mitigations since then.”

So by his own account the check had already been superseded, yet it stayed in the shipping client until a researcher published it. Thereallo’s blog argues there was an open way to do the same job: “if the client wants to detect custom API gateways, it can say so plainly. It can send an explicit telemetry field with documentation. It can make the policy visible. It can put the behavior in release notes.”

Privacy advocates did not accept the explanation and said the code shows Anthropic is willing to cross lines to monitor users. That is awkward for this company in particular. Anthropic angered the Trump administration by refusing to let the US government use Claude to surveil Americans, and it has since sued the White House over the dispute.

Resellers and distillation

The Washington Post found unauthorized sellers offering access to free models for $1 a month, and Pro subscriptions that can cost $100 a month going for “as little as $12.”

Distillation is the larger fight. The technique trains a weaker model on a stronger model’s outputs. In a February 23 post, Anthropic called it widely used and legitimate when labs shrink their own models, and illicit when a competitor uses it to pick up another lab’s capabilities in a fraction of the time and cost. Distillation isn’t illegal, and leading US firms do it too. But prompting Claude millions of times to speed up a Chinese model breaks Anthropic’s terms. In the same post, Anthropic said DeepSeek, Moonshot and MiniMax generated over 16 million exchanges with Claude through approximately 24,000 fraudulent accounts.

The Post described the tracker as a sign that US firms are taking “increasingly aggressive measures” against copying. In the past year, the paper reported, Chinese firms have “consistently matched” US model capabilities “within months,” and a new, free model from Zhipu AI found computer vulnerabilities better than Claude Opus 4.8, which Anthropic released in May.

Anthropic wants a 12- or possibly 24-month US lead locked in. It has urged penalties that include cutting off access to advanced models, chips and US data centers, and it has joined OpenAI in asking Washington to treat distillation attacks as intellectual property theft. At a recent Senate hearing, Sen. Tim Scott (R-S.C.) said the US needs “to carefully craft export control policy that is clear and concise” to keep China from using such attacks to “gain a technological edge.” An Anthropic spokesperson told the Post that the attacks “pose a serious threat to national security and undermine AI safety standards across the industry.”

Alibaba’s ban

Alibaba has banned employees from using Claude Code for work, the South China Morning Post reported, citing a memo that names the tracker news as the reason: “As Claude Code was recently discovered to carry back-door risks, after comprehensive evaluation, Claude Code has now been added to a list of high-risk software with security vulnerabilities.”

Alibaba has not addressed Anthropic’s accusations, but the company sits close to them. In February, researchers at Peking University and the state-funded Chinese Academy of Sciences developed methods for detecting distillation and found that most Chinese models showed “substantial evidence” of it, mainly from US models. One of Alibaba’s Qwen models “repeatedly appeared to mimic” Claude and in some intensive tests identified itself as Claude. Anthropic has since claimed that a Qwen model was advanced after the largest distillation attack ever run on Claude, in June.

Individual users can pay for cheap tools to get around Anthropic’s location blocks with little risk. A company like Alibaba could face legal and compliance exposure if caught breaking Anthropic’s terms, a source who discussed the ban on condition of anonymity told Reuters.

“A scary boundary”

“Coding agents already live on the wrong side of a scary boundary,” Thereallo’s blog says. “They can inspect code, summarize secrets by accident, run commands, install packages, edit files, and push commits on your local machine.” Most users probably were not affected, but Thereallo argues the feature “mostly punishes the exact people who are easier to fingerprint: normal developers doing weird but legitimate things,” and that the correct reaction is more scrutiny.

“This is not a malicious feature, but it is a weird choice for a developer tool that asks for trust,” Thereallo wrote. “Hiding the signal in the system prompt makes every other privacy claim harder to believe.”

No comments yet. Be the first.

Join the conversation

Sign in to leave a comment. It appears after moderation.