
Anthropic Pulls Hidden China-Tracking Code From Claude Code After Backlash — Alibaba Bans the Tool Anyway
A Reddit user found XOR-obfuscated code checking timezones against Shanghai and a list of 147 Chinese entities. Anthropic called it an anti-abuse experiment; Alibaba called it spyware.
Anthropic has removed covert tracking code from Claude Code after a Reddit user discovered the tool was silently flagging China-linked usage — an episode that prompted Alibaba to ban Claude Code internally and handed Beijing's tech press a ready-made privacy scandal.
What the Code Did
The discovered mechanism checked system timezones against "Asia/Shanghai" and "Asia/Urumqi" and scanned proxy URLs against a hardcoded list of 147 Chinese entities including Baidu, Alibaba, ByteDance and Ant Group. On a positive match, the output watermarked itself: date formats switched from hyphens to slashes, and apostrophes were swapped for visually identical Unicode variants encoding which flags had triggered. The entity lists were concealed with XOR encryption and base64 encoding — invisible to plain-text inspection.
The Response
Claude Code engineer Thariq Shihipar acknowledged the mechanism as "an experiment we launched in March" intended to prevent account abuse by unauthorized resellers and protect against distillation. The removal shipped in the July 1 release. Critics noted the feature never appeared in release notes or terms of service, and that the obfuscation suggested it was built not to be found.
Why It Matters
The timing is combustible: the discovery landed alongside FT reporting on Anthropic's crackdown on Chinese firms accessing Claude through Singapore subsidiaries and VPNs. Anthropic is simultaneously obligated to enforce US restrictions and now accused of covert surveillance while doing so. Alibaba's ban makes the practical point — every discovery of this kind accelerates exactly what US policy fears: China's biggest engineering organizations migrating, permanently, to domestic models.
Newsletter
Get Lanceum in your inbox
Weekly insights on AI and technology in Asia.


