Tmux + Fable = Cut 35% less token — Transcript
Full transcript
- 0:00You probably experienced your cloud
- 0:01quota burning out Fable quota so fast
- 0:03that you hit a limit very quickly. And
- 0:05that's probably because you are not
- 0:07using the model right. So, as we get
- 0:09stronger and stronger frontier model
- 0:10like Fable 5 or GPT-5.6 so max, even
- 0:14though those model are extremely
- 0:15powerful, but also they are expensive
- 0:18and slow to run. That's why more and
- 0:19more people, even Cloud Code official,
- 0:22are recommending this practice that many
- 0:24use Fable 5 as the advisor or planner,
- 0:27but use smaller model like Sonnet 5 to
- 0:29be the executor. Cuz even though Sonnet
- 0:315 price is only 20% of Fable 5, but its
- 0:34performance is almost equivalent to Opus
- 0:374.8, which is strongest model a few
- 0:40months ago. And there are two ways Cloud
- 0:41Code official has shown. One is that
- 0:43using Sonnet 5 as the main executor
- 0:46agent, but only do it to call to get
- 0:48Fable 5 as the advisor to almost review
- 0:50its plan and send advice. Or second
- 0:52method is that you use Fable 5 as the
- 0:55main agent where it will make a plan and
- 0:57spin up worker agent using smaller model
- 1:00for execution. And even Devin is
- 1:02introducing this new harness type called
- 1:04Devin Fusion that claim to achieve
- 1:06similar or even better performance than
- 1:08Fable 5, but with 35% lower the cost.
- 1:12And fundamentally, their Fusion harness
- 1:15is just Cloud Code's Fable 5
- 1:16orchestrator plus Sonnet 5 worker model.
- 1:19And Devin actually compare the two
- 1:21methods Cloud Code mentioned. One is the
- 1:24Sonnet 5 as the main executor, but use
- 1:26Fable 5 as advisor versus using Fable 5
- 1:29as main orchestrator, but spin up a
- 1:31worker agent using smaller model. And
- 1:34the recommendation from them is actually
- 1:35very clear that the Fable 5 orchestrator
- 1:38model is working a lot better because
- 1:40with advisor model, you actually need to
- 1:42pay a very expensive price because
- 1:45advisor model will need to read the full
- 1:47conversation history from the main
- 1:49agent, rather than just trigger a cached
- 1:51context. And cached token is about only
- 1:5410% cost of new input token. So, turn
- 1:57out using this model is actually going
- 1:59to work a lot better and cost-efficient.
- 2:01And to make it work well, the main ideas
- 2:04here is that each agent here should not
- 2:06be just a basic sub agent, but instead
- 2:09Devin is calling a sidekick. And what
- 2:10this means is traditionally, when you
- 2:12use Cloud Code or Code X and start a sub
- 2:15agent, it generally just spin up a new
- 2:17agent session on the fly. And once agent
- 2:20finish, the last message will be sent
- 2:22back to the main agent. But, let's say
- 2:24main agent realize there's something
- 2:26wrong with it. And when you want to make
- 2:28edits, the new task tool will basically
- 2:30spin up a new sub agent session that has
- 2:32no context of what has been discussed
- 2:34before, which means a lot of wasted
- 2:36token on rewriting the same thing. But,
- 2:38with sidekick model that Devin
- 2:40mentioned, the key difference here is a
- 2:42sub agent actually is a persistent
- 2:44session, which means if the main agent
- 2:46has some feedback, it will just send
- 2:48back a follow-up message to the same sub
- 2:51agent, which will inherit all the past
- 2:53context. And those past context, since
- 2:55we're being the cached token, it's going
- 2:57to be extremely cheap, yet very
- 2:59powerful, because it has a full context.
- 3:01And if you're using Cloud Code, you're
- 3:02probably already pretty familiar with
- 3:04this model, because that's literally
- 3:06what agent team means.
- 3:12You can literally just prompt Cloud Code
- 3:14to use agent team to do certain task.
- 3:17Instead of just starting a one-time sub
- 3:19agent, you can run this persistent
- 3:21session. Once it's finished, the main
- 3:23agent will be notified, and it will be
- 3:25continuously sent a follow-up message to
- 3:27this persistent agent session, instead
- 3:30of starting a new session. Cuz the new
- 3:32Cloud Code version already have the send
- 3:33message tool that allow you to send a
- 3:36new message to an existing agent
- 3:37session. And once those agent finish, it
- 3:39will stay resumable to receive those
- 3:42message until it calls a shutdown
- 3:44request. And when Cloud Code starting a
- 3:46agent team session, it can even define
- 3:48the model as well. So, So, you're using
- 3:50Cloud Code, it's actually very easy for
- 3:52you to achieve this type of Fable 5S
- 3:54main coordinator and planner and Sonnet
- 3:575 or even smaller model as executor. And
- 4:00you can achieve this workflow by simply
- 4:02adding this delegation rules into your
- 4:04cloud.md file. It's basically saying
- 4:06that you are the coordinator, that will
- 4:08be design, design, and review. And we
- 4:09delegate hands-on execution to the
- 4:11executor sub-agents using the Sonnet
- 4:13model. It lists out what are things that
- 4:15should be delegated and what are things
- 4:17that should be kept in the coordinator
- 4:19main agent. Which are specific things
- 4:21like design, planning, architecture, or
- 4:24just tiny edits. And there's one section
- 4:26that's pretty important about road
- 4:27check. So, the sub-agent would know it a
- 4:30sub-agent, so it don't keep spinning up
- 4:32more nested agents. So, with this one, I
- 4:34can simply start a session asking to
- 4:37help me design and build a to-do app. It
- 4:39will ask me question, do some planning,
- 4:41and typically for complex task, it will
- 4:44create a frozen spec in the task folder,
- 4:46then make the plan very clear, so
- 4:48there's no ambiguity for executor. Then
- 4:51spin up a sub-agent with Sonnet 5 to do
- 4:54the actual execution. And the sub-agent
- 4:56will receive this task saying the role
- 4:58is executor, do the work themselves,
- 5:00don't spawn sub-agents, and then read
- 5:02the spec first, and do the
- 5:03implementation. And because it is Sonnet
- 5:055, it's actually going to be much faster
- 5:08than you implementing with the Fable 5.
- 5:10And I have included my delegation rules
- 5:12in the AI Builder Club GitHub repo. So,
- 5:14you can copy and insert into your own
- 5:16cloud.md. If you're interested in
- 5:18learning more, there are more
- 5:19step-by-step tutorial on this coding
- 5:21agent workflow, and we have weekly live
- 5:23workshop to cover those. I have included
- 5:25link in the description below, so you
- 5:26can come and join if you're interested.
- 5:28However, this only works if you're using
- 5:30Cloud Code. But in reality, probably you
- 5:32have a few different AI coding agent
- 5:34that you're using. Some of you probably
- 5:36using Gemini CRI because the Gemini
- 5:38model is still one of the best and
- 5:40cost-effective model for front-end
- 5:42design, or the recent Kimi case 3 model.
- 5:44So, in an ideal world, you still want to
- 5:46use the best possible model and harness
- 5:49as a coordinator, which can be the Cloud
- 5:51Code or Codex using the GPT- 5.6 So Max.
- 5:55But the actual worker you should be able
- 5:57to free to use any of those based on
- 5:59your preference. And Codex team has been
- 6:01pretty sneaky. They introduced this
- 6:03Codex plugin CC tool, which is a Cloud
- 6:06Code plugin that allow you to delegate
- 6:08task to a Codex agent. So you just
- 6:11install this plugin and add the OpenAI
- 6:13Codex, then reload plugins. And now I
- 6:16can prompt it to delegate to Codex agent
- 6:19to help improve our UI of to-do app on
- 6:22this URL, which is first version that
- 6:25our Cloud Code agent did. And then it
- 6:27will start this Codex session. And here
- 6:29is a bit of weird cuz it basically start
- 6:31a sub-agent to call this Codex agent.
- 6:33It's probably because our
- 6:35coordinator/executor
- 6:37setup in cloud.md. But while it is
- 6:40running, you can see this Codex plugin
- 6:42giving us a few command. One is Codex
- 6:45rescue. This basically treat Codex as a
- 6:48sub-agent. Or a Codex review, which
- 6:50allow you to get a Codex to review the
- 6:52local git. And Codex result allow Cloud
- 6:55Code to fetch the output from a specific
- 6:57Codex session. Same as Codex cancel. And
- 7:00it can even do Codex transfer, which
- 7:02should basically take the conversation
- 7:04history to this point but fork over on
- 7:07Codex side. Now if I check my to-do app
- 7:09again, you can see that it update the
- 7:11UI, which looks probably more OpenAI-ish
- 7:15while the Entropic feeling. The one
- 7:17limitation with this Codex plugin is
- 7:19that I don't think there's a way for you
- 7:21to keep sending message to the same
- 7:23Codex session. If here I ask it to, "Can
- 7:25you send a follow-up message to this
- 7:27Codex session to say good job?" Oh,
- 7:30actually I am wrong. It actually can
- 7:32send back message cuz there's a resume
- 7:35command, which will allow it to send
- 7:37message to the existing session. So it
- 7:40can actually achieve that by doing this
- 7:41hack. So, the bridge between CodeX and
- 7:44Claude Code is pretty much there. But,
- 7:46what if you wanted to actually talk to
- 7:48any other coding agent that you are
- 7:50using like Gemini CLI, Guark Build, Pi
- 7:53Agent, Open Claw, any others. This is
- 7:56actually a way by using Tmux. So, if you
- 7:58don't know, Tmux is basically a terminal
- 8:00multiplexer. It allows you to start
- 8:02multiple different persist terminal
- 8:04sessions and continuously read and
- 8:06manipulate any other terminals. For
- 8:08example, I can run this Tmux split
- 8:10window -h, which means it will start a
- 8:12new terminal session on the right side
- 8:14of the screen. And inside that terminal
- 8:16session, I want to run Claude Arsay and
- 8:18with this message. It will spin up a new
- 8:20session on the right and send out this
- 8:22message. And what's cool is that on one
- 8:24hand, this session is persist. You can
- 8:26continuously sending more message to it.
- 8:29For example, I can do Tmux send keys t,
- 8:32which is the target, and dollar one
- 8:34means the second terminal sessions on
- 8:37the screen, "Tell me a joke." And then,
- 8:39I'll do Tmux send keys enter. This one
- 8:43will basically control the terminal on
- 8:45the right side to typing this message
- 8:47and click enter to send out message. And
- 8:50once I run that, you can see on the
- 8:52right side, a new message has been sent.
- 8:54And I can also run this Tmux capture
- 8:57pane -p -t .1. So, this means it will
- 9:02actually capture what's showing on that
- 9:04terminal and print out the result. So,
- 9:06if I click enter that, then it will read
- 9:09the result from the screen on the right
- 9:12side and return that result in the
- 9:14terminal. So, with this one, you
- 9:16probably start getting the idea that you
- 9:18can just tell your agent to use Tmux to
- 9:20start new agent session just like you as
- 9:23human. And through that way, it can
- 9:25technically control any coding agent and
- 9:27use that as a real agent teams. The only
- 9:30caveat here is that it's easy for you to
- 9:32start new session in this way. But, how
- 9:34can the the agent actually notify back
- 9:36the main agent that it has finished task
- 9:39or it needs some help. So, there are
- 9:41some hacks you can do. So, in tmux,
- 9:43there's a way for each terminal to send
- 9:46signals like
- 9:47by doing this wait for -s with a
- 9:50message. So, what do you technically can
- 9:52do is start a tmux session and instruct
- 9:56agent that once it's finished send this
- 9:58special message. And then run this tmux
- 10:01wait for this special message. You can
- 10:03even just pipe and printing out the
- 10:05section after it finish. So, if I do
- 10:07that, it will restart the new agent
- 10:09session and once it finish, it will run
- 10:11this tmux wait for down hello world page
- 10:14command so that this command will
- 10:16finish. And you can imagine you can
- 10:18basically instruct your agent to follow
- 10:19this pattern, run background command so
- 10:22that once it finish, it will be
- 10:23notified. And I actually created a skill
- 10:25called open agent teams. It's basically
- 10:28encapsulating this tmux hack alongside
- 10:30reference and adapter for each harness
- 10:33like cloud code, code ask, grok pi, open
- 10:35code and maybe others you can add to
- 10:37achieve those kind of agent team
- 10:39experience for any agent. And it
- 10:41actually kind of works in any terminal
- 10:43you're using. Like I can just open a
- 10:45normal terminal and start grok and just
- 10:47give a command. Ask code ask to make a
- 10:49joke about engineer who write code and
- 10:51after finish delegate to pi agent to
- 10:54review the joke and also cloud code high
- 10:57cool model to check the grammar in
- 10:59parallel. And after all finish, you do
- 11:01the final review and tell me. Right, so
- 11:03you can do things like this. And with
- 11:05this skill, I actually encapsulated the
- 11:07short script that is encapsulating all
- 11:09those tmux kind of practice but exposing
- 11:12like start a new agent session, send
- 11:15message to a session, wait for the
- 11:17result, see the result, things like
- 11:19that. So, you can see if firstly run
- 11:22this command, start a code ask session
- 11:24and this is kind of ID with a prompt,
- 11:26then it run this peak command to quickly
- 11:29check if this session actually running
- 11:31well Cuz sometimes those coding agent
- 11:33session can have those kind of
- 11:35permission confirmation screen. And in
- 11:38this case, it is working well, then it
- 11:40will run this command to wait for the
- 11:42session to finish with a max timeout.
- 11:44And the session is running in the
- 11:45background. And once finished, it will
- 11:47do this result check. And here you can
- 11:50see that the Codex actually wrote a
- 11:52summary, but the summary didn't include
- 11:54joke itself. So, then it can send a new
- 11:57message to a specific session to ask to
- 12:00print out the result. Then it got a
- 12:02joke, stopped the Codex session, start a
- 12:04pie review session for this specific
- 12:07joke. And meanwhile, also start a haiku
- 12:09grammar session with a special prompt.
- 12:12And you can see there's some issues that
- 12:13is blocked by the classifier. So,
- 12:15there's probably some improvements that
- 12:17we can do for the script as well, but it
- 12:19is able to just self-healing and wait
- 12:21for the result from both this pie review
- 12:23and haiku grammar check. And also see
- 12:26that the haiku grammar session is in
- 12:28this kind of interactive mode. Then it
- 12:30was able to just do the enter to control
- 12:33this terminal session. And in the end,
- 12:35return back the final version to me. And
- 12:38I have included this open agent team
- 12:40skill inside the AI Build Club repo
- 12:42here. So, you can just copy and use. It
- 12:46has this skill file talking about how to
- 12:48use this script and also a reference
- 12:50file for the cloud.md or agent.md file
- 12:53that including this delegation rule
- 12:55section. So, you can just copy paste
- 12:57over. But meanwhile, if you really want
- 12:59kind of premium experience, there are
- 13:01also two like Herd and Orca that has
- 13:04those orchestration CLI feature built in
- 13:07and pair with a kind of UI layer. So,
- 13:09it's pretty easy for you to see the
- 13:10result. And I test almost all those
- 13:13options. Personally, I found Orca is
- 13:15providing the best experience. So, Orca
- 13:17has this orchestration skills, which is
- 13:20a CLI plus Q come out of box. And you
- 13:23can basically install it. And once you
- 13:24install that, it is basically achieving
- 13:26the similar open agent delegations in
- 13:29there I have to here. But because it's
- 13:31very tied to the interface they have
- 13:33here, the experience became very
- 13:35intuitive. I'll give you one example.
- 13:37Let's say I just start a kind of new
- 13:40report, and in this report we don't have
- 13:42any uh skills. It just have that
- 13:44orchestration skill come out of box. I
- 13:46can basically tell the same thing, like
- 13:48help me ask Codex to make a joke about
- 13:50any new whoop code. After finish
- 13:52delegate to Pi, except I will also add
- 13:55the skill to just make it more explicit.
- 13:57Sometimes they will just do it by itself
- 13:59as well. But just for demo purpose, if I
- 14:02enter this, it will use the skill which
- 14:04will invoke Orcas kind of still I that
- 14:07they build in. And then first they start
- 14:09a Codex session. But the really cool
- 14:11thing here is that you can see this new
- 14:14session just pop up on the right side.
- 14:16So, it's actually very easy for me to
- 14:18see all the sessions end-to-end, and I
- 14:20can just put the sub-agent session on
- 14:23the same screen here. Uh and on the left
- 14:25side, I just have this kind of hierarchy
- 14:28view to show me what are the
- 14:30sub-sessions under the session. The same
- 14:32thing, it also start this Pi agent for
- 14:34the review, as well as this Haiku agent
- 14:37for the grammar check. And again,
- 14:39everything is just very well tracked in
- 14:42their interface. I can just go into any
- 14:44sub-agent to continue the conversation
- 14:46there, and uh once I finish it will like
- 14:49automatically communicate back to the
- 14:51main agent. And I believe they will even
- 14:53have some kind of special data
- 14:55visualization to help you see how the
- 14:57tasks orchestrated across different
- 14:59agents. So, if you want a more kind of
- 15:01packaged experience, I highly recommend
- 15:03you check out Orcas well. They do have
- 15:06so many good stuff built in, like the
- 15:08Orca mobile experience, the Kanban view
- 15:10out of box, the token usage tracking,
- 15:13all the good stuff. And it's totally
- 15:14open source and free, and they're
- 15:16growing like really, really fast. For
- 15:18the past few weeks, it has been my daily
- 15:20driver for communicating with agents for
- 15:22the past few weeks. And we actually did
- 15:24a 1-hour deep dive workshop on some of
- 15:26advanced AI coding workflow with Alka
- 15:28founder. We actually showcase
- 15:29step-by-step of how they were managing
- 15:31to ship hundreds of commits to the Alka
- 15:34product itself. In Octrade advanced
- 15:36agent workflow across Grok, Codex, Cloud
- 15:39Code, Open Code. You can also join AI
- 15:40Build Club to see the in-depth workshop.
- 15:42So, I hope you enjoyed this video. As
- 15:44mentioned, feel free to get the skills
- 15:46that I put in for either using this open
- 15:48agent team skill as well as this
- 15:50Contagion Rules section for your
- 15:53cloud.md or agent.md file to achieve
- 15:55those kind of Octrader worker setup. So,
- 15:57that's pretty much for it today. Thank
- 15:59you and I see you next time.
About this transcript
This page contains the full transcript of Tmux + Fable = Cut 35% less token by AI Jason, generated from the public captions YouTube serves with the video. The transcript has 3,028 words across 429 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.