Live data from Hacker News

Claude Code Unpacked : A visual guide

ccunpacked.dev

261–270 of 464 posts

Re: Claude Code Unpacked : A visual guide

#261

I know it seems counter-intuitive but are there any agent harnesses that aren’t written with AI? All these half a million LoC codebases seem insane to me when I run my business on a full-stack web application that’s like 50k lines of code and my MvP was like 10k. These are just TUIs that call a model endpoint with some shell-out commands. These things have only been around in time measured in months, half a million L…

> just TUIs

For starters, CC's TUI is React-based.

Re: Claude Code Unpacked : A visual guide

#262

Earlier quoted context omitted.

I just checked competitors' codebases: - Opencode (anomalyco/opencode) is about 670k LOC - Codex (openai/codex) is about 720k LOC - Gemini (google-gemini/gemini-cli) is about 570k LOC Claude Code's 500k LOC doesn't seem out of the ordinary.

> Claude Code's 500k LOC doesn't seem out of the ordinary. Aren't all the other products also vibe-coded? "All vibe-coded products look like this" doesn't really seem to answer the question "Why is it so damn large?" It's a repl, that calls out to a blackbox/endpoint for data, and does basic parsing and matching of state with specific actions. I feel the bulk of those lines should be actions that are performed. Eithe…

You're complaining about vibe coding while also complaining about how you "feel" about the code. Do you see the irony in that?

Re: Claude Code Unpacked : A visual guide

#263
post #127

Earlier quoted context omitted.

Is this why they ran into a bug with people hitting usage limits even on very short sessions and had to cease all communications for over a day after a week of gaslighting users because they couldn't find the root cause in the "quality doesn't matter" code base? Or that's why tgey had to buy bun with actual engineers to work on Claude Code to reduce memory peaks from 68 GB (yes, 68 gigabytes ) to a "measely" 1.7? Bec…

Sure, now the only thing remaining is you convincing Anthropic that they're doing wrong. Or alternatively you change your perspective.

"Windows is the world's most popular desktop consumer OS. Microsoft are doing everything right, and should never ever change. Who are we to criticise them"

Meanwhile I apparently need to change my persoective about this: https://news.ycombinator.com/item?id=47598488

Re: Claude Code Unpacked : A visual guide

#264

Earlier quoted context omitted.

> Claude Code's 500k LOC doesn't seem out of the ordinary. Aren't all the other products also vibe-coded? "All vibe-coded products look like this" doesn't really seem to answer the question "Why is it so damn large?" It's a repl, that calls out to a blackbox/endpoint for data, and does basic parsing and matching of state with specific actions. I feel the bulk of those lines should be actions that are performed. Eithe…

You're complaining about vibe coding while also complaining about how you "feel" about the code. Do you see the irony in that?

>> I feel the bulk of those lines should be actions that are performed. Either this is correct or this is not:

> You're complaining about vibe coding while also complaining about how you "feel" about the code. Do you see the irony in that?

Where did I complain about how I feel about the actual code? I have feelings, negative ones, about the size of the code given the simple functionality it has, but I have no feelings on the code because I did not look at the code.

Re: Claude Code Unpacked : A visual guide

#265

A 500k line codebase for an agent CLI proves one thing: making a probabilistic LLM behave deterministically is a massive state-management nightmare. Right now, they're great for prompting simple sites/platforms but they break at large enterprise repos. If you don't have a rigid, external state machine governing the workflow, you have to brute-force reliability. That codebase bloat is likely 90% defensive programming;…

We propped the entire economy up on it. Just look at the s&p top 10. Actually even top 50 holdings.

If it doesn't deliver on the promise we have bigger problems than "oh no the code is insecure". We went from "I think this will work" to "this has to work because if it doesn't we have one of those 'you owe the bank a billion dollars' situations"

Re: Claude Code Unpacked : A visual guide

#266
post #158

Earlier quoted context omitted.

> Honest question: Why does it matter? Because it's unmaintainable slop that they themselves don't know how to fix when something happens? https://news.ycombinator.com/item?id=47598488

It will be exactly that. But that is a 'them' problem. I can look at it a go 'that looks like a bad idea' but they are the ones who have to live with it. At some point someone will probably take their LLM code and repoint it at the LLM and say 'hey lets refactor this so it uses less code is easier to read but does the same thing' and let it chrun. One project I worked on I saw one engineer delete 20k lines of code on…

> But that is a 'them' problem. I

When a TUI requires 68 GB of RAM to run, or when they spend a week not being able to find a bug that causes multiple people to immediately run out of tokens, it's not a "them" problem.

Re: Claude Code Unpacked : A visual guide

#267
post #38

Earlier quoted context omitted.

> is about a year old now, so it should be in prime shape A 1yo project may be in good shape if written by just one dev, maybe a few. But if you have many devs, I can guarantee it will be messy and buggy. If anything, at 1yo it is probably still full of bugs because not enough time has elapsed for people to run into them.

It's only 510k LoC, at ~100 lines of code a day for a year, this code base would take 23 engineers a year to write. That's for 220 working days in somewhere civilized. And I'm sure we all know that when working on a greenfield project you can produce a lot more LoC per day than maintaining a legacy one. Given that vibe code is significantly more verbose, you're probably talking about ~15 engineers worth of code? I kn…

> It's only 510k LoC, at ~100 lines of code a day for a year, this code base would take 23 engineers a year to write.

Correction: a code base of 500kLoC would take 23 engineers a year to write. There is no indication that the functionality needed in a TUI app that does what this app does needs 500kLoC.

Re: Claude Code Unpacked : A visual guide

#268
post #135

Earlier quoted context omitted.

It's a TUI API wrapper with a few commands bolted on. I doubt it needs to be more than 20-50kloc. You can create a full 3D game with a custom 3D engine in 500k lines. What the hell is Claude Code doing?

Just check the leaked code yourself. Two biggest areas seem to be the `utils` module, which is a kitchen sink that covers a lot of functionality from sandboxing, git support, sessions, etc, and `components` module, which contains the react ui. You could certainly build a cli agent with much smaller codebase, with leaner ui code without react, but probably not with this truckload of functionality.

They are doing some strange "reinvent the wheel" stuff.

For example, I found an implementation of a PRNG, mulberry32 [1], in one of the files. That's pretty strange considering TS and Javascript have decent PRNGs built into the language and this thing is being used as literally just a shuffle.

[1] https://github.com/AprilNEA/claude-code-source/blob/main/src...

Re: Claude Code Unpacked : A visual guide

#269

Author here. I built this in a few hours after the Claude Code leak. I've been working on my own coding agent setup for a while. I mostly use pi [0] because it's minimal and easy to extend. When the leak happened, I wanted to study how Anthropic structured things: the tool system, how the agent loop flows, A 500K line codebase is a lot to navigate, so I mapped it visually to give myself a quick reference I could come…

How about releasing your own source code? It is a beautiful site, love the UX as well as functionality.

Guess what? People have ZERO reason to Open Source anything now.

Re: Claude Code Unpacked : A visual guide

#270
post #232

A 500k line codebase for an agent CLI proves one thing: making a probabilistic LLM behave deterministically is a massive state-management nightmare. Right now, they're great for prompting simple sites/platforms but they break at large enterprise repos. If you don't have a rigid, external state machine governing the workflow, you have to brute-force reliability. That codebase bloat is likely 90% defensive programming;…

I find it really strange that there is so much negative commentary on the _code_, but so little commentary on the core architecture. My takeaway from looking at the tool list is that they got the fundamental architecture right - try to create a very simple and general set of tools on the client-side (e.g. read file, output rich text, etc) so that the server can innovate rapidly without revving the client (and also so…

> but so little commentary on the core architecture.

The core architecture is not interesting? its an LLM tui, theres not much there to discuss architecturally. The code itself is the actual fascinating train wreck to look at.

Post reply on HN