Skip to content

O NOVO JEITO de usar o Claude Code: o Opus vira o chefe (e o Haiku trabalha)

Read the Portuguese translation →

Author: Matheus Battisti - Hora de Codar · Watch on YouTube

Video authored by the channel shown, not by IANIA; all rights belong to the creator. Transcript and summary generated automatically; the original-language content is preserved.

Original language: English

Original video: O NOVO JEITO de usar o Claude Code: o Opus vira o chefe (e o Haiku trabalha) · Channel: Matheus Battisti - Hora de Codar · 18:16 · Watch on YouTube

Topics: AI agents, Claude Code, Software engineering with AI, Model inference and optimization, AI models

The video demonstrates a Claude Code workflow where Opus plans, delegates, and reviews while Haiku subagents handle implementation tasks, aiming to reduce token use without sacrificing much quality. The creator explains the configuration files and compares the approach with an Opus-only session on the same app project. In the test, the Opus–Haiku workflow used fewer tokens but took longer and needed additional correction cycles; the resulting projects were broadly similar, with some differences in polish and behavior. The creator concludes that the trade-off depends on task complexity and recommends testing the setup for each use case.

  • Opus acts as the coordinator: it interprets the request, divides work, reviews subagent summaries, and issues corrections.
  • Haiku subagents handle tasks such as generating code and running builds or tests, reducing the amount of detailed output Opus must process.
  • The setup uses three configuration components: settings.json, an executor.md agent description, and a Claude MD with instructions for delegation.
  • The comparison uses the same project prompt in two sessions, both with Opus as the main model: one delegates to Haiku and one works with Opus alone.
  • The project is a pickup-soccer app with court listings, reservations, invitations, and fee splitting.
  • The creator estimates the first test used 1.3 times fewer tokens with Opus and Haiku, and the longer test used 1.6 times fewer; these are approximate estimates from a script, not API measurements.
  • In the longer run, Opus and Haiku took about an hour, compared with 25 minutes for Opus alone, due to repeated corrections and problems.
  • The final projects were similar in layout and functionality, though the creator found some Opus-only design elements more refined and some Opus–Haiku details clearer.
  • Parallel subagents may help on larger projects, but task complexity and Haiku’s errors can increase turnaround time.
Start Chapter Summary
00:00 Opus as coordinator, Haiku as worker The video introduces a workflow that delegates implementation to Haiku subagents while Opus plans, coordinates, and reviews.
02:06 Configuration and project setup The creator outlines the required configuration files and prepares two Claude Code sessions for a controlled comparison.
05:16 Comparing the first development rounds The same prompt is sent to both sessions for a pickup-soccer app, and the creator explains the initial token comparison.
09:23 Adding app features and running tasks Both sessions receive prompts for authentication, court listings, bookings, fee splitting, and starting the projects.
13:02 Time, token use, and project results The creator reports that the delegated workflow took longer but used fewer tokens, then compares the two apps’ designs and behavior.
17:13 Conclusion and recommendations The creator says results depend on task complexity, encourages viewers to test the workflow, and closes with channel promotions.

Opus will plan, divide, and review. — 01:01

Opus/Haiku cost 1.3 times less than just Opus. — 09:23

Opus Haiku took an hour to do all the tasks — 13:33

Opus took much less, 25 minutes — 13:33

So I believe it depends on the task, right? — 17:13

Claude Code, Opus, Haiku, subagent, Quadra Livre, Next.js, TypeScript, SQLite, Hostinger, Fábrica

00:00 Guys, there’s a new way to use Claude Code that’s blowing up. The idea isn’t to use Opus for everything, but to combine Opus with Haiku in subagents. This will give us absurd token savings, allowing us to go much further with our current quota while still getting quality equal or very close to Opus. As if it were being used exclusively. I’ll show you in this video how to set this up and the real token savings in

00:31 practice. So come on in, let’s go. So as I said at the beginning, guys, there’s no great mystery here, okay? We’re going to be using these two models to achieve a very good result, as if we were using Opus for everything . Except we’ll have faster responses because Haiku does that, right? And also very similar quality because it’s Opus that will be coordinating and testing everything, okay? So what happens? This evolution of the 3.5 models brought this possibility back into play, right? So that’s what

01:01 I’m going to show you, how to make this configuration and how to use the comparisons at the end. So we have an idea here that if we only used Opus, it would take much longer, right? And it would also consume many more tokens to get an equal or perhaps very close result, okay? The strategy here is the one I told you about. Opus will plan, divide, and review. And then it will release the subagents, each to do something, okay? Which it will coordinate. What will be removed from Opus? File content, generated code,

01:33 build and test output. So we remove this from it. But what does it keep doing? It will understand what we ask for. It will break this down into subtasks. It will read the summaries that the subagents return and send corrections, okay? And we have this new Haiku price that helps a lot in this process. We will need a config here to be able to make this interconnection and ensure it works in all sessions, because if we only instruct it, it might get lost as we change sessions or clear things out. So, by making these

02:06 three files here, we ensure the config, okay? So, there will be a settings.json locking subs to the Haiku model. There will be an executor.md here, which is basically a summary where things are explained, you know, how this subagent will work. It is basically an executor and a Claude MD with rules that must always be followed, right? In every session, it will read and understand what needs to be done, the main model, which is Opus, will then delegate the tasks. Let’s go see it then. Well, guys

02:37 , first of all, don’t forget to download Fábrica. Fábrica is a free e-book I created covering the system development process, from the initial architectural planning and ideas, to how we will split resources and pages the system will have, its development with SDD, which is a validated strategy , and how we will go about getting clients, making sales, and generating revenue with this system we are creating. So, the book, the e-book is right here in the pinned comment in the description for download, okay? It’s

03:10 almost 200 pages, very complete, illustrated, it has everything you need to know on this page here. Got it? Well , let’s move on to Claude then. So here , look, I have everything configured. All right, guys? Go ahead and take screenshots and such, understand the strategy, because it’s not that it’s complex, but we need to do the configuration, otherwise it won’t work as I planned here. What do I have? Opus Rico is the folder that will run, as I said, it’s the folder that will only

03:40 run, obviously. So here, what do I have ? A Claude MD, okay? Which instructs this initial part, right? That Opus needs to know, how it will delegate to the subs and such. It’s just a few lines so that everything happens the right way and it always includes this in the session. And here is where the main configuration goes, right, in setting JSON. I am locking the Subagent and Haiku models, okay? So I will only use Haiku. Basically that’s what this

04:11 file says. And here in agents, I write, right, how the executor has to act. So a simple prompt also to show what it does and what it doesn’t do as well, which is important, okay? So these three files need to be aligned in these folders and subfolders so that you can get the same result as I do. Then after that, there’s no mystery, we’ll start the session in Opus Rico. We will start the session only in Opus. I will create the same project, okay? In both. Let me

04:45 see here. I’ll just rename it here real quick. So, the first one will be Opus and the second one will just be—I’ll also set it to a different color. Because when I’m recording and talking here, sometimes I slip up, right? So this way it’s slip-proof. And I made a little script here that will also count the tokens, because since I have a subscription, the ideal would be to compare it on an API, right, to see the

05:16 cost. And we would be able to get a more real, a more accurate figure, but I’m not going to burn money here, guys. I’ll use my subscription and I think this script of mine will work out , okay? So the idea is that I create my projects normally. So here I’m going to send the same prompt to both sessions, right? And I’ll read it along with you here. So, I created a project called Quadra Livre, completely separate. It will use Next.js and TypeScript here. Further down the line, the project will have Backend Skylight, right? So I’m already preparing it for that. I explain what Quadra Livre

05:46 is. It’s an app for those who play amateur soccer with their group. The court owner posts the available times for the week. The organizer books a slot, invites friends, and the app splits the court fee among those who confirmed their attendance. It replaces the group list and chasing down those who haven’t paid yet. So it’s to, you know, professionalize the pickup games, okay? So the same prompt is placed in both and you can already see the differences, right? I didn’t show it here, but the main model for both sessions is Opus 3.5. See here, see

06:16 here, right? You have to ensure that too. So both have the same main model, okay? And here, look, it’s already separating, look, executor. So it is triggering subagents that I configured there; it’s working correctly. And this guy here doesn’t, he’s doing everything on his own. So that is the big difference. Depending on the task here, we’ll see more executors being triggered and so on, right? So this will change based on the project you’re creating, on what you’re doing. That’s the idea, okay? Maybe here in the middle it only triggers one or sometimes two, but it doesn’t matter. The final result has to be the

06:48 same, better, or very close, while saving more tokens, right? If we reach this result, which is what the strategy promotes, we’ve succeeded. Well, while it creates here, guys, I want to talk to you about Hostinger. Hostinger has a massive VPS promotion here in October, okay? They are channel sponsors and long-time partners. We have our projects there, we’re really pushing a KVM8 with several cool coding projects, you know? It has held up really well, always available.

07:18 Maintenance is scheduled well in advance, folks. I only have compliments for the guys at Hostinger, okay? Look, there will be their promotion, our coupon will be there, the link will be in the description, and then you choose your plan. I recommend the KVM2. For me , it’s the ideal plan for those starting out, because it’s a very good machine, you’ll be able to put several projects online, running in parallel, sharing access between them, without anything crashing, or getting unstable

07:49 or slow. And the price is also very nice for those just starting out, okay? Then you come here, choose your plan on the checkout screen, and here’s the thing: the longer the term, the more discount they give you, okay? They’re great people. Choose the server closest to you. The United States is OK because there’s a CDN, right? You can use Cloudflare, which is free, to reduce that latency. Go with Debian, man. Select the one that makes you happy and confirm, right? Continue here. There you go, you’ll have your brand new

08:19 server to host your projects, maybe with Opus and Haiku, right? Which is what we’re doing here. Got it? Well, another thing I also want to compare, if possible, is the session time. Let’s see if I can do that, okay? So, folks, no mystery here. Now we wait for both, okay? We have here, look, the folding being done. Both are in the same process, right? Look, guys, so the first round is finished here, okay? As I mentioned earlier, the more it runs, the better, because it keeps consuming

08:51 context and using several different tools. So, we will have very different results across several sessions. I’ll do one more round here, okay? For us to compare. But look, just from this first session where I ran a little test—I had already run a little test—but look, just in this initial session we had a difference of practically 50 cents, right? Rounding it off as if it were via the API, right, folks? So we can’t calculate it exactly because I’m

09:23 not using the API, okay? But Opus/Haiku cost 1.3 times less than just Opus. But let’s continue here. I’m going to do another round. I’ll use the same prompt for both. Remember, I’m using no skills , right, so it doesn’t influence anything, man, nothing. Just model by model. I’m going to set it here now, free court, it starts saving real data. Add an SQLite database, register login with email and password. The court owner registers their court. A public page that lists the registered courts. Those not logged in can see the courts.

09:55 Populate the database with three courts , right? Decide and put here that the landing page stays as it is. So, another round here, following the same strategy. We’ll see Opus triggering sub-agents here, okay? I can also add a chained prompt here to see how it handles that. So, I’ll send another prompt here, it would be the next step, right? But since it’s working with sub-agents, maybe it can reconcile this and do it together, right? So I’ll send another prompt here, I’ll leave it chained here in the queue, right? So

10:27 look, now the main functionality, booking a slot, splitting the bill. So on each court’s page, show the weekly schedule with each free slot. Whoever booked it becomes the game organizer and receives an invite link to invite people, right? Court fee divided among those who confirmed. So business rules that need to be functional, right? And after that, look, see that it already read it, look. Do you see here that it already read it? Let’s see Opus here. Oh, Opus hasn’t processed it yet. So, with Rik, it’s already bringing it into play. It’s looking like, hey, can I get

10:58 a head start on any of this, right? This here is the interesting part, right? This model here, it’s kind of acting in a queue, really, right? It’s not asynchronous, it’s doing one block at a time. Of course, look, Claude just came in, right? It’s much more competent than before. It will see if it gets this in sooner and will try to do something in parallel, right? But this one, no. This one was programmed for this. It’s instructed to do these things in the same session, right? Working everything together. And I’ll

11:30 ask it here to start the projects so we can compare the quality later, right? Start the project and show me how to access it. I’ll send it here too. Start the project and show me how to access it. So this is going to take a little longer, guys. Afterward, we’ll be able to have the final comparison of the two, okay? But you saw there that with one prompt we already saved some, right? If we get equal results, it was already worth it, right? And it used five subagents, okay? So there was that

12:00 too, right? Everything is registered here in this script to show us the real cost, right? Approximate, because it’s not through the API, as I said, it’s a very simple little script, right? That manages to detect the sessions and such . Well, now we wait, right? Oh, an interesting thing, right? This one didn’t start. This one already started for me, right? Or it showed me the commands to start, right? Eh, look, the project is running, actually. So, as you are seeing here, let me disregard

12:31 what I said before, it already started the project because it understood that this doesn’t change anything, right? In the process, it can start while we get the result being developed, but I can already see the system. So it’s released for me here while the subagents work, right? As for the other one, look, it started too, right? But it takes a little longer. You’re following this, right? Every command that is stacked only in the US takes a little longer too, right? Because of the single processing. So here, guys, an interesting thing, right? Since we triggered several tasks, Opus Haiku has

13:02 three subagents at this moment in parallel. The normal Opus continues just by itself, obviously. But this is quite interesting because it’s a different strategy, especially if it’s a larger project with several sessions, we can tackle these modules in parallel . Well, guys, now look at what happened here. We had a real setback, to be honest with you. Opus Haiku took an hour to do all the tasks due to the problems it keeps encountering. So

13:33 we’ll have a lot of back-and-forth because it keeps triggering the executor again to resolve these problems that Haiku causes, which Opus probably wouldn’t cause or would solve in the same conversation, right? Whereas Opus took much less, 25 minutes , so we have a little more than double the time to execute the same task, in quotes, right? Token-wise. Here, look, we have savings; we spent 1.6 times less than Opus. So, we still have plenty of credits, right, working with

14:06 this structure here. And there were times while I was following it that it was twice, right, double, double the savings working with Haiku. So, depending on the task, it will be very useful, right? Maybe if we learn how to handle this, we can find a way to work with both structures, there’s a lot of savings, okay? About the project itself , now let’s test it, look. This one here is the Opus Haiku project, okay?

14:38 This one here is the Opus-only project, right? Let me remove GPT here. Now let’s take a look at the design, okay? It seems the Opus one is a bit more refined, right? A bit better, but man, both are fulfilling the same role. So here is the explanation of how it works , how it functions. I actually liked this one from Opus Haiku better. It has the step-by-step illustrated, right? How much each person pays. Bill splitting is very similar, right? Here a continuous bar, here little squares,

15:08 right? Here is how it works for the court owner. So, quite similar, right? It has a little extra detail, right? It has a division in the middle. This one has nothing. FAQ, both are very similar . That’s it. So, in my view, nothing that Opus Haiku couldn’t reach, right, this result here if we wanted to, but it’s still usable. Create an account here. Password confirmation appeared, right? Anthropic’s models are doing

15:40 this now, improving registration quite a bit. So, I’ll create an account here. It has some courts to play. Look, just Opus didn’t have password confirmation. So, it could be something that Opus checked in Haiku’s work and asked it to improve, right? Look, it created it. So , man, once you leave the home page, you can see it’s all very much the same already, right? Since the home page is where it tries to illustrate more. Yeah , here I can see the courts, I can make a reservation if I want to. I have to

16:12 put it here, look. Then I can reserve. I don’t know why I had to log in again, okay? But weird, right? Look, reserve this time slot. All right. I reserved the court time. I’ll do it with this one too, to see if it turned out better . Look, here it doesn’t even have the “ available” text, right? I thought it looked better there on Opus Haiku. I’ll separate this here. It seems like it misunderstood some part of the rule, right? Because it’s already logged in, right? I don’t know why he should have

16:42 to log in again to book, right? Both have the same problem. Here’s the reservation. Invitation. Invitation is here. I actually found this one clearer , didn’t I? Everything I need appeared in sequence. And here it’s more condensed. Well, guys, in my opinion, the two were very close in terms of layout. I even thought the shell had a few more details there. We can see that in terms of cost, we save money using the strategy, right? There were basically three prompts here. The time was actually a bit longer, but in previous tests, I had faster executions

17:13 precisely because of this parallelization. So I believe it depends on the task, right? The more complex it is, maybe it goes back and forth more because Haiku tends to have more errors, right? But when the OPS coordinates, the errors are minimized because it will send corrections, and this can even result in a better polish on the project, okay? So it’s up to you to test it as well and see if it works for your case. Don’t forget, if you want to host an application with a host that really cares about its customers, because they are always looking for data centers to get servers in Brazil,

17:45 go with Hosger, it also helps us here on the channel, guys. The link will be here in the description, okay? Remember , I recommend the KVM2 as a plan. Another thing, Fábrica, right? Fábrica is our newest ebook, right? I’m printing it to have a physical version, to show you in more detail too , because it’s kind of hard to show the PDF here, better to show it on paper. The thing turned out awesome, guys. There are even people praising it here in the comments. I really appreciate everyone who is finding it and using it . It will certainly be a game-changer for those who are starting in this Vibe

18:16 Code world or want to professionalize their projects, okay? Totally free for you, the link is here in the pinned comment. Just download and use it, the ebook is illustrated, it has a lot of practice inside, exercises, checklists, skills, it has a lot of things. Well, guys, that’s it for today. I hope you enjoyed the strategy, let me know in the comments if you’ve already used it or something similar. I’ll be waiting for you so we can exchange some ideas. If possible, subscribe, leave a like. This really helps my work here on YouTube. And I’ll see you in the next video as well. Thanks, cheers. Yeah.