sethserver.com Subscribe
A blue cartoon robot with a single antenna stands against a mint green background, holding open a yellow door on its chest cavity that reveals an orange and white hamster running in a pink exercise wheel.

Claude Code's Code Gets Exposed, Whoopsie!

By Seth Black • Updated: March 31, 2026

AI · 3 min read

Like this kind of writing? Get one email a week with notes on startups, AI, and the occasional strong opinion about Python: subscribe to the newsletter.

It's always the little files that get you.

This week, Claude Code's CLI source got exposed through a sourcemap in an npm package. Chaofan Shou posted it on Twitter, and the internet did what it always does: laughed, cloned it, and started reading through it.
Link: https://x.com/Fried_rice/status/2038894956459290963

Before anybody starts yelling "model leak," no. This isn't weights. It's the TypeScript source for the CLI client. You can't run your own local Opus from this. You can see how the client talks to Anthropic's servers.

Sourcemaps are the "readable source included" option

A sourcemap exists for debugging. You ship bundled/minified JS, and the sourcemap lets tools map errors back to the original TypeScript.

If you publish sourcemaps to a public registry, you're giving away the readable version of your code.

This isn't new. It's just new to whoever hasn't been burned by it yet.

I learned the same lesson in a different costume back when Firefox first took off. I switched fast, didn't test in Internet Explorer (which owned the planet at the time), and shipped a "quick fix" that took down an e-commerce site during a launch weekend. Same root cause: I shipped something I didn't inspect the way a user-or an attacker-would.

Test like a user. Package like an attacker.

What people found in the Claude Code client

People dug through the code and posted screenshots of what they found.

None of this shocks me. Every product collects signals. If you don't, you're guessing.

The funny part is the specificity. "Swearing telemetry" is the kind of detail that makes engineers laugh because it's so human. Somebody wrote that ticket. Somebody named the event. Somebody had to decide what counts as a swear.

Why I squint at "AI companies"

I worked at a SaaS company that claimed it used AI to automate boring financial tasks. A few weeks in, support and services got weirdly cagey. I was told to "come to our office and watch us work" by a team in South Asia.

That's not a normal response to "can you show me the pipeline?"

Code review later: the "AI" was mostly spreadsheet column mapping and data formatting. Not even fancy spreadsheet column mapping. Just regular "this column goes here" spreadsheet work.

So when I see a CLI leak like this, I don't think scandal. I think:

This leak is the opposite of that SaaS story, by the way. A readable client means people can verify what it does. That's awkward for Anthropic today, but it's healthier for everyone else.

If you ship CLIs, check this before you publish

Also: read the manual and jump in. That's still my favorite way to learn new tech. It's how I got up to speed on LLMs back when ChatGPT 3.5 had tiny context and hallucinated constantly.

The actual problem

The real problem is thinking you can ship software to the public and keep it private.

If your business depends on nobody reading your client code, you've already lost.

-Sethers

Share this post
Newsletter

One email, once a week.

Notes on databases, systems, and the occasional strong opinion about Python. No spam, unsubscribe anytime.

Seth Black
Written by

Seth Black

Engineer and founder based in Texas. Writes about databases, AI, and running things in production. Embeds in small teams as lead engineer.

More from AI

View all →
AI

How to be a Good Farrier: What the Car Teaches Us About AI and Your Job

Nov 10, 2026
AI

Principle of Least Privilege in the AI Age

Apr 14, 2026
AI

How to Actually Secure MCP (Model Context Protocol)

Apr 14, 2026