r/ClaudeCode • • 29d ago

Help/Question How do you guys code with AI?

I've saw 2 (main) camps so far in AI coding:

  1. Get a smarter model (opus 5.5 or sol 6.1) to code directly then either human / get another agent to review

  2. Get the smarter model (again opus 5.5 or sol 6.1) to plan and orchestrate then a weak agent to code (luna 6 or GLM 5.3 etc.) then a mid/smart model to check (sonnet 5.5 or sol 6.1)

which would you guys suggest and what's your experience with the 2 paths? Or is there a smarter way to do this?

I have tried both, and while #2 seems to save a bit of token, it doesn't save a lot, especially if you are on a subscription plan as the back and forth loop of checking and coding seems to burn a lot of tokens still. And #2 seems to be a lot slower (if #1 can finish a task in 10mins, #2 seems to need to take 20+ mins).

58 Upvotes

94 comments sorted by

•

u/AutoModerator 29d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

199

u/arbitrarycivilian 29d ago • Mindblown

Haiku to plan, then force Opus to follow that plan no matter how much it objects

82

u/minibonk 29d ago • Mindblown

kinky

22

u/Guinness 29d ago

Some men just want to watch the tokens burn.

11

u/PeaceNo5259 29d ago

Taking lessons from the "we discovered that LLMs can feel pain" article, I see?

1

u/AcropolisBuff 16d ago

so AI torture chamber it is?

4

u/opsers 29d ago

I thought Anthropic disabled AI torture.

3

u/martin_xs6 29d ago

Basically how software engineers have been working for years.

1

u/HashMismatch 29d ago

Shouldnt this be reversed so the orchestrator has the brain power and the coding agent is executing the design spec laid out by the orchestrator?

9

u/NotableCarrot28 29d ago

Whoosh

0

u/HashMismatch 28d ago

Lol, a polite rebuttal met with internet scorn… just another day riding the highs and lows of reddit

3

u/NotableCarrot28 28d ago

It was clearly a joke, wasn't supposed to be taken seriously

57

u/ace33331 29d ago

I ask it to code, and it does.

30

u/alexeiz Vibe Coder 29d ago

3. Get a smarter model (open 5.5 or 6.1 sol) to plan. Then the same model to implement. Don't even change the effort, always on high. Then get another smarter model to review (implement with sol, review with opus and vice versa).

4

u/Tistouuu 🔆 Max 20 29d ago

Yep. Straightforward. 5.5 made it viable for 

5

u/wegster 29d ago

Don't leave us hanging bro...

3

u/Lone10 29d ago

For what?!

2

u/Tistouuu 🔆 Max 20 29d ago

there's a deeznuts joke to be made here, i know it

0

u/privatetudor 29d ago

For what?

1

u/AllMFHH 29d ago

Did you know there's a model called opusplan that just does that? It says Not Supported Model, but it uses Opus to plan and Sonnet to work. Just don't forget to use /plan lol

Looking at /usage, it then has both

44

u/beargambogambo 29d ago

#1. It’s not even close. Just turn down the effort after planning if you need. Honestly, intelligence is getting cheaper, it’s not that big of an issue to just use opus for everything on medium effort.

2

u/NotableCarrot28 29d ago

Nah effort high only.

Medium effort just doesn't check anything (execution, planning)

9

u/CaramelEmotional3092 29d ago

I use opus 5.5 a lot for dev on the max 5. I find codex $20 tier works really well for audits and reviews.
But I can use opus, have it find no faults, change my prompts and find severe and critical issues.

Same software and models but I guarantee the more senior developers know what to ask for and likely get better results then I can.

One thing I started doing is having a Claude project that handles audits, only audits. Use that on opus 5.5, then try fable, and then the codex audits add and teach it further, and then auditing your next project becomes easier.
Every time the newest version of opus / other comes out, I have the audit tool rerun. My projects are split into a list of p0, p1, p2, and the audit tool leaves a handoff in each project folder with instructions to update the audit tool. The audiit tool then tells me which sites done, outstanding and confirms the live versions are up to date.

7

u/Certain_Ring403 29d ago

Get smart model to make a plan, get a smart model to review the plan, human to review the plan, smart model to code, a smart model
to review the code, human to review the review and final code.

4

u/eXperience79 29d ago

Has the human also be be smart?

6

u/dreadpirater 29d ago

Everyone's right that you WILL be frustrated with your '#2' because it can take six turns to get right what a smarter model would have in 1. But there's one thing to be said for doing a project or two with a Luna grade executor - it will teach you to look at a ticket and say.. . "nope, that's not tight enough. This needs to be broken up or specified more clearly." If you get good enough at specifying and planning that you can get mostly decent results out of Luna that is going to make you a much better developer when you give yourself permission to use a smarter agent.

I'd recommend the middle road - I have Opus plan and Sonnet execute and am pretty happy with the token efficiency and quality of output. For things that are really well specified, You can get a couple of hours per day out of Deepseek V4.1 on Freebuff, too, if you want to stretch your tokens by saving on the easy tasks so you can use a smarter agent on the hard ones.

2

u/[deleted] 29d ago

There is a real risk this cuts the other way. If you train yourself to write tickets tight enough for Luna, you will keep writing them that tight for Opus, and then you are paying the smart model to follow instructions it could have figured out on its own. The skill that transfers is knowing which details matter, not writing more of them.

1

u/dreadpirater 29d ago

Good point to bring up - balance is the goal. But if I have to err, I'm going to err on the side of overspecify rather than under. It's not a 1:1 waste because Opus will quickly recognize that you've handed it a solid plan and NOT burn the same quantity of tokens it would have burnt if you'd asked it to make the plan. Overspecifying guarantees good results and risks paying a little extra for them. Underspecifying risks good results AND risks ending up paying for more tokens to go back and do it again.

Though that opinion is partly based on my confidence that for most of the things I do, I'm still a better judge of plan than Opus is. If I wander into an area I DON'T understand, then there's a bigger risk to me being too precise because Opus may shrug and do it the stupid way I suggested rather than the better way it might have gone with on it's own.

So there definitely are tradeoffs but I still think there's more danger in NOT being able to fully describe what you want done than there is in getting too comfortable with it.

1

u/[deleted] 28d ago

The reviewer point is the load-bearing one, honestly. If you can genuinely review the diff, overspec is cheap insurance. The trap I've seen is people writing detailed specs for code they can't actually review, and then the spec quietly becomes the deliverable. So it comes down to which side your review skill sits on.

1

u/wegster 29d ago

Yeah, this one is interesting and undoubtedly will find a way to F me at some point.

I, like more than a few others likely, have my own end to end framework, repo-up, meaning in-repo guidance, plus harness (mostly pi currently), ticket system, dispatchers, and patterns used for specs, review, etc. I've also been looking to shift more local, but this was after a whole lot of angst on playing with Claude and OpenAI / models for planning and execution vs burn rates (made more fun by using subs, so having to approximate at best by API published rates), then throwing local models into the mix as well.

So fundamentally, my framework itself is intentionally generic, as I've now also added openrouter into the mix to do some testing of deepseek, MiMo, MiniMax etc.

So yeah, flashbacks to tons of *nix #ifdefs coming soon to models/agents near you. :-/

1

u/Blackhat165 29d ago

Opus orchestrator, haiku writer, haiku reviewer, opus approver. Burned a pro weekly allowance testing them all tasks from my project and haiku was pretty great.

1

u/AcropolisBuff 29d ago

how does this compares in terms of usage (eg. how many features can you code in a week), quality, design?

and, doesn't Haiku cost ramp up after 100K context?

1

u/Blackhat165 29d ago

Here’s a recent deeper explanation of how I got here. Performance with Haiku was better than Sonnet for reasons I cannot comprehend.

https://www.reddit.com/r/ClaudeAI/s/KqBxuMENZh

Cost wise, the long context price is still 1/4 of sonnet. But the writer and reviewers used ~50% more output tokens at the same effort, so that eats into the advantage. But Haiku took advantage of that and consistently delivered more thorough scripts and reviews. Did not try Sonnet on higher effort as I’d burned enough usage by that point.

As far as speed, Haiku was actually 20-30% slower than sonnet. Sonnet might take 12 minutes to write a script, Haiku 15 minutes. So there is a small drawback. That time estimate might give you a sense of how big or small this task is relative to your typical work.

4

u/minibonk 29d ago

are you on crack? haiku??

1

u/Blackhat165 29d ago

No crack, yes haiku.

It’s not based on vibes, I burned a significant amount of tokens testing it on real tasks in my project, creating the same scripts with all 3 models, tracking how they converged throughout the process. Haiku just did really, really well, better than sonnet actually for both review and writing. Opus is the best reviewer which is why it gets the approver slot.

I suspect results would have been different without a really thorough spec.

1

u/FragmentedHeap 29d ago

Opus 5.5 max -> opus 5.5 medium, full send

$200 sub, runs out by Wednesday.

I supplement other work with google ultra/antigravity

Quality coming out is very high

1

u/AcropolisBuff 29d ago

I only have a Pro Plan

1

u/FragmentedHeap 29d ago

AI going to be expensive for good, and whoever has the best AI is going to beat everyone that doesn't. Going to be Pay2Win real soon.

1

u/Fit_Somewhere1642 17d ago

Get a smart model to plan out, review the plan and orchestrate, then lower the effort and execute, lastly review changes & bugfix with low effort

1

u/AcropolisBuff 16d ago

does this work better (more efficient limit / token usage, and better code quality) than smart model plan and orchestrate and cheap model code?

3

u/ThreeAMOperator 29d ago

1, with one change: make the reviewer a different model from the writer. I let Opus write and Codex review, or the other way round, but never the same model on its own work. The reviewer reads the diff cold, so it catches what the author talked itself past in its own reasoning.

In my experience #2 burns tokens because the cheap coder needs several rounds of fixes, and every round reloads the context, which also explains why it's slower for you. Where dropping down a model does pay is the boring stuff like renames, test scaffolding and docs. Give that to the cheap one with tests it has to pass, and keep the strong model for anything that touches design.

3

u/air_thing Vibe Coder 29d ago

It's just Opus 5.5 on Max chainsawing through everything for me.

2

u/hundfe 29d ago

Opus High for everything. xHigh for design

2

u/Tistouuu 🔆 Max 20 29d ago

Honestly opus 5.5 high for everything, and I still don't use all of my weekly despite trying very hard 

2

u/kkingsbe 29d ago

- Think through the problem with Fable/Opus
- Plan with Opus
- in a new session, have an Opus orchestrator implement, test, and validate (as separate phases) the plan, using sonnet subagents
- at the end have either opus or fable do a code review of your final PR

3

u/I-effin-love-tacos 29d ago

One word. Spec driven development

-7

u/Black_Magic100 29d ago

SDD is completely dead at this point. I'm not suggesting that specs are dead, especially those of which that are ephemeral.. but the whole idea of SDD was only a fad for a few months

1

u/fredastere 29d ago

What?

How do you handle state projects then? The moment you save them on a file, isn't it SDD?

-3

u/Black_Magic100 29d ago

I'm not sure what you mean by "state projects". I do save off issues on GitHub with key decisions, but those are mostly ephemeral. Long living decisions live as ADRs, not specs in /docs

0

u/fredastere 29d ago

So you use one kind of document to catalog and keep track

But the concept of using a document to catalog and keep track you say its dead?

Sure dont use a .md but isn't it conceptually extremely similar?

-3

u/Black_Magic100 29d ago

You are being intentionally pedantic. SDD where you define a rigid spec upfront and then constantly recheck the code base against that long-lasting spec is completely dead. It was "viral" for a few months, but have you ever considered why almost no body mentions it anymore? It's a complete waste of tokens and not all that efficient. The difference with my workflow is that you have a short lived spec to implement a given feature which is broken up into tasks (1 task per session). Once all tasks are complete, the spec is thrown away. During the implementation, it's possible an ADR is added if there some critical infrastructure or security implication, but that ADR is extremely high level and simple.

1

u/unconceivables 29d ago

Only #1. Lesser models just aren't good for code.

1

u/Mindless-Trouble-416 29d ago

Sonnet brother, sonnet. Use opus to orchestrate and review but use sonnet aggressively

1

u/reactive_dmv_pattern 29d ago

I tired sol and Luna max combo. Absolute dog shit.

1

u/goomyman 29d ago

Know what you want. Ask AI to code it piece by piece. Verify it. Commit it in small chunks for rollback.

1

u/evangelism2 29d ago

If you actually have proper guardrails and orchestration flow set up, 2. If you don't, 1
You can get a lot more done with two

1

u/akhi1uuu 29d ago

where did the extra 10 minutes go in #2, waiting for the first attempt or fixing it after review? i'd separate those before changing the whole setup. if the cheap model gets it right but takes longer, that's a different tradeoff from needing three rounds of repairs

1

u/NYProDev 29d ago

Building a desktop SSH key manager (Tauri, Rust + React) almost entirely with Claude Code, ~43k lines and I've written very little of it by hand. What helped most is making the repo easy for the AI to check its own work: lots of tests that never touch my real ~/.ssh, TS types generated from Rust, a mock backend so it can open the UI in a browser, and CI on mac/win/linux. For big features we write a design doc first, then split the work into parallel sessions in separate git worktrees, and I review and merge. https://github.com/nuriddin2468/ssh-key-manager

1

u/HomemadeBananas 29d ago

Unless you are on the $20 plan and really need to squeeze some extra usage then I wouldn’t bother with the second way. With Opus 5.5 I haven’t been able to use up my limit, using the $125 teams plan at work all day.

1

u/IntelligentCut4975 29d ago

I don’t know, but do y’all feel the same? Anthropic’s current-gen models are slower, right? Of course they reason more, but there’s so much wait time. To answer the main question, I’m slowly trying to take back the thinking, but the expectations are so high with AI in mind that using less AI just isn’t possible.

1

u/djiyvlom 29d ago

Your observation matches what a lot of people see: the planner plus cheap coder split rarely saves much on a subscription, because the review loops eat the difference and the handoffs lose context. What tends to work better is one strong model doing both, but with a written plan step first and narrow tasks, so it isn't re-reading half the repo every turn. Delegation pays off when the subtasks are truly independent and well specified, like parallel changes to separate files with a clear spec each. If the spec is fuzzy, the weaker agent just generates more review work.

1

u/SubjectOrigin 29d ago

Model is less important, you should think of your own harness that is suited for your project

It means specific model routing, dedicated agents for diff tasks based on the need - proper memory system and tools management. Then u may notice that sonnet is enough for most of the tasks, opus only when you need some stronger reinforcement etc etc

Plan / implement / review pattern is kinda outdated for me tbh , there is some useful idea behind graphs in general, but yeah, think more of harness setup than model setup

1

u/CoreDumped96 29d ago

Opus medium/High for planning and low for implementing

1

u/wegster 29d ago

I'm with u/Blackhat165 , but amusingly in many cases, you can even use a lower model for Planning for many tasks. In general, higher thinking for the planner, but if you're multi-turning the planning, regardless of how (e.g. grill-me, concrete spec or planning doc formats, whatever), even lower thinking or 'last gen' models do a decent enough job. As in, you could pretty much use GPT o4 for a significant amount of planning work.

Then dispatch to a lower thinking/reasoning / generation model for execution, and then review separately.

And yeah, also with Blackhat here - Haiku and Luna can get a ton of work done while sipping on usage credits, whether via sub or API use.

The higher / newer gen models can help reduce the multi-turn in planning, and sometimes do a better job at catching things that might cause issues later for planning, but yeah short version: higher thinking/reasoning for plan, simple/cheaper for execution, separate reviewer.

1

u/Blackhat165 29d ago

Sorry to send you on a goose chase but I’ve made some comments on the comments below my original elaborating on the tests I did. You’d probably find it interesting.

Question: have you tried Haiku on API tasks? Like classification or summarization? My experience is it is absolutely terrible at the things small models are known for, but am curious if that’s your experience. Like worse than 4.5 even. Generally I reach for Luna on simple API stuff.

1

u/wegster 29d ago

All good, most threads get confusing anyways :D

I haven't banged on Haiku in a while now, as I'm at the moment using Codex and local models for most execution. However, I did a lot of work with it previously.

In prep for an inbound 256GB Ultra Studio, have been doing a lot (as in 200+ real repo isolated benchmarks right up to multi-repo where Open and MiMo were the only 2 to crack 60/100 (no Fable via CLI so skipped it), and as we know, they (not just Claude/Anthropic) love to change personalities/relative ranking across releases - I'll see if I can give it a few runs to compare.

The pattern holds true in general, even if Anthropic and OpenAI, others love to throw sporadic wrenches in the works - with a good plan, decomposed spec including tests, lower tier models make ideal, much more cost efficient executors.

I'll try to post back here after a few Haiku tests, need to go find a test where I've already got Opus and QwenFlash-Next in the mix.

1

u/wegster 29d ago

Ahh, lol - missed your 'on API tasks' specifically, which I'm assuming you meant as in tool use, versus creation/modification?

I did a quick pair of runs with a pair of moderate complexity multi-file benchmarks I have on hand, and uhh... I'm kinda surprised here. default = medium, same if not labeled for Haiku and Sonnet runs. Overall at the moment the Qwen Flash-Next 4.7bpw is my daily driver for local, which was actually up top until...running Haiku(!?!) Yeah ok, and Opus on High but that's pretty much expected. But yeah, again, even though I'm surprised at this particular result, 'right tool for the job' stays true, even if sometimes that tool may be the unexpected one for a given job.

1

u/Blackhat165 29d ago

I’m just so excited to see that you replicated what my test showed with different methodology. I’ve been thinking I was crazy, but the result was clear so I went with it.

When I say API tasks, what I mean is anything where your code is calling the model as part of a pipeline or defined task. That’s as opposed to in a harness doing complex work like coding or in chat.

Mine was a step where I sent a work order along with a list of potential categories and examples within those categories. About 5% came back with examples instead of the categories it was told to use. Another 5% were JSON failures, and I know I could use JSON mode but didn’t want to rely on vendor specific tools. I could work around both of these but Luna and Haiku 4.5 crushed it right out of the box so I moved on. Then the next step in my pipeline was taking a group of common tags and summarizing them. This time it was consistently thin and under extracted compared to other models.

My theory is it is tuned to work extremely hard on complex tasks but overthinks on small tasks. And/or the system prompts on Claude code and web are extremely necessary for Haiku.

1

u/wegster 29d ago

Hmm. Will need to think on that one a bit. Guessing in this case you're paying for API use vs a sub, and hitting the API via a sub-task or your own harness?

In the case above, I'm running via the CLI but with isolated environment and of course, 'Claude Code CLI' is effectively acting as a harness of sorts, so it's not quite apples to apples. I've avoided the OpenAI and Anthropic API buy as you go after getting burned as few times wondering where my $ went (lol, I'm so sure not th only one there) but also the subs massively out-perform on work getting done.

But yeah, I'm still kind of in shock at the Haiku results. Seriously..

1

u/Blackhat165 29d ago

I’m in shock at your result myself. I’d basically assumed it was a quirk of my tasks or setup or test and gaslit myself into doubting it. So to suddenly see it come out on top for someone else is weirdly vindicating. And to see it beat Opus, even if it’s a one off result, is crazy.

In my tests it performed just as well as a reviewer. But there was basically ‘one weird trick’ in every code file that only opus caught. Opus orchestrator called them “subtle logic errors.” So I decided Haiku was the reviewer and we’d spend up to 3 turns with it, then go to opus to approve. Opus often catches something significant that Haiku missed in that pass.

The “API task” - I’m using CC with a subscription to write code that uses LLM’s to refine context for AI agents. For example taking a bunch of maintenance work orders and turning them into issue summaries for that machine. But the actual data is considered confidential (for stupid reasons) so code sends them to our Foundry end point via API calls in the actual script. And somehow when I do that Haiku falls flat on its face even though the task is a few orders of magnitude simpler. It’s a fascinating model.

1

u/wegster 28d ago

If I get a break tomorrow, I’ll see if I can throw a few more tests at it. I’d got plenty of Qwen variants but a limited number of Sonnet and Opus runs, but mostly in my Complex category. Hell, I might do it for grins anyway, as nothing including Deepseek has broken 62/100 on one of them.

lol, ‘pseudo-PII’ biting you RE: ‘confidential’?

1

u/xatrekak 26d ago

I use sonnet on low for classification. It's about the only thing I have found that model good for. 

1

u/Latter-Tangerine-951 Senior Developer 29d ago

No idea why people love to overcomplicate this. Opus 5.5 for everything.

I don't care about saving tokens, because I'm employed and this is my job.

1

u/xqianliu 29d ago

I'd push back on both camps a bit. In my runs the review is a separate session, same model as the writer. The separation that helps is the session, not the model: a fresh context that doesn't inherit the writer's assumptions.

The bigger lever is what gets checked. In one harness study I ran, 23 tasks repeated across harness versions, 183 runs total, 38 of those runs passed review but failed hidden tests: 22 broke behavior that used to work, 9 broke the changelog convention, 7 missed cases the issue never mentioned. Review looking clean was not a guarantee.

The writer side is where I'd put the effort. The writer generates tests for whole classes of input and writes the count into the delivery notes, and the review checks the numbers. I'd weight that check more than which model does the reviewing.

1

u/benneren123 29d ago

honestly #2 being slower matters a lot less once you stop watching it. we let the review loop run on its own and only look when it's done, so 20 min vs 10 is basically free. we built a tool for that called zeroshot if you're curious

1

u/zbignew 29d ago

I’m using Deepseek V4.1 flash for everything. Haven’t had a problem.

1

u/raxel42 29d ago

One question, should we shift 100% to AI?
I found the drift very interesting. Small disclaimer, I am a software engineer since 1991.
Until you don't understand 100% of your domain - its very easy to miss.
I have been given a task, didn't want to dive into, relied on AI, step by step, got a working code…. But for a completely different feature))

1

u/shetritr 29d ago

1, and the review is the one step I wouldn't hand to a cheaper model. the expensive mistakes are the ones that look fine, and a weak reviewer waves exactly those through.

1

u/GabberJenson 28d ago

Opus to plan (very rarely fable if it's quite complex and has many domains), and then either Opus or Sonnet to implement individual tickets depending on complexity.

1

u/Cheap_Alternative879 28d ago

I set the temperature high. Get minimum 10 realizations by stirring the prompt slowly. Then I embed the tokenized outputs and average the vectors. The result is statistically the most stable code ever generated. Bon appetite 🧑‍🍳

1

u/airforceguy28 28d ago

Opus builds a plan fable review opus directs sonnets to build then reviews then fable reviews final product

1

u/mrobot0101 27d ago

Anything less than Opus 5.5 for project wide coding always makes me regret, revert and redo. In fact, in Auto, Opus is always selected for my tasks.

0

u/Even_Gap_2253 🔆 Max 20 29d ago

With good design, I never had issue with simply coding with 6 Luna xhigh. No need for Sol for any implementation tasks, not even review. It is practically unlimited usage.

Sol I only use for planning and architecture.

Same applies to Anthropic. Sonnet practically does everything, you never need Opus unless it is for architecture and design.

0

u/CorpT 29d ago

There is no one correct answer. Experiment and find what works for you.

0

u/ldn-ldn 29d ago

Opus for everything. Start with product discovery, create vision and glossary. Then spec out your requirements, architectural design and MVP. Plan your MVP then execute. Manual testing after each MVP stage, create bug reports and change requests.

Once MVP is ready and user tested - proceed with the rest following the same approach.

And don't forget to check every word and line of code along the way.

0

u/sherry_6879 29d ago

計画を建てるのは本当に何もないときだけ 既存システムの場合はコードを読ませ、そのうえでんいが欲しいか言うだけでいい

-1

u/r2k-in-the-vortex 29d ago

Get a cheap model like deepseek flash, and let it do everything, but give it good tools to validate its own work. Good spec of what to do and effective tests and validations to check the results is how you bracket in the AI, so that the only thing it can do is deliver correct code.

-1

u/jam_pod_ 29d ago

1 with tight, specific directions. “Add a user profile feature” is going to waste a ton of tokens as it tries to figure out what you want; “Here’s a JSON representation of a user profile; add migrations, CRUD endpoints, and a view using this form as a styling model” is going to be much more efficient