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.
- Future models and codenames: references to Opus 4.7, Sonnet 4.8, and a codename Capybara (people are guessing it maps to Mythos).
- Unreleased features: KAIROS (long-term memory), ULTRAPLAN (planning), Buddy mode, and Agent Teams.
- Telemetry: tracking swearing at Claude (user frustration) and how often you type "continue" (cutoffs).
- Security checks: measures to avoid session token theft by other local processes and to verify requests come from a legit client.
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:
- What's real product?
- What's marketing?
- What's duct tape that shipped by accident?
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
- Don't publish sourcemaps unless you mean to.
- Check what's in your npm package (
npm pack --dry-run). - Assume your client code will be read, because it will.
- Keep secrets out of clients: session tokens, signing keys, "special headers," all of it.
- Treat telemetry like a product feature. Document it. Make it boring. Boring is good.
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