Live data from Hacker News

Claude Code: Best practices for agentic coding

anthropic.com

51–60 of 268 posts

Re: Claude Code: Best practices for agentic coding

#51

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

They've worked to improve this with "memories" (hash symbol to "permanently" record something - you can edit later if you want).

And there's CLAUDE.md. it's like cursorrules. You can also have it modify it's own CLAUDE.md.

Re: Claude Code: Best practices for agentic coding

#52
post #44

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…

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.

Re: Claude Code: Best practices for agentic coding

#53

Earlier quoted context omitted.

I would accept a higher-priced plan (which covered both my use of Claude.ai/Claude Desktop AND my use of Claude Code). Anthropic make it seem like Claude Code is a product categorized like Claude Desktop (usage of which gets billed against your Claude.ai plan). This is how it signs off all its commits: Generated with [Claude Code](https://claude.ai/code) At the very least, this is misleading. It misled me. Once I had…

Maybe you can cancel your subscription or charge back? I think it's just oversight on their part. They have nothing to gain by making people believe they would get Claude Code access through their regular plans, only bad word of mouth.

To be fair to them, they make it pretty easy to manage the subscription, downgrade it, etc.

This is definitely not malicious on their part. Just bears pointing out.

Re: Claude Code: Best practices for agentic coding

#54
post #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 $$

Thanks, makes sense that an MCP server that edits files is a workaround to the problem.

Re: Claude Code: Best practices for agentic coding

#55
post #13

Earlier quoted context omitted.

> ... usage limits that would make it very difficult to use for Claude Code. Genuinely interested: how's so?

Well, I think it'd be pretty irritating to see the message "3 messages remaining until 6PM" while you are in the middle of a complex coding task.

Conversely I have to manually do this and monitor the billing instead.

Re: Claude Code: Best practices for agentic coding

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

Re: Claude Code: Best practices for agentic coding

#57
post #26

Earlier quoted context omitted.

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.

Do you have a link to some of this output? A repo on Github of something you’ve done for fun?

I get a lot of value out of LLMs but when I see people make claims like this I know they aren’t “in the trenches” of software development, or care so little about quality that I can’t relate to their experience.

Usually they’re investors in some bullshit agentic coding tool though.

Re: Claude Code: Best practices for agentic coding

#58

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.

I use a small plugin I’ve written my self to interact with Claude, Gemini 2.5 pro or GPT. I’ve not really seen the need for semantic searching yet. Instead I’ve given the LLM access to LSP symbol search, grep and the ability to add files to the conversation. It’s been working well for my use cases but I’ve never tried Cursor so I can’t comment on how it compares. I’m sure it’s not as smooth though. I’ve tried some of the more common Neovim plugins and for me it works better, but the preference here is very personal. If you want to try it out it’s here: https://github.com/isaksamsten/sia.nvim

Re: Claude Code: Best practices for agentic coding

#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?

Re: Claude Code: Best practices for agentic coding

#60

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

Post reply on HN