Live data from Hacker News

Claude Code: Best practices for agentic coding

anthropic.com

31–40 of 268 posts

Re: Claude Code: Best practices for agentic coding

#31
post #26
post #18

Earlier quoted context omitted.

Seriously? That’s wild. What kind of CS field could even handle that kind of daily spend for a bunch of people?

The kind of field where AI builds more in a day than a team or even contract dev does.

correct; utilised correctly these tools ship teams of output in a single day.

Re: Claude Code: Best practices for agentic coding

#32
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 files.

Avoid letting it search - even halt it. Find / rg can have a thousands of tokens of output depending on the search.

Never edit files manually during a session (that'll bust cache). THIS INCLUDES LINT.

The cache also goes away after 5-15 minutes or so (not sure) - so avoid leaving sessions open and coming back later.

Never use /compact (that'll bust cache, if you need to, you're going back and forth too much or using too many files at once).

Don't let files get too big (it's good hygiene too) to keep the context window sizes smaller.

Have a clear goal in mind and keep sessions to as few messages as possible.

Write / generate markdown files with needed documentation using claude.ai, and save those as files in the repo and tell it to read that file as part of a question. I'm at about ~$0.5-0.75 for most "tasks" I give it. I'm not a super heavy user, but it definitely helps me (it's like having a super focused smart intern that makes dumb mistakes).

If i need to feed it a ton of docs etc. for some task, it'll be more in the few $, rather than For a company, massively worth it. Insanely cheap productivity boost (if developers are responsible / don't get lazy / don't misuse it).

Re: Claude Code: Best practices for agentic coding

#33
post #15

The issue with many of these tips is that they require you use to claude code (or codex cli, doesn't matter) to spend way more time in it, feed it more info, generate more outputs --> pay more money to the LLM provider. I find LLM-based tools helpful, and use them quite regularly but not 20 bucks+, let alone 100+ per month that claude code would require to be used effectively.

> let alone 100+ per month that claude code would require I find this argument very bizarre. $100 is pay for 1-2 hours of developer time. Doesn't it save at least that much time in a whole month?

No, it doesn't. If you are still looking for product market fit, it is just cost.

After 2 years of GPT4 release, we can safely say that LLMs don't make finding PMF that much easier nor improve general quality/UX of products, as we still see a general enshittification trend.

If this spending was really game-changing, ChatGPT frontend/apps wouldn't be so bad after so long.

Re: Claude Code: Best practices for agentic coding

#34

If anyone from Anthropic is reading this, your billing for Claude Code is hostile to your users. Why doesn’t Claude Code usage count against the same plan that usage of Claude.ai and Claude Desktop are billed against? I upgraded to the $200/month plan because I really like Claude Code but then was so annoyed to find that this upgrade didn’t even apply to my usage of Claude Code. So now I’m not using Claude Code so mu…

Claude.ai/Desktop is priced based on average user usage. If you have 1 power user sending 1000 requests per day, and 99 sending 5, many even none, you can afford having a single $10/month plan for everyone to keep things simple. But every Claude Code user is a 1000 requests per day user, so the economics don't work anymore.

Well, take that into consideration then. Just make it an option. Instead of getting 1000 requests per day with code, you get 100 on the $10/month plan, and then let users decide whether they want to migrate to a higher tier or continue using the API model.

I am not saying Claude should stop making money, I'm just advocating for giving users the value of getting some Code coverage when you migrate from the basic plan to the pro or max.

Does that make sense?

Re: Claude Code: Best practices for agentic coding

#35

If anyone from Anthropic is reading this, your billing for Claude Code is hostile to your users. Why doesn’t Claude Code usage count against the same plan that usage of Claude.ai and Claude Desktop are billed against? I upgraded to the $200/month plan because I really like Claude Code but then was so annoyed to find that this upgrade didn’t even apply to my usage of Claude Code. So now I’m not using Claude Code so mu…

$200/month isn't that much. Folks, I'm hanging around with are spending $100 USD to $500 USD daily as the new norm as a cost of doing business and remaining competitive. That might seem expensive, but it's cheap... https://ghuntley.com/redlining

When should we expect to see the amazing products these super-competitive businesses are developing?

Re: Claude Code: Best practices for agentic coding

#37

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…

If I have to spend this much time thinking about any of this, congratulations, you’ve designed a product with a terrible UI.

Re: Claude Code: Best practices for agentic coding

#38

If anyone from Anthropic is reading this, your billing for Claude Code is hostile to your users. Why doesn’t Claude Code usage count against the same plan that usage of Claude.ai and Claude Desktop are billed against? I upgraded to the $200/month plan because I really like Claude Code but then was so annoyed to find that this upgrade didn’t even apply to my usage of Claude Code. So now I’m not using Claude Code so mu…

I’ve been using codemcp (https://github.com/ezyang/codemcp) to get “most” of the functionality of Claude code (I believe it uses prompts extracted from Claude Code), but using my existing pro plan.

It’s less autonomous, since it’s based on the Claude chat interface, and you need to write “continue” every so often, but it’s nice to save the $$

Re: Claude Code: Best practices for agentic coding

#39
I mostly work in neovim, but I'll open cursor to write boilerplate code. I'd love to use something cli based like Claude Code or Codex, but neither of them implement semantic indexing (vector embeddings) the way Cursor does. It should be possible to implement an MCP server which does this, but I haven't found a good one.

Re: Claude Code: Best practices for agentic coding

#40

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…

If I have to spend this much time thinking about any of this, congratulations, you’ve designed a product with a terrible UI.

Some tools take more effort to hold properly than others. I'm not saying there's not a lot of room for improvement - or that the ux couldn't hold the users hand more to force things like this in some "assisted mode" but at the end of the day, it's a thin, useful wrapper around an llm, and llms require effort to use effectively.

I definitely get value out of it- more than any other tool like it that I've tried.

Post reply on HN