Live data from Hacker News

How to code Claude Code in 200 lines of code

mihaileric.com

101–110 of 249 posts

Re: How to code Claude Code in 200 lines of code

#101

Earlier quoted context omitted.

can you show us the >>core of a coding agent which is, according to your words, >>really simple and would you mind sharing a URL so I could check it out then?

It's in TFA or in the https://ampcode.com/how-to-build-an-agent article I linked? Or is that not what you're looking for?

Sorry, sounded like "your version", instead of the one listed :-)

Re: How to code Claude Code in 200 lines of code

#102

Something I would add is planning. A big "aha" for effective use of these tools is realizing they run on dynamic TODO lists. Ex: Plan mode is basically bootstrapping how that TODO list gets seeded and how todos ground themselves when they get reached, and user interactions are how you realign the todo lists. The todolist is subtle but was a big shift in coding tools, and many seem to be surprised when we discuss it -…

at the end of the year than you get “How to Code Claude Code in 200 Million Lines of Code” :)

Re: How to code Claude Code in 200 lines of code

#103
post #54

What's interesting to me about the question of whether you could realistically compete with Claude Code (not Claude, but the CLI agent) is that the questions boil down to things any proficient developer could do. No matter how much I'd want to try, I have no hope of building a competitive frontier model --- "frontier model" is a distinctively apt term. But there's no such thing as a "frontier agent", and the Charmbra…

> the Charmbracelet people have as much of a shot at building something truly exception as Anthropic does.

Yes and no. OpenCode is a great example of yes. But at the same time Anthropic gets to develop both client and model together. THey get to use the signals from the client, and "bake in" some of the things into the model. So their model will work best with their client. And somewhat less competent with other clients (you can kinda sorta see that today with opus in cc vs. in cursor).

For example, cc was (to my knowledge) the first client to add tags from time to time. How often, how the model used them and so on? That's basically "signals", and they work together. And it works beautifully, as cc seems to stay on task better than OpenCode while using the same model.

Re: How to code Claude Code in 200 lines of code

#105

Earlier quoted context omitted.

[flagged]

This site has gone full Tower of Babel. I've seen at least a thousand "AI comment" callouts on this site in the last month and at this point I'm pretty sure 99% of them are wrong. In fact, can someone link me to a disputed comment that the consensus ends up being it's actually AI? I don't think I've seen one.

I think this might be one of the first times I didnt notice it, but just look through the comment history of https://news.ycombinator.com/threads?id=jackfranklyn , they all look the same.

Re: How to code Claude Code in 200 lines of code

#106
post #12

How many Claudes could Claude Code code if Claude Code could code Claude?

"if Claude Code could code Claude?" Claude Code already codes Claude Code. The limit is set by the amount of GPUs and energy supply.

The human element of the Anthropic organization also has some limits placed there.

Re: How to code Claude Code in 200 lines of code

#108

Earlier quoted context omitted.

[flagged]

This site has gone full Tower of Babel. I've seen at least a thousand "AI comment" callouts on this site in the last month and at this point I'm pretty sure 99% of them are wrong. In fact, can someone link me to a disputed comment that the consensus ends up being it's actually AI? I don't think I've seen one.

This article reads like AI

Re: How to code Claude Code in 200 lines of code

#109
post #50

The tip of the sphere in agentic code harnesses today is to RL train them as dedicated conductor/orchestrator models. Not 200 lines of Python.

Can you elaborate on this?

as a comparison, the gemini cli agent with gemini 2 half the time writes its own tool call parameters incorrectly. it didnt quite know when to make a tool call, which tool result was the most recent(it always assumed the first one was the one to use, rather than the last one, when multiple reads of the same file were in context) etc.

gemini 3 has pretty clearly been trained for this workflow of text output, since it can actually get the right calls in the first shot most of the time, and pays attention to the end of the context and not just the start.

gemini 3 is sitting within a format of text that it has been trained to be in, where for gemini 2, it only had the prompt to tell it how to work within the tool

Re: How to code Claude Code in 200 lines of code

#110

Something I would add is planning. A big "aha" for effective use of these tools is realizing they run on dynamic TODO lists. Ex: Plan mode is basically bootstrapping how that TODO list gets seeded and how todos ground themselves when they get reached, and user interactions are how you realign the todo lists. The todolist is subtle but was a big shift in coding tools, and many seem to be surprised when we discuss it -…

The TODO lists are also frequently re-inserted into the context HEAD to keep the LLM aware of past and next steps.

And in the event of context compression, the TODO serves as a compact representation of the session.

Post reply on HN