Live data from Hacker News

Claude Code: Best practices for agentic coding

anthropic.com

111–120 of 268 posts

Re: Claude Code: Best practices for agentic coding

#111

Earlier quoted context omitted.

$100/day seems reasonable as an upper-percentile spend per programmer. $500/day sounds insane. A 2.5 hour session with Claude Code costs me somewhere between $15 and $20. Taking $20/2.5 hours as the estimate, $100 would buy me 12.5 hours of programming.

It sounds insane until you drive full agentic loops/evals. I'm currently making a self-compiling compiler; no doubt you'll hear/see about it soon. The other night, I fell asleep and woke up with interface dynamic dispatch using vtables with runtime type information and generic interface support implemented...

[dead]

Re: Claude Code: Best practices for agentic coding

#112
post #100

Surprised that "controlling cost" isn't a section in this post. Here's my attempt. --- If you get a hang of controlling costs, it's much cheaper. If you're exhausting the context window, I would not be surprised if you're seeing high cost. Be aware of the "cache". Tell it to read specific files (and only those!), if you don't, it'll read unnecessary files, or repeatedly read sections of files or even search through f…

I don't think about controlling cost because I price my time at US$40/h and virtually all models are cheaper than that (with the exception of o1 or Gemini 2.5 pro). If I spend $2 instead of $0.50 on a session but I had to spend 6 minutes thinking about context, I haven't gained any money.

Important to remind people this is only true if you have a profitable product, otherwise you’re spending money you haven’t earned.

Re: Claude Code: Best practices for agentic coding

#113
post #100

Surprised that "controlling cost" isn't a section in this post. Here's my attempt. --- If you get a hang of controlling costs, it's much cheaper. If you're exhausting the context window, I would not be surprised if you're seeing high cost. Be aware of the "cache". Tell it to read specific files (and only those!), if you don't, it'll read unnecessary files, or repeatedly read sections of files or even search through f…

I don't think about controlling cost because I price my time at US$40/h and virtually all models are cheaper than that (with the exception of o1 or Gemini 2.5 pro). If I spend $2 instead of $0.50 on a session but I had to spend 6 minutes thinking about context, I haven't gained any money.

If you do it a bit, it just becomes habit / no extra time or cognitive load.

Correlation or causation aside, the same people I see complain about cost, complain about quality.

It might indicate more tightly controlled sessions may also produce better results.

Or maybe it's just people that tend to complain about one thing, complain about another.

Re: Claude Code: Best practices for agentic coding

#114
post #100

Earlier quoted context omitted.

I don't think about controlling cost because I price my time at US$40/h and virtually all models are cheaper than that (with the exception of o1 or Gemini 2.5 pro). If I spend $2 instead of $0.50 on a session but I had to spend 6 minutes thinking about context, I haven't gained any money.

Important to remind people this is only true if you have a profitable product, otherwise you’re spending money you haven’t earned.

If your expectation is to produce the same amount of output, you could argue when paying for AI tools, you're choosing to spend money to gain free time.

4 hours coding project X or 3 hours and a short hike with your partner / friends etc

Re: Claude Code: Best practices for agentic coding

#115

Earlier quoted context omitted.

I wonder what will happen first - will companies move to LLMs, or to programmers from abroad (because ultimately, it will be cheaper than using LLMs - you've said ~$500 per day, in Poland ~$1500 will be a good monthly wage - and that still will make us expensive! How about moving to India, then? Nigeria? LATAM countries?)

> in Poland ~$1500 will be a good monthly wage The minimum wage in Poland is around USD 1240/month. The median wage in Poland is approximately USD 1648/month. Tech salaries are considerably higher than the median. Idk, maybe for an intern software developer it's a good salary...

Minimal is ~$930 after taxes, though; I rarely see people talk here about salary pre-tax, tbh.

~$1200 is what I'd get paid here after a few years of experience; I have never saw an internship offer in my city that paid more than minimal wage (most commonly, it's unpaid).

Re: Claude Code: Best practices for agentic coding

#117

Earlier quoted context omitted.

Neat, thanks, I had no idea! Edit: It so happens I had a Claude Code session open in my Terminal, so I asked it: Save your current context to a file. Claude produced a 91 line md file... surely that's not the whole of its context? This was a reasonably lengthy conversation in which the AI implemented a new feature.

What is in the file?

An overview of the project and the features implemented.

Edit: Here's the actual file if you want to see it. https://gist.github.com/Wowfunhappy/e7e178136c47c2589cfa7e5a...

Re: Claude Code: Best practices for agentic coding

#118

Claude Code works fairly well, but Anthropic has lost the plot on the state of market competition. OpenAI tried to buy Cursor and now Windsurf because they know they need to win market share, Gemini 2.5 pro is better at coding than their Sonnet models, has huge context and runs on their TPU stack, but somehow Anthropic is expecting people to pay $200 in API costs per functional PR costs to vibe code. Ok.

> but somehow Anthropic is expecting people to pay $200 in API costs per functional PR costs to vibe code. Ok.

Reading the thread, somehow people are paying. It is mindblowing how in place of getting cheaper, development just got more expensive for businesses.

Re: Claude Code: Best practices for agentic coding

#119

Earlier quoted context omitted.

You can ask it to store its current context to a file, review the file, ask it to emphasize or de-emphasize things based on your review, and then use `/clear`. Then, you can edit the file at your leisure if you want to. And when you want to load that context back in, ask it to read the file. Works better than `/compact`, and is a lot cheaper.

Compared to my experience with the free GitHub Copilot in VS Code it sounds like you guys are in a horse and buggy.

I'm excited for the improvements they've had recently but I have better luck with Cline in regular vs code, as well as cursor.

I've tried Claude code this week and I really didn't like it - Claude did an okay job but was insistent on deleting some shit and hard coding a check instead of an actual conditional. It got the feature done in about $3, but I didn't really like the user experience and it didn't feel any better than using 3.7 in cursor.

Re: Claude Code: Best practices for agentic coding

#120
post #29

So I have been using Cursor a lot more in a vibe code way lately and I have been coming across what a lot of people report: sometimes the model will rewrite perfectly working code that I didn't ask it to touch and break it. In most cases, it is because I am asking the model to do too much at once. Which is fine, I am learning the right level of abstraction/instruction where the model is effective consistently. But wh…

> So I have been using Cursor a lot more in a vibe code way lately and I have been coming across what a lot of people report: sometimes the model will rewrite perfectly working code that I didn't ask it to touch and break it.

I don't find this particularly problematic because I can quickly see the unnecessary changes in git and revert them.

Like, I guess it would be nice if I didn't have to do that, but compared to the value I'm getting it's not a big deal.

Post reply on HN