Live data from Hacker News

Claude Code: Best practices for agentic coding

anthropic.com

61–70 of 268 posts

Re: Claude Code: Best practices for agentic coding

#61

Earlier quoted context omitted.

> 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.

Enshittification is the result of shitty incentives in the market not because coding is hard

Re: Claude Code: Best practices for agentic coding

#62

Earlier quoted context omitted.

> 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.

Finding product market fit is a human directional issue, and LLMs absolutely can help speed up iteration time here. I’ve built two RoR MVPs for small hobbby projects spending ~$75 in Claude code to make something in a day that would have previously taken me a month plus. Again, absolutely bizarre that people can’t see the value here, even as these tools are still working through their kinks.

Re: Claude Code: Best practices for agentic coding

#63
post #59

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.

Tool-calling agents with search tools do very well at information retrieval tasks in codebases. They are slower and more expensive than good RAG (if you amortize the RAG index over many operations), but they're incredibly versatile and excel in many cases where RAG would fall down. Why do you think you need semantic indexing?

> Why do you think you need semantic indexing?

Unfortunately I can only give an anecdotal answer here, but I get better results from Cursor than the alternatives. The semantic index is the main difference, so I assume that's what's giving it the edge.

Re: Claude Code: Best practices for agentic coding

#64
post #56

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…

Oh wow. Reading your comment guarantees I'll never use Claude Code. I use Aider. It's awesome. You explicitly specify the files. You don't have to do work to limit context.

Yeah, I tried CC out and quickly noticed it was spending $5+ for simple LLM capable tasks. I rarely break $1-2 a session using aider. Aider feels like more of a precision tool. I like having the ability to manually specify.

I do find Claude Code to be really good at exploration though - like checking out a repository I'm unfamiliar with and then asking questions about it.

Re: Claude Code: Best practices for agentic coding

#65
post #16

What's the Gemini equivalent of Claude Code and OpenAI's Codex? I've found projects like reugn/gemini-cli, but Gemini Code Assist seems limited to VS Code?

There's Aider, Plandex and Goose, all of which let you chose various providers and models. Aider also has a well known benchmark[0] that you can check out to help select models. - Aider - https://aider.chat/ | https://github.com/Aider-AI/aider - Plandex - https://plandex.ai/ | https://github.com/plandex-ai/plandex - Goose - https://block.github.io/goose/ | https://github.com/block/goose [0] https://aider.chat/docs/le…

I've only user aider (which I like quite a bit more than cursor) but I'm curious how it compares to plandex and goose.

Re: Claude Code: Best practices for agentic coding

#66

> Use /clear to keep context focused The only problem is that this loss is permanent! As far as I can tell, there's no way to go back to the old conversation after a `/clear`. I had one session last week where Claude Code seemed to have become amazingly capable and was implementing entire new features and fixing bugs in one-shot, and then I ran `/clear` (by accident no less) and it suddenly became very dumb.

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.

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.

Re: Claude Code: Best practices for agentic coding

#67
post #44

Earlier quoted context omitted.

This would put anthropic in the business of minimizing the context to increase profits, same as Cursor and others who cheap out on context and try to RAG etc. Which would quickly make it worse, so I hope they stay on api pricing Some base usage included in the plan might be a good balance

You know, I wouldn't mind if they just applied the API pricing after Claude Code ran through the plan limits. It would definitely get me to use it more.

Claude Code and Claude.ai are separate products.

Re: Claude Code: Best practices for agentic coding

#68

Earlier quoted context omitted.

$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

$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.

Asking very specific questions to Sonnet 3.7 costs a couple of tenths of a cent every time, and even if you're doing that all day it will never amount to more than maybe a dollar at the end of the day.

On average, one line of, say, JavaScript represents around 7 tokens, which means there are around 140k lines of JS per million tokens.

On Openrouter, Sonnet 3.7 costs are currently:

- $3 / one million input tokens => $100 = 33.3 million input tokens = 420k lines of JS code

- $15 / one million output tokens => $100 = 3.6 million output tokens = 4.6 million lines of JS code

For one developer? In one day? It seems that one can only reach such amounts if the whole codebase is sent again as context with each and every interaction (maybe even with every keystroke for type completion?) -- and that seems incredibly wasteful?

Re: Claude Code: Best practices for agentic coding

#69

Earlier quoted context omitted.

$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

$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...

Re: Claude Code: Best practices for agentic coding

#70
post #16

Earlier quoted context omitted.

There's Aider, Plandex and Goose, all of which let you chose various providers and models. Aider also has a well known benchmark[0] that you can check out to help select models. - Aider - https://aider.chat/ | https://github.com/Aider-AI/aider - Plandex - https://plandex.ai/ | https://github.com/plandex-ai/plandex - Goose - https://block.github.io/goose/ | https://github.com/block/goose [0] https://aider.chat/docs/le…

I've only user aider (which I like quite a bit more than cursor) but I'm curious how it compares to plandex and goose.

Hi, creator of Plandex here. In case it's helpful, I posted a comment listing some of the main differences with aider here: https://news.ycombinator.com/item?id=43728977
Post reply on HN