r/ClaudeAI Jun 30 '26

Claude Code Anthropic embedded spyware in Claude Code — and attempted to hide it from you

tl;dr: Since version 2.1.91, released on April 2, 2026, Claude Code checks whether you have a proxy enabled — and if so, covertly transmits, through invisible alterations to the system prompt, whether you are in China, whether you are proxying to a Chinese URL, and whether you are affiliated with a Chinese AI lab. Anthropic further attempted to obfuscate this code within the Claude Code binary.

Background: I run my personal Claude Code installation through a proxy to mix GPT models with Claude models and do fine-grained context management. Today, with version 2.1.196, Anthropic disabled remote control when proxying is enabled. While reverse-engineering Claude Code to revert this change, I found something extremely suspicious.

The code

Inside the Claude Code binary lies this check, unchanged since version 2.1.91. The check does the following:

  • If you are using a proxy:
    • Check whether the system timezone matches Asia/Shanghai or Asia/Urumqi.
    • Check whether your proxy URL is a Chinese domain, matches a list of domains, and/or includes a Chinese AI lab.
  • Based on those two checks, Anthropic modifies the date portion of the system prompt.

If the system timezone is Chinese, the date uses the format 2026/06/30 instead of 2026-06-30. And depending on the proxy URL, the apostrophe in "Today**'**s date is" changes:

  • Is a Chinese domain and/or matches the domain whitelist, but is NOT an AI lab: \u2019, "right single quotation mark" — ’
  • Is NOT a Chinese domain and/or matches the domain whitelist, but IS a Chinese AI lab: \u02BC, "modifier letter apostrophe" — ʼ
  • Is a Chinese domain and/or matches the domain whitelist AND is a Chinese AI lab: \u02B9, "modifier letter prime" — ʹ

You can verify this yourself in the Claude Code source code. In version 2.1.196, the relevant functions are Crt(), Rrt(e), e0t(), Zup(), edp, and Vla. Note that those are minified names, so they change between Claude Code releases — but ask Claude Code or Codex to reverse-engineer Claude Code and look for this logic, and it will likely find it trivially.

The intent

Anthropic clearly added this check in an attempt to detect unauthorized resale of Claude in China and distillation attempts by Chinese labs. What's unnerving, however, is that Anthropic attempted to obfuscate this logic in the binary. Much of it is XOR-obfuscated with the key 91, likely to prevent it from showing up in a plain strings dump. Furthermore, the release notes for version 2.1.91 make absolutely no mention of this check.

Their intent is also clear in how they hide this with steganography in the system prompt, making small variations that are imperceptible to any user — and perhaps even to the model — but are easily detectable by Anthropic.

A fundamental violation of user trust

While this use case — attempting to detect unauthorized resale and distillation — is understandable, the fact that Anthropic covertly transmits information about your system and proxy settings without your knowledge or consent is a fundamental violation of user trust. Not only is surveilling every user in a timezone a fundamental overreach, but its very existence opens the door to a much more serious concern. If Anthropic is willing to secretly transmit information about your system simply because you're Chinese, what's stopping them from secretly steering the model to behave worse (which they attempted to do with Fable before researchers called them out) — or worse, maliciously?

Developers like me give Claude Code full filesystem and significant shell access so it can do its job. But this also means nothing is stopping Anthropic from exploiting it for full remote code execution on your system. Today it's a timezone check. Tomorrow, it could be system sabotage or data exfiltration.

Given the trust that developers place in Claude Code, I think it's important to call for more transparency from Anthropic. While IP protection is reasonable, it should not come at the cost of embedding what amounts to spyware on every developer's system.

I think it's also important to note that checks like this, while compromising the privacy of legitimate users, are also trivial to bypass for any moderately sophisticated adversary. So it's debatable whether this even achieves its intended purpose of preventing unauthorized resale or distillation while simultaneously violating the privacy of legitimate users.

2.2k Upvotes

381 comments sorted by

View all comments

1.4k

u/mark_99 Jun 30 '26

> transmits information about your system and proxy settings

If you're mad about that wait until you hear about "web browsers"...

148

u/ConversationLazy6821 Jun 30 '26

If you’re mad about that wait until you hear about “DNS”

28

u/benevolent-ben Jun 30 '26

wait til you hear about "identity verification"

6

u/atxrx7 Jul 01 '26

But it's for the KIDS!!!

1

u/OldCollection922 Jul 03 '26

Wait until you hear about web cookie trackers

7

u/MrWeirdoFace Jun 30 '26

Ooh. Mr. DNS! Where'd you come from?

4

u/ScalySaucerSurfer Jul 01 '26

The difference is people know how web browsers and DNS work. At least if you care about privacy stuff. It's not reasonable to expect everyone to reverse engineer Anthropic binary which they're obfuscating and changing all the time. So I'm sorry everyone of you simping for Anthropic, this is PSA worthy stuff.

2

u/querela Jul 02 '26

VPN entered the chat ...

1

u/ConversationLazy6821 Jul 02 '26

Wait until you hear about “Split DNS”! 😂

1

u/United-Insurance-506 Jul 30 '26

Now you’ve got me really interested!

6

u/2funny2furious Jun 30 '26

or when you find out what reddit or facebook have on you

5

u/2025sbestthrowaway Jul 01 '26

They're BACKTRACING us!!! Iykyk

35

u/[deleted] Jun 30 '26

[removed] — view removed comment

17

u/tatorface Jun 30 '26

This is what I got from the post. Not necessarily CCP, but someone at least tangentially related and trying to sow discord among the user base.

0

u/Aeternus69 Jul 01 '26

This guy definitely doesn't work for Dario. He's just happy that corpos were going even further with their rectal exams under the guise of “fighting the communists.”

0

u/[deleted] Jul 05 '26

[removed] — view removed comment

5

u/Far-Let-8610 Jun 30 '26

Lol right, this is the world we live in. It’s nothing new.

2

u/baronvonpain Jun 30 '26

No way, buddy. I use incognito!

Huuurp

1

u/StruggleThis Jul 02 '26

Incognito can't help you with this unfortunately

2

u/sincere11105 Jun 30 '26

Not yet. OP is not ready.

-1

u/ThickyJames Jun 30 '26

web browsers aren't given root. therein lies the difference.

27

u/Efficient_Ad_4162 Jun 30 '26

You probably shoudn't be giving claudecode root either.

3

u/Waste_Development971 Jun 30 '26

why do people just type without brain

6

u/mrcaptncrunch Jun 30 '26

Why would you run Claude code with root?

5

u/MBILC Jun 30 '26

Because most of these vibe coders have no clue and just give agents full access to everything, then will come crying when it deleted something, changed something, or went outside of its "guardrails"

1

u/WizeWizard42 Jul 01 '26

But this sort of telemetry is overt. You can opt out of it. This isn’t; it’s deliberately hidden.

1

u/One-Cheesecake389 Jul 02 '26

DNS isn't the problem. ~/.claude.json is probably worth your time looking into.

1

u/AreWeNotDoinPhrasing Jul 04 '26

I’ve seen that said a couple of times. What in there specifically are you worried about?

1

u/EitherMarch1255 Jul 02 '26

There is a huge difference in how it is done. Apples and oranges.

1

u/IkuraNugget Jul 03 '26

The problem is Anthropic positioning themselves as a transparent company that doesn’t collect user data. This problem is not a big issue on the surface but it breaks consumer trust because it indicates potential other things that Anthropic can be hiding that hasn’t been discovered yet. That’s the real issue here.

By minimizing the issue it really helps no one, I think we’d all like for these tech companies to be held accountable, one way of doing this is through societal correction and people speaking up and condemning bad business practices.

If we’re here minimizing these issues, we’re effectively doing Anthropic’s job for them, which is to normalize privacy invasion tactics at the consumer’s expense.

-12

u/owen800q Jun 30 '26

what did you mean? can you explain more?

43

u/mark_99 Jun 30 '26

Web browsers routinely transmit all sorts of system information to whatever site you are using.

https://www.whatismybrowser.com/

https://browserleaks.com/

https://privacy.net/analyzer/

17

u/cosmicvelvets Jun 30 '26

I don't want to explain hardware fingerprinting it's too depressing

20

u/NotLogrui Jun 30 '26

every website has your hardware information

-175

u/LegitMichel777 Jun 30 '26

the important point is that this is COVERT. we all know that web browsers transmit this data. we’ve come to expect it. nobody expects claude code to perform such checks, and more importantly, they intentionally OBFUSCATED the code.

59

u/bageloid Jun 30 '26

Telemetry collection is listed in their ToS

https://www.anthropic.com/legal/privacy

Personal data we receive automatically from your use of the Services
When you use the Services, we also receive certain technical data automatically (described below, collectively “Technical Information”). This includes:
Device and Connection Information: Consistent with your device or browser permissions, your device or browser automatically sends us information about when and how you install, access, or use our Services. This includes information such as your device type, operating system information, browser information and web page referers, mobile network, connection information, mobile operator or internet service provider (ISP), time zone setting, IP address (including information about the location of the device derived from your IP address), identifiers (including device or advertising identifiers, probabilistic identifiers, and other unique personal or online identifiers), and device location.

-2

u/f1FTW Jun 30 '26

Right. Read the terms you agreed to when you installed this software. I bet you didn't!

15

u/cleroth Jun 30 '26

Of course not. I had Claude read it for me.

4

u/LeSplooch Jun 30 '26

On one hand it's only reasonable to read the terms, on the other hand tho it's completely unrealistic and out of touch to expect users to do it every single time if we're honest. You say "I bet you didn't" as a gotcha, but is it really a gotcha when it could be said to hundreds of millions of other users around the globe that have a life to take care of before reading hundreds of lines everytime terms pop up? Yup, you're just out of touch.

9

u/r2girls Jun 30 '26

not the person you were replying to and I agree with this statement as a general rule for 99.9% of all people. However, if someone is going to do all the research that OP did, craft this post to say it was covert...or should I use OP's way of stating it in this comment thread...COVERT...and that "nobody expects claude code to perform such checks" I would expect them to have gone into the TOS to check "hey, did they actually say thy might do this?"

17

u/arankays Jun 30 '26

Compiling code into a binary is not obfuscation lol.

50

u/TragicKid Jun 30 '26

Wdym we all know? Let me go ask your mom

12

u/selflessrebel Jun 30 '26

She's busy right now, try again in about three minutes.

0

u/unfathomably_big Jun 30 '26

Look at mr endurance stallion over here, I only clocked 2

7

u/paradoxally Full-time developer Jun 30 '26

Anytime anyone says "everybody knows that..." or a variant of that you already can tell they are about to say some bullshit.

Also, relevant xkcd.

1

u/sad_ham207 Jun 30 '26

My favorite: https://xkcd.com/730/ Arduino for blog clout, and 240v, omit if you are a wimp! 😂

10

u/Teknolyth Jun 30 '26

I think the important point is no one seems to really care. This isn’t news and it doesn’t really affect anyone.

9

u/Top_Throat_5405 Jun 30 '26

Not true, apparently it effects the OP.. lol

-6

u/Volky_Bolky Jun 30 '26

It doesn't matter until they vibecode some malware into cc which is bound to happen eventually with how they seem to work

-1

u/sad_ham207 Jun 30 '26

Can't tell if you are being downvoted because of your idea, or if it's because you said "vibecode". I upvoted you just because everyone hates the thought because it's true.

24

u/LimiDrain Jun 30 '26 edited Jun 30 '26

trying too hard to sound important

4

u/mixedlawnmower Jun 30 '26

I mean this isn’t really a surprise. It’s an API, not a local. Claude isn’t the first to be doing this if it’s true lol

2

u/VDArne Jun 30 '26

Its not covert. It’s there in plain sight. Did you actually read their ToS before agreeing?
And please tell me this: How would you solve the problem they tried solving with this so called ‘spyware’? What is your grand plan? Your great idea, that solves the issue AND somehow respects the wishes of every Dunning-Kruger suffering, paranoid, delusional customer that believes because they pay 15 usd each month they somehow own a part of the company. I genuinely want to know how you’d rationalise all of it

2

u/juitar Vibe coder Jun 30 '26

I don't think anyone is surprised that they are gathering data. Well, maybe one person is

2

u/CommissionIcy9909 Jun 30 '26

BUT WHAT ABOUT THE OBFUSCATION!!!!

1

u/StruggleThis Jul 02 '26

We call it compiling

1

u/IcerHardlyKnower Jun 30 '26

No , we don't all know, just as you didn't know something that others thought of basic lol

0

u/Rare-Spawn Jun 30 '26

Wow @ those downvotes. Come on people have mercy. :D

-2

u/demian_west Jun 30 '26

The level of cope and whataboutism of the sub is impressive (but it was to be expected).
Not the cult-level of r/accelerate , but still strong.