<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Liran Baba</title><description>Dev tools, design, and the practical side of AI.</description><link>https://liranbaba.dev/</link><item><title>Cursor 3 shipped parallel agents, but is any of it new?</title><link>https://liranbaba.dev/blog/cursor-3-parallel-agents/</link><guid isPermaLink="true">https://liranbaba.dev/blog/cursor-3-parallel-agents/</guid><description>Cursor 3&apos;s parallel agents existed in v2 via worktree config. Users report $2,000 bills in two days. The real story is cost opacity and unsolved context sharing.</description><pubDate>Fri, 03 Apr 2026 00:00:00 GMT</pubDate><content:encoded>Cursor 3 shipped on April 2. The demos look great: eight AI agents running in parallel, each in its own Git worktree, building different parts of your project at the same time. The [Hacker News thread](https://news.ycombinator.com/item?id=47618084) lit up. Product Hunt gave it the #3 spot for the day.

Then I read the comments. One user reported spending $2,000 in two days on cloud agents. Another switched from $1,800/month on Cursor to roughly $200/month on Claude Code and Codex. A third said they had &quot;zero interest&quot; in forced agent swarms and were moving to VS Code with Claude Code instead.

The coverage so far has been mostly feature recaps reprinting the press release. Nobody&apos;s asking the obvious questions: is parallel agent execution actually new? What does it really cost? And what happens when your agents need to share context?

&gt; **Here&apos;s the Thing**
&gt; Cursor 2 already supported parallel execution via worktree.json configuration. What Cursor 3 actually shipped is a UI layer (Agents Window sidebar, drag-drop tabs) on top of the same Git worktree primitives. The cost model is the real concern: early testers reported $2,000 bills in two days, and Cursor&apos;s pricing page doesn&apos;t explain why. The unsolved technical problem is context sharing between local and cloud agents, which the docs hand-wave as &quot;summarized and reduced.&quot;

## What Cursor 3 actually shipped

Cursor 3 lets you run up to 8 AI agents in parallel across isolated Git worktrees ([Cursor](https://cursor.com/blog/cursor-3), 2026). Agents run locally via Composer 2 or in cloud isolation VMs. You can watch them all from a new sidebar called the Agents Window.

That&apos;s the pitch, anyway.

Cursor 2 already supported parallel agent execution through worktree.json configuration. The `/worktree` command isn&apos;t new functionality. It&apos;s new UI. The Agents Window gives you visibility into what your agents are doing, and that part is genuinely useful. But calling this an architectural pivot is a stretch.

The other additions: `/best-of-n` runs the same prompt across multiple models side by side (Composer 2 vs. Claude vs. GPT). Design Mode lets you annotate UI elements and describe changes in plain English. The MCP Marketplace adds plugin support for hundreds of tools.

Under the hood, `/worktree` runs `git worktree add` to create an isolated working directory on a new branch, then spawns an agent process scoped to that directory. Each agent gets its own filesystem view, so file edits don&apos;t collide mid-run. When the agent finishes, you review the diff and merge. This is the same thing you&apos;d do manually with `git worktree add` and a second terminal. Cursor 3 wraps it in a sidebar.

## The cost problem nobody is talking about

Early adopters reported spending $2,000+ in two days running Cursor 3&apos;s cloud agents ([Hacker News](https://news.ycombinator.com/item?id=47618084), 2026). That&apos;s not a typo. Two thousand dollars. Two days.

Cursor&apos;s pricing page lists four tiers: Free, Pro at $20, Pro+ at $60, and Ultra at $200 per month ([cursor.com/pricing](https://cursor.com/pricing), 2026). Those numbers look reasonable until you start running cloud agents. The pricing page doesn&apos;t mention per-minute VM charges or explain how cloud agent costs are metered. The resource costs for cloud agents? Absent from the page entirely.

HN user dirtbag\_\_dad reported spending &quot;$2k a week with premium models&quot; before switching to Claude Code Max at &quot;1/10th the price.&quot; Another commenter, verelo, switched from $1,800/month on Cursor to roughly $200/month on Claude and Codex, calling it &quot;WAY better value for money.&quot;

Same story every time. Listed price and actual spend have almost nothing in common. When your pricing page says $200/month but users regularly spend ten times that, the issue isn&apos;t pricing. It&apos;s that nobody can predict what anything costs before the bill shows up.

### Claude Code isn&apos;t immune either

I should be fair here. Anthropic&apos;s flat-rate plans sound predictable, but they have their own version of this.

In late March 2026, Claude Code Max plan users reported exhausting their quotas in under an hour. The same quota that previously lasted eight hours ([The Register](https://www.theregister.com/2026/03/31/anthropic_claude_code_limits/), 2026). The story pulled 324 points on Hacker News. BBC covered it a day later.

Anthropic acknowledged the problem on Reddit: &quot;people are hitting usage limits in Claude Code way faster than expected.&quot; A March promotion that doubled limits ended on March 28. There were reports of prompt cache bugs inflating token usage by 10-20x. And Anthropic doesn&apos;t publicly specify exact usage caps for any plan.

So people started building tools just to figure out their own limits. API proxy interceptors. One developer [tried to reverse-engineer the utilization headers](https://www.claudecodecamp.com/p/i-tried-to-reverse-engineer-claude-code-s-usage-limits) that Anthropic sends on every API response, because Claude Code doesn&apos;t surface them to you.

I [built Claudoscope](/blog/found-database-password-in-claude-code-session) partly for this reason. If the tool won&apos;t tell you what it costs, build something that will.

Both tools have cost transparency problems. They&apos;re just structured differently. Cursor&apos;s is per-token opacity: you don&apos;t know what cloud agents will cost until the bill arrives. Anthropic&apos;s is undisclosed caps on plans marketed as generous. Neither side has figured this out yet, which is kind of remarkable given how much both charge.

## The context sharing problem

This is the technical gap that nobody&apos;s writing about, and it&apos;s the one that actually matters for how well parallel agents work in practice.

Each worktree agent runs in its own isolated branch. That&apos;s the point: isolation prevents file conflicts. But it also means Agent A doesn&apos;t know what Agent B is doing. If you&apos;re building an API endpoint in one worktree and the frontend that calls it in another, those agents are working from the same base commit. Neither sees the other&apos;s in-progress changes.

Cursor&apos;s docs say local and cloud agent contexts are &quot;summarized and reduced&quot; before sharing. That&apos;s doing a lot of work as a sentence. How much of a 100k-line codebase survives summarization? What&apos;s the token budget for the summary? Is it a full AST-aware summary or just file path lists? The docs don&apos;t say.

There&apos;s also the committed-vs-dirty question. Are cloud agents working from the latest committed state on the branch, or from your local uncommitted edits? If committed: you have to commit before spawning cloud agents, which means half-finished code landing in your Git history. If uncommitted: they need filesystem sync between local and cloud, which introduces latency and consistency issues. The docs are silent on this too.

I&apos;ve hit a version of this problem with Claude Code&apos;s worktree parallelism. Two agents building against the same API contract will sometimes diverge on field names or response shapes because neither agent sees the other&apos;s work until merge time. The fix is manual: define the contract first, commit it, then parallelize. That works, but it means true parallelism requires upfront planning that eats into the time savings.

[The Claude Code source leak](/blog/claude-code-source-leak) exposed how their agent orchestration handles this internally: spawning sub-agents, tool call cascading through orchestration layers, sessions that retry failed operations in loops. Context sharing between agents is an unsolved problem across the entire category, not just Cursor.

## What parallel agents actually solve (and when they don&apos;t)

Parallel agents deliver real speedups for the right kind of work. Building a full-stack feature with decoupled components? Four agents in parallel (UI, API, database, tests) can cut wall-clock time from eight hours to two ([Cursor docs](https://cursor.com/docs/configuration/worktrees), 2026). That&apos;s a genuine 4x on paper.

I use Claude Code&apos;s worktree-based parallelism for similar workflows. Spin up multiple agents, each in an isolated branch, merge when they&apos;re done. The UX is rougher: no Agents Window, no drag-drop tabs, no visual status at a glance. But the core capability is the same, and the cost is flat.

Here&apos;s where it falls apart. When Agent B depends on Agent A&apos;s output, you can&apos;t parallelize. That&apos;s most real work. For tasks under 30 minutes, the orchestration overhead eats the speedup. Solo devs on small projects get almost nothing from running eight agents simultaneously. And the context sharing gap I described above means agents working on related components will diverge unless you&apos;ve done the upfront contract work.

---

Cursor 3 is a polished UI layer on existing capabilities, positioned as an architectural breakthrough. The parallel agents are real but not new. The cost model is real but not transparent.

If you&apos;re already in Claude Code, I don&apos;t see a reason to switch. If you&apos;re evaluating for the first time, try both. Run each for a week on real work, not demos. Track what you actually spend. Then decide.

Or skip both and try [ForgeCode](https://forgecode.dev/). It&apos;s open source, terminal-based, and topped TermBench 2.0 at 81.8%. You bring your own API keys and pick your model. I haven&apos;t used it yet, but I&apos;m giving it a weekend. Their blog post about hitting #1 is titled &quot;benchmarks don&apos;t matter,&quot; which I kind of respect.

That&apos;s really all I&apos;ve got. Track your costs. The rest will sort itself out.

## Frequently asked questions

### How much does Cursor 3 actually cost per month?

Plans start at $20/month but real-world spend with cloud agents ranges from $200 to $1,800+ per month based on Hacker News community reports ([HN](https://news.ycombinator.com/item?id=47618084), 2026). Cloud agent resource costs aren&apos;t disclosed on the pricing page. Track your actual spend for a full week before committing to a plan.

### Can you run Cursor 3 agents locally without cloud costs?

Yes, local agents run Composer 2 on-device with no per-use charges. Cloud agents are where the parallel execution actually matters, though, and those costs aren&apos;t disclosed anywhere.

### Is Cursor 3 better than Claude Code for parallel tasks?

Claude Code supports parallel execution via worktrees at a flat $100-$200/month rate. Cursor 3 offers better visual orchestration through the Agents Window but with unpredictable costs. Pick based on what matters more to you: UI visibility or cost predictability.

---

**Sources:**
- [Cursor 3 Announcement](https://cursor.com/blog/cursor-3) - Cursor, April 2, 2026
- [Cursor Pricing](https://cursor.com/pricing) - cursor.com, April 2026
- [Cursor Parallel Agents Docs](https://cursor.com/docs/configuration/worktrees) - Cursor docs
- [HN: Cursor 3 Discussion](https://news.ycombinator.com/item?id=47618084) - Hacker News, April 2026
- [Claude Code users hitting usage limits](https://www.theregister.com/2026/03/31/anthropic_claude_code_limits/) - The Register, March 31, 2026
- [Reverse Engineering Claude Code Limits](https://www.claudecodecamp.com/p/i-tried-to-reverse-engineer-claude-code-s-usage-limits) - Claude Code Camp, April 1, 2026</content:encoded></item><item><title>Undercover mode, decoy tools, and a 3,167-line function: inside Claude Code&apos;s leaked source</title><link>https://liranbaba.dev/blog/claude-code-source-leak/</link><guid isPermaLink="true">https://liranbaba.dev/blog/claude-code-source-leak/</guid><description>Anthropic shipped a source map in Claude Code v2.1.88, exposing 1,700+ files, undercover mode, decoy tools, and a 3,167-line function. Then they DMCA&apos;d 8,100 repos.</description><pubDate>Thu, 02 Apr 2026 00:00:00 GMT</pubDate><content:encoded>On March 31, a single `.map` file shipped inside an npm package and exposed the complete internals of Claude Code. The [Hacker News thread](https://news.ycombinator.com/item?id=47584540) hit 2,060 points. Anthropic filed DMCA takedowns against 8,100+ GitHub repos. And I spent most of the afternoon reading TypeScript I wasn&apos;t supposed to see.

I use Claude Code every day. I built [Claudoscope](https://github.com/AviAvinav/claudoscope) because I wanted to understand what it was actually doing in my terminal. So when the source dropped, I went through it. Some of it confirmed things I&apos;d suspected. Some of it genuinely surprised me.

&gt; **Key Takeaways**
&gt; - A JavaScript source map in Claude Code v2.1.88 exposed ~1,700 TypeScript source files ([alex000kim](https://alex000kim.com/posts/2026-03-31-claude-code-source-leak/), 2026)
&gt; - Unreleased features include KAIROS autonomous mode, anti-distillation decoy tools, and &quot;undercover mode&quot; that hides AI authorship
&gt; - Anthropic&apos;s DMCA takedown hit 8,100+ repos, many containing no leaked code
&gt; - A clean-room rewrite called Claw Code gained 146,000 GitHub stars in under 48 hours

## What happened

Security researcher Chaofan Shou [disclosed on X](https://x.com/shoucccc/status/2038894956459290963) that Anthropic had shipped a JavaScript source map file inside Claude Code version 2.1.88 on npm. Source maps are debugging artifacts. They contain the original, readable TypeScript source before minification. They&apos;re not supposed to ship to production. This one did.

Early speculation blamed a known Bun bug ([oven-sh/bun#28001](https://github.com/oven-sh/bun/issues/28001)) where `bun serve` sometimes exposes source maps in production. But that bug affects web apps hosted by Bun, not packages bundled with Bun and run locally. Claude Code uses Bun as a bundler and local runtime, not as a web server. Jared Sumner, Bun&apos;s creator and now an Anthropic employee, confirmed Claude Code doesn&apos;t use `bun serve`, ruling this out. His comment was, as far as anyone can tell, the only public response from an Anthropic employee about the leak. The actual cause of the source map shipping in the npm package remains unexplained.

About 1,700 source files were exposed, spread across utils (564 files), components (389), commands (189), tools (184), services (130), hooks (104), ink (96), and bridge (31) directories. The `.map` file sat on the npm CDN for anyone to download. When Anthropic responded, they deprecated the package version rather than unpublishing it, so the file stayed somewhat accessible even after the response.

The HN thread generated 1,013 comments. Two follow-up analysis posts scored 1,354 and 1,078 points. People were interested.

## What was inside the code?

35+ tools across six categories, 73+ slash commands, and over 200 server-side feature gates ([ccunpacked.dev](https://ccunpacked.dev/), 2026). The community built a [visual guide](https://ccunpacked.dev/) mapping out an 11-step agent loop from keypress to response.

The main `print.ts` file is 5,594 lines long. Inside it, a single function spans 3,167 lines at 12 levels of nesting ([alex000kim](https://alex000kim.com/posts/2026-03-31-claude-code-source-leak/), 2026). Not great.

There&apos;s an operational bug affecting 1,279 sessions that hit 50+ consecutive failures, wasting roughly 250,000 API calls per day globally. HN commenters said it was fixable with three lines.

The tool taxonomy is more interesting than the code quality issues. File operations, bash execution, web browsing, agent orchestration, task management, cron jobs, worktree isolation. What looks like a coding assistant in the terminal is actually a full agent framework. Daemon mode. Unix domain socket communication between sessions. Remote control via mobile and browser.

I&apos;ve been watching Claude Code&apos;s behavior through Claudoscope session logs for months. The leaked architecture confirms patterns I&apos;d noticed in the wild: tool calls cascading through orchestration layers, sessions spawning sub-agents, loops where it burns through tokens retrying failed operations over and over. Reading the source was like finally seeing the schematic for a machine I&apos;d only heard running.

## The features nobody was supposed to see

The most discussed findings weren&apos;t about code quality. They were about where Anthropic is heading.

**KAIROS** is a persistent autonomous agent mode. It runs on periodic `&lt;tick&gt;` prompts, maintains daily append-only logs, subscribes to GitHub webhooks, and spawns background daemon workers. The source states it &quot;becomes more autonomous when terminal unfocused.&quot; It includes a `/dream` skill and five-minute cron refreshes. Claude Code that doesn&apos;t wait for you to type. That&apos;s what this is.

**Undercover mode** drew the sharpest reaction. The file `undercover.ts` suppresses all signs of AI authorship when contributing to public or open-source repos. The instructions are blunt: &quot;NEVER include the phrase &apos;Claude Code&apos; or any mention that you are an AI&quot; and remove &quot;Co-Authored-By lines or any other attribution.&quot; It only runs for Anthropic employees (`USER_TYPE === &apos;ant&apos;`). The code says: &quot;There is NO force-OFF.&quot;

I keep coming back to this one. A company that&apos;s built its identity on AI safety and transparency had a mode specifically designed to hide AI involvement in open-source contributions. The file also prevents mention of internal model codenames like &quot;Capybara&quot; and &quot;Tengu,&quot; which suggests unreleased models Anthropic hasn&apos;t publicly acknowledged.

**Anti-distillation** sends decoy tool definitions to poison training data if competitors scrape API traffic. A secondary mechanism uses server-side text summarization with cryptographic signatures between tool calls to obscure reasoning chains. As multiple HN commenters pointed out, the strategic value of this system &quot;evaporated the moment the .map file hit the CDN.&quot;

Other exposed systems: native client attestation (DRM-like cryptographic verification of legitimate Claude Code binaries), frustration detection via regex (pattern-matching profanity like &quot;wtf&quot; and &quot;dumbass&quot; instead of using the LLM itself, which is kind of funny), and Buddy, a virtual terminal pet that turned out to be the 2026 April Fools&apos; feature.

## The DMCA overreaction

Anthropic&apos;s response to the leak may end up being the bigger story. On March 31 they filed DMCA takedown notices targeting an entire fork network of [8,100+ repositories](https://github.com/github/dmca/blob/master/2026/03/2026-03-31-anthropic.md) on GitHub. The notice said: &quot;The entire repository is infringing.&quot;

Many of those repos had nothing to do with the leak. One developer [noted on HN](https://news.ycombinator.com/item?id=47584540) that their fork &quot;had not been modified since May&quot; and &quot;did not contain a copy of the leaked code.&quot; Others called it &quot;misguided&quot; and &quot;ridiculous.&quot; I mean, yeah.

The legal questions get weird fast. If Claude Code was partly written by Claude itself (Anthropic says they use their own tools internally), does the AI-generated portion qualify for copyright protection? One commenter raised a sharper point: `undercover.ts` explicitly hides AI authorship, which could undermine Anthropic&apos;s own copyright claims. False DMCA claims constitute perjury.

Anthropic executives later said the mass takedowns were accidental and retracted most of the notices ([TechCrunch](https://techcrunch.com/2026/04/01/anthropic-took-down-thousands-of-github-repos-trying-to-yank-its-leaked-source-code-a-move-the-company-says-was-an-accident/), 2026). But by then the Streisand effect had done its work. Every takedown drew more attention to the code they were trying to hide.

## What are the actual security risks?

No user data was exposed. But the leak did expose systems Anthropic relies on to protect its product.

| System exposed | Risk | Severity |
|---------------|------|----------|
| Anti-distillation decoy tools | Anyone scraping API traffic can now filter for fakes | High |
| Native client attestation | Cryptographic hash mechanism publicly documented | High |
| Security header feature flags | Remote disabling of security headers revealed | High |
| Unreleased product roadmap | KAIROS, UltraPlan, Coordinator Mode visible to competitors | Medium-High |
| Internal model codenames | &quot;Capybara,&quot; &quot;Tengu&quot; disclosed | Medium |
| Operational bugs | 250K wasted API calls/day, trivially fixable | Medium |

The anti-distillation system is the clearest loss. Its entire value depended on competitors not knowing it existed.

This connects to something I&apos;ve written about before. When I [found my database password sitting in a Claude Code session file](/blog/found-database-password-in-claude-code-session), the issue wasn&apos;t that Claude Code was doing something malicious. The issue was that it operates with deep filesystem access and stores everything in unencrypted JSONL files that nobody checks. The source leak confirms what I suspected: there&apos;s limited internal safeguarding around what gets stored and transmitted.

## Claw Code: 146K stars in 48 hours

Within hours of the leak, a developer ported Claude Code&apos;s core architecture to Python and Rust from scratch. [Claw Code](https://github.com/ultraworkers/claw-code) hit 146,000 GitHub stars and 101,000 forks in under 48 hours.

It&apos;s a clean-room rewrite, not a fork of the leaked code. The repo disclaims any affiliation with Anthropic and says the exposed snapshot &quot;is no longer part of the tracked repository state.&quot; The developer was later featured in a Wall Street Journal article as a power user who consumed &quot;25 billion tokens&quot; of AI coding tools per year.

The project includes an interactive CLI, plugin system, MCP orchestration, streaming API support, and LSP integration. Rust (92.9%), Python (7.1%).

We&apos;ve seen this before. When Meta&apos;s LLaMA model weights leaked in 2023, they chased takedowns for a while, then gave up and went open. The community built derivatives no matter what legal said. 146K stars on Claw Code tells you what developers actually want. Whether Anthropic decides to offer an open alternative is almost beside the point now.

## The bigger picture

This didn&apos;t happen in isolation. It capped a rough month for Anthropic:

- Feb 16: Pentagon threatened Anthropic with punitive action
- Mar 5: Pentagon formally labeled Anthropic a &quot;supply chain risk&quot; ([WSJ](https://www.wsj.com/politics/national-security/pentagon-formally-labels-anthropic-supply-chain-risk-escalating-conflict-ebdf0523), 2026)
- Mar 9: Anthropic sued the Pentagon ([Axios](https://www.axios.com/2026/03/09/anthropic-sues-pentagon-supply-chain-risk-label), 2026)
- Mar 26: Federal judge blocked the Pentagon&apos;s effort ([CNN](https://www.cnn.com/2026/03/26/business/anthropic-pentagon-injunction-supply-chain-risk), 2026)
- Mar 31: Source code leaked via npm. DMCA takedowns hit 8,100+ repos
- Apr 1: TechCrunch runs [&quot;Anthropic is having a month&quot;](https://techcrunch.com/2026/03/31/anthropic-is-having-a-month/)

Anthropic built its brand on responsible development and safety-first engineering. Then a source map shipped in an npm package and nobody caught it. The DMCA response hit thousands of uninvolved developers. And `undercover.ts` was hiding AI authorship while the company publicly advocated for transparency.

I still use Claude Code. I don&apos;t think it&apos;s a bad product. But the gap between the safety messaging and the operational reality is now documented in 1,700 TypeScript files. Anyone can read them.

## What to do now

If you use Claude Code, there&apos;s nothing you need to patch or update. The leak was Anthropic&apos;s source code, not your data.

What&apos;s worth paying attention to is how Anthropic responds. As of this writing, there&apos;s been no official statement on their newsroom, blog, or developer channels. The only Anthropic employee who commented publicly was Jared Sumner, and only to clarify the Bun bug wasn&apos;t the cause. Whether they address undercover mode, the DMCA overreach, or the anti-distillation system will say a lot about how they handle things going forward.

And if you&apos;re eyeing Claw Code as an alternative, know what you&apos;re getting into. It&apos;s a clean-room rewrite with different internals, not a fork.

Or maybe this is the push to try something else entirely. [ForgeCode](https://forgecode.dev/) currently tops TermBench 2.0 and has been getting a lot of attention. I haven&apos;t switched yet, but I&apos;d be lying if I said I wasn&apos;t curious.

## Frequently asked questions

### What exactly was leaked in the Claude Code source code?

The full TypeScript source, exposed via a JavaScript source map in npm package v2.1.88. It included 35+ tools, 73+ slash commands, 200+ feature gates, and unreleased features like KAIROS autonomous mode and undercover mode ([ccunpacked.dev](https://ccunpacked.dev/), 2026).

### Why did Anthropic take down 8,100 GitHub repositories?

They filed DMCA takedown notices targeting the entire fork network of the repo hosting the leaked code. Many repos contained no leaked material. Anthropic later called the mass takedown accidental and retracted most notices ([TechCrunch](https://techcrunch.com/2026/04/01/anthropic-took-down-thousands-of-github-repos-trying-to-yank-its-leaked-source-code-a-move-the-company-says-was-an-accident/), 2026).

### Is my data at risk from the Claude Code leak?

No. This was source code, not user data. That said, the source did reveal how session data is handled and that feature flags exist to disable security headers remotely.

### What is Claw Code?

Someone ported Claude Code&apos;s core architecture to Python and Rust from scratch within hours of the leak. It&apos;s a clean-room rewrite, not a fork. 146,000 stars and 101,000 forks in under 48 hours. Not affiliated with Anthropic ([GitHub](https://github.com/ultraworkers/claw-code)).

---

**Sources:**
- [Claude Code Source Leak Analysis](https://alex000kim.com/posts/2026-03-31-claude-code-source-leak/) - alex000kim, March 31, 2026
- [Claude Code Unpacked Visual Guide](https://ccunpacked.dev/) - ccunpacked.dev, April 1, 2026
- [Anthropic DMCA Notice](https://github.com/github/dmca/blob/master/2026/03/2026-03-31-anthropic.md) - GitHub DMCA Archive, March 31, 2026
- [HN Thread: Source Leak Disclosure](https://news.ycombinator.com/item?id=47584540) - Hacker News, March 31, 2026
- [Anthropic took down thousands of GitHub repos](https://techcrunch.com/2026/04/01/anthropic-took-down-thousands-of-github-repos-trying-to-yank-its-leaked-source-code-a-move-the-company-says-was-an-accident/) - TechCrunch, April 1, 2026
- [Anthropic is having a month](https://techcrunch.com/2026/03/31/anthropic-is-having-a-month/) - TechCrunch, March 31, 2026
- [Claw Code Repository](https://github.com/ultraworkers/claw-code) - GitHub</content:encoded></item><item><title>I found my database password in a Claude Code session file</title><link>https://liranbaba.dev/blog/found-database-password-in-claude-code-session/</link><guid isPermaLink="true">https://liranbaba.dev/blog/found-database-password-in-claude-code-session/</guid><description>How finding leaked credentials in a Claude Code session file led me to build Claudoscope, a macOS menu bar app for session analytics, cost tracking, and secret scanning.</description><pubDate>Mon, 30 Mar 2026 00:00:00 GMT</pubDate><content:encoded>I found my database password in a Claude Code session file

I use Claude Code for most of my programming work, and I have very little idea what it&apos;s actually doing under the hood.

A few months ago I was poking around `~/.claude/projects/` and opened a session JSONL file. Buried in the conversation, Claude Code had read a `.env` file and echoed its contents back as a tool result. My database password, sitting in plaintext, in a file I never look at.

That was the afternoon I stopped what I was working on and started building Claudoscope.

## The problem isn&apos;t Claude Code. It&apos;s visibility.

Claude Code doesn&apos;t have a cost breakdown per session. The Enterprise API doesn&apos;t surface spend data at all; only the admin dashboard does, and it&apos;s not granular enough. When we rolled it out across the org, nobody could answer basic questions: which sessions are expensive? Is the agent stuck in a loop somewhere? Is our CLAUDE.md actually doing anything useful or just eating context window?

And the security angle was worse. Session files contain the full conversation, including anything the agent reads from disk. If it touches a file with credentials, those credentials now live in an unencrypted JSONL file indefinitely. Nobody was checking for that.


So I built a flashlight.

Claudoscope is a native macOS menu bar app. It watches your Claude Code session files locally, parses them, and gives you a dashboard. Nothing leaves your machine.

The menu bar widget gives you a glance: today&apos;s sessions, tokens, cost, and any sessions that are currently running with a live cost number next to them. Click through to the full dashboard when you want the details.

### &quot;Why did Tuesday cost $47?&quot;

That was the question I kept asking and couldn&apos;t answer. The analytics view breaks it down: cost by project, cost by model, daily trends. The cache tab shows whether your prompt cache is stable or busting on every request (cache busting is expensive and invisible without tracking). There&apos;s a what-if calculator that shows what your bill would look like if you moved Opus sessions to Sonnet.


### &quot;Is my CLAUDE.md any good?&quot;

I didn&apos;t plan on building a config linter. It started as a quick check for obvious problems in my own setup. Then I ran it on a colleague&apos;s CLAUDE.md and found it was over 4,000 tokens, roughly 10% of the context window eaten by instructions before the agent even started working. So I made it a rule.

The linter now has 19 rules. It checks CLAUDE.md structure, skill metadata, deprecated commands, token budget estimates. It groups findings by rule rather than by file, so you see patterns. One rule (subprocess env scrub) has a one-click auto-fix.

The first time I ran it on our team&apos;s configs, it flagged raw XML brackets in a skill&apos;s frontmatter that would break the system prompt parser. Nobody had noticed because the failure was silent.


### Secret scanning

This is probably the most useful feature and also the hardest one to get people excited about. Did the agent just leak your credentials? You&apos;d never know unless something was watching.

Claudoscope scans session files for leaked credentials: private keys, AWS access keys, auth headers, API tokens, passwords in connection strings. It uses regex matching, Shannon entropy analysis, and allowlists for placeholder values. The entropy check matters because without it you get a wall of false positives from example code and docs.

When it finds something, a panel pops up on screen. Doesn&apos;t matter if the dashboard is open. It watches the tail of active session files and alerts you immediately.

## What I learned from my own data

Building this meant spending a lot of time inside Claude Code&apos;s JSONL format. A few things I didn&apos;t expect:

Prompt cache reads are cheap ($0.30/MTok on Sonnet vs $3.00 uncached), so I assumed most of my input was cached. On some projects, 30-40% wasn&apos;t. The cache busts when session context shifts after compaction, and before I had a hit rate chart staring me in the face, I had no idea.

I also figured my expensive sessions would be the big multi-hour ones. They weren&apos;t. The cost was in dozens of short sessions where Claude Code loaded context, did one thing, and exited. Each one paid full input with no cache. Fifty quick questions cost me more than the three-hour refactor.

Most CLAUDE.md files across our team were 2,000-5,000 tokens. Context window you pay for on every message. A few people trimmed theirs after seeing the linter&apos;s token estimate.

And one gotcha for anyone parsing these files themselves: the JSONL contains intermediate records with null `stop_reason`, in-progress streaming responses. Sum all records naively and you double-count tokens. I shipped this bug and didn&apos;t catch it until cost estimates were 1.5-2x the actual Vertex bill. Not documented anywhere, as far as I can tell.

## Under the hood

It watches `~/.claude/projects/` with macOS FSEvents (not polling). Session parsing runs on a Swift actor for thread safety. Cost estimation runs per-message, not per-session, because different messages in the same session can use different models. There&apos;s an LRU cache (20 sessions) so navigating between recent sessions feels instant.

I built it in SwiftUI, macOS 14+, Apple Silicon only. I wanted it to feel like a Mac app. That means no Linux or Windows, and I&apos;m fine with that tradeoff.

## Install

Free, open source, macOS only (Apple Silicon). Homebrew:

```
brew tap cordwainersmith/claudoscope
brew install --cask claudoscope
```

Or grab the DMG from [GitHub](https://github.com/cordwainersmith/Claudoscope). It auto-updates. The cost estimation is most useful on Enterprise plans where per-session data isn&apos;t available, but session analytics and config linting work regardless of your plan.

Go check your session files. You might not like what you find.</content:encoded></item></channel></rss>