Live data from Hacker News

Claude Code: Best practices for agentic coding

anthropic.com

161–170 of 268 posts

Re: Claude Code: Best practices for agentic coding

#161
post #155

So I feel like a grandpa reading this. I gave Claude code a solid shot. Had some wins but costs started blowing up. I switched to Gemini AI where I only upload files I want it to work on and make sure to refactor often so modularity remains fairly high. It's an amazing experience. If this is any measure - I've been averaging about 5-6 "small features" per 10k tokens. And I totally suck at fe coding!! The other intere…

by fe the poster means FE (front-end)

Sorry yes. I should have clarified that.

Re: Claude Code: Best practices for agentic coding

#162

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 assume they use a conversation, so if you compress the prompt immediately you should only break cache once, and still hit cache on subsequent prompts?

So instead of Write Hit Hit Hit

It's Write Write Hit Hit Hit

Re: Claude Code: Best practices for agentic coding

#163
post #41

Earlier quoted context omitted.

LLMs absolutely don't replicate staff+ engineers. If your staff engineers are mostly doing things AI can do, then you don't need staff. Probably don't even need senior

That's my point. - L3 SWE II - $193,712 USD (before overheads) - L4 SWE III - $297,124 USD (before overheads) - L5 Senior SWE - $377,797 USD (before overheads) These tools and foundational models get better every day, and right now, they enable Staff+ engineers and businesses to have less need for juniors. I suspect there will be [short-to-medium-term] compression. See extended thoughts at https://ghuntley.com/screwe…

> These […] get better every day.

They do, but I’ve seen a huge slowdown in “getting better” in the last year. I wonder if it’s my perception, or reality. Each model does better on benchmarks but I’m still experiencing at least a 50% failure rate on _basic_ task completion, and that number hasn’t moved higher in many months.

Re: Claude Code: Best practices for agentic coding

#164
post #149

The "ultrathink" thing is pretty funny: > We recommend using the word "think" to trigger extended thinking mode, which gives Claude additional computation time to evaluate alternatives more thoroughly. These specific phrases are mapped directly to increasing levels of thinking budget in the system: "think" I had a poke around and it's not a feature of the Claude model, it's specific to Claude Code. There's a "megathi…

[deleted]

Re: Claude Code: Best practices for agentic coding

#165
post #132

Earlier quoted context omitted.

Think about what you would do in an unfamiliar project with no context and the ticket "please fix the authorization bug in /api/users/:id". You'd start by grepping the code base and trying to understand it. Compare that to, "fix the permission in src/controllers/users.ts in the function `getById`. We need to check the user in the JWT is the same user that is being requested"

So, AIs are overeager junior developers at best, and not the magical programmer replacements they are advertised as.

The grandparent is talking about how to control cost by focusing the tool. My response was to a comment about how that takes too much thinking.

If you give a junior an overly broad prompt, they are going to have to do a ton of searching and reading to find out what they need to do. If you give them specific instructions, including files, they are more likely to get it right.

I never said they were replacements. At best, they're tools that are incredibly effective when used on the correct type of problem with the right type of prompt.

Re: Claude Code: Best practices for agentic coding

#166
post #149

The "ultrathink" thing is pretty funny: > We recommend using the word "think" to trigger extended thinking mode, which gives Claude additional computation time to evaluate alternatives more thoroughly. These specific phrases are mapped directly to increasing levels of thinking budget in the system: "think" I had a poke around and it's not a feature of the Claude model, it's specific to Claude Code. There's a "megathi…

Not gonna lie: the "ultrathink" keyword that Sonnet 3.7 with thinking tokens watches for gives me "doubleplusgood" vibes in a hilarious but horrifying way.

At this point should we get our first knob/slider on a language model... THINK

..as if we're operating this machine as analog synth

Re: Claude Code: Best practices for agentic coding

#167
post #98
post #89

Earlier quoted context omitted.

That's why I like Aider. You can protect your files in a non-AI way: by simply not giving write access to Aider. Also, apparently Aider is a bit more economic with tokens than other tools.

I haven't used Aider yet, but I see it show up on HN frequently recently (the last couple of days specifically). I am hesitant because I am paying for Cursor now and I get a lot of model usage included within that monthly cost. I'm cheap, perhaps to a fault even when I could afford it, and I hate the idea of spending twice when spending once is usually enough. So while Aider is potentially cheaper than Claude Code, i…

As an Aider user who has never tried Cursor, I’d also be interested in hearing from any Aider users who are using Cursor and how it compares.

Re: Claude Code: Best practices for agentic coding

#168
post #149

The "ultrathink" thing is pretty funny: > We recommend using the word "think" to trigger extended thinking mode, which gives Claude additional computation time to evaluate alternatives more thoroughly. These specific phrases are mapped directly to increasing levels of thinking budget in the system: "think" I had a poke around and it's not a feature of the Claude model, it's specific to Claude Code. There's a "megathi…

Weird code to have in a modern AI system!

Also 14 string scans seems a little inefficient!

Re: Claude Code: Best practices for agentic coding

#169
post #166

Earlier quoted context omitted.

Not gonna lie: the "ultrathink" keyword that Sonnet 3.7 with thinking tokens watches for gives me "doubleplusgood" vibes in a hilarious but horrifying way.

At this point should we get our first knob/slider on a language model... THINK ..as if we're operating this machine as analog synth

There are already many such adjustable parameters such as temperature and top_k

Re: Claude Code: Best practices for agentic coding

#170
post #149

The "ultrathink" thing is pretty funny: > We recommend using the word "think" to trigger extended thinking mode, which gives Claude additional computation time to evaluate alternatives more thoroughly. These specific phrases are mapped directly to increasing levels of thinking budget in the system: "think" I had a poke around and it's not a feature of the Claude model, it's specific to Claude Code. There's a "megathi…

In aider, instead of “ultrathink” you would say:

  /thinking-tokens 32k
Or, shorthand:

  /think 32k
Post reply on HN