YouTube2Text

Tmux + Fable = Cut 35% less token — Transcript

by AI Jason · 3,028 words · 429 segments · language en · Watch on YouTube

Full transcript

  1. 0:00You probably experienced your cloud
  2. 0:01quota burning out Fable quota so fast
  3. 0:03that you hit a limit very quickly. And
  4. 0:05that's probably because you are not
  5. 0:07using the model right. So, as we get
  6. 0:09stronger and stronger frontier model
  7. 0:10like Fable 5 or GPT-5.6 so max, even
  8. 0:14though those model are extremely
  9. 0:15powerful, but also they are expensive
  10. 0:18and slow to run. That's why more and
  11. 0:19more people, even Cloud Code official,
  12. 0:22are recommending this practice that many
  13. 0:24use Fable 5 as the advisor or planner,
  14. 0:27but use smaller model like Sonnet 5 to
  15. 0:29be the executor. Cuz even though Sonnet
  16. 0:315 price is only 20% of Fable 5, but its
  17. 0:34performance is almost equivalent to Opus
  18. 0:374.8, which is strongest model a few
  19. 0:40months ago. And there are two ways Cloud
  20. 0:41Code official has shown. One is that
  21. 0:43using Sonnet 5 as the main executor
  22. 0:46agent, but only do it to call to get
  23. 0:48Fable 5 as the advisor to almost review
  24. 0:50its plan and send advice. Or second
  25. 0:52method is that you use Fable 5 as the
  26. 0:55main agent where it will make a plan and
  27. 0:57spin up worker agent using smaller model
  28. 1:00for execution. And even Devin is
  29. 1:02introducing this new harness type called
  30. 1:04Devin Fusion that claim to achieve
  31. 1:06similar or even better performance than
  32. 1:08Fable 5, but with 35% lower the cost.
  33. 1:12And fundamentally, their Fusion harness
  34. 1:15is just Cloud Code's Fable 5
  35. 1:16orchestrator plus Sonnet 5 worker model.
  36. 1:19And Devin actually compare the two
  37. 1:21methods Cloud Code mentioned. One is the
  38. 1:24Sonnet 5 as the main executor, but use
  39. 1:26Fable 5 as advisor versus using Fable 5
  40. 1:29as main orchestrator, but spin up a
  41. 1:31worker agent using smaller model. And
  42. 1:34the recommendation from them is actually
  43. 1:35very clear that the Fable 5 orchestrator
  44. 1:38model is working a lot better because
  45. 1:40with advisor model, you actually need to
  46. 1:42pay a very expensive price because
  47. 1:45advisor model will need to read the full
  48. 1:47conversation history from the main
  49. 1:49agent, rather than just trigger a cached
  50. 1:51context. And cached token is about only
  51. 1:5410% cost of new input token. So, turn
  52. 1:57out using this model is actually going
  53. 1:59to work a lot better and cost-efficient.
  54. 2:01And to make it work well, the main ideas
  55. 2:04here is that each agent here should not
  56. 2:06be just a basic sub agent, but instead
  57. 2:09Devin is calling a sidekick. And what
  58. 2:10this means is traditionally, when you
  59. 2:12use Cloud Code or Code X and start a sub
  60. 2:15agent, it generally just spin up a new
  61. 2:17agent session on the fly. And once agent
  62. 2:20finish, the last message will be sent
  63. 2:22back to the main agent. But, let's say
  64. 2:24main agent realize there's something
  65. 2:26wrong with it. And when you want to make
  66. 2:28edits, the new task tool will basically
  67. 2:30spin up a new sub agent session that has
  68. 2:32no context of what has been discussed
  69. 2:34before, which means a lot of wasted
  70. 2:36token on rewriting the same thing. But,
  71. 2:38with sidekick model that Devin
  72. 2:40mentioned, the key difference here is a
  73. 2:42sub agent actually is a persistent
  74. 2:44session, which means if the main agent
  75. 2:46has some feedback, it will just send
  76. 2:48back a follow-up message to the same sub
  77. 2:51agent, which will inherit all the past
  78. 2:53context. And those past context, since
  79. 2:55we're being the cached token, it's going
  80. 2:57to be extremely cheap, yet very
  81. 2:59powerful, because it has a full context.
  82. 3:01And if you're using Cloud Code, you're
  83. 3:02probably already pretty familiar with
  84. 3:04this model, because that's literally
  85. 3:06what agent team means.
  86. 3:12You can literally just prompt Cloud Code
  87. 3:14to use agent team to do certain task.
  88. 3:17Instead of just starting a one-time sub
  89. 3:19agent, you can run this persistent
  90. 3:21session. Once it's finished, the main
  91. 3:23agent will be notified, and it will be
  92. 3:25continuously sent a follow-up message to
  93. 3:27this persistent agent session, instead
  94. 3:30of starting a new session. Cuz the new
  95. 3:32Cloud Code version already have the send
  96. 3:33message tool that allow you to send a
  97. 3:36new message to an existing agent
  98. 3:37session. And once those agent finish, it
  99. 3:39will stay resumable to receive those
  100. 3:42message until it calls a shutdown
  101. 3:44request. And when Cloud Code starting a
  102. 3:46agent team session, it can even define
  103. 3:48the model as well. So, So, you're using
  104. 3:50Cloud Code, it's actually very easy for
  105. 3:52you to achieve this type of Fable 5S
  106. 3:54main coordinator and planner and Sonnet
  107. 3:575 or even smaller model as executor. And
  108. 4:00you can achieve this workflow by simply
  109. 4:02adding this delegation rules into your
  110. 4:04cloud.md file. It's basically saying
  111. 4:06that you are the coordinator, that will
  112. 4:08be design, design, and review. And we
  113. 4:09delegate hands-on execution to the
  114. 4:11executor sub-agents using the Sonnet
  115. 4:13model. It lists out what are things that
  116. 4:15should be delegated and what are things
  117. 4:17that should be kept in the coordinator
  118. 4:19main agent. Which are specific things
  119. 4:21like design, planning, architecture, or
  120. 4:24just tiny edits. And there's one section
  121. 4:26that's pretty important about road
  122. 4:27check. So, the sub-agent would know it a
  123. 4:30sub-agent, so it don't keep spinning up
  124. 4:32more nested agents. So, with this one, I
  125. 4:34can simply start a session asking to
  126. 4:37help me design and build a to-do app. It
  127. 4:39will ask me question, do some planning,
  128. 4:41and typically for complex task, it will
  129. 4:44create a frozen spec in the task folder,
  130. 4:46then make the plan very clear, so
  131. 4:48there's no ambiguity for executor. Then
  132. 4:51spin up a sub-agent with Sonnet 5 to do
  133. 4:54the actual execution. And the sub-agent
  134. 4:56will receive this task saying the role
  135. 4:58is executor, do the work themselves,
  136. 5:00don't spawn sub-agents, and then read
  137. 5:02the spec first, and do the
  138. 5:03implementation. And because it is Sonnet
  139. 5:055, it's actually going to be much faster
  140. 5:08than you implementing with the Fable 5.
  141. 5:10And I have included my delegation rules
  142. 5:12in the AI Builder Club GitHub repo. So,
  143. 5:14you can copy and insert into your own
  144. 5:16cloud.md. If you're interested in
  145. 5:18learning more, there are more
  146. 5:19step-by-step tutorial on this coding
  147. 5:21agent workflow, and we have weekly live
  148. 5:23workshop to cover those. I have included
  149. 5:25link in the description below, so you
  150. 5:26can come and join if you're interested.
  151. 5:28However, this only works if you're using
  152. 5:30Cloud Code. But in reality, probably you
  153. 5:32have a few different AI coding agent
  154. 5:34that you're using. Some of you probably
  155. 5:36using Gemini CRI because the Gemini
  156. 5:38model is still one of the best and
  157. 5:40cost-effective model for front-end
  158. 5:42design, or the recent Kimi case 3 model.
  159. 5:44So, in an ideal world, you still want to
  160. 5:46use the best possible model and harness
  161. 5:49as a coordinator, which can be the Cloud
  162. 5:51Code or Codex using the GPT- 5.6 So Max.
  163. 5:55But the actual worker you should be able
  164. 5:57to free to use any of those based on
  165. 5:59your preference. And Codex team has been
  166. 6:01pretty sneaky. They introduced this
  167. 6:03Codex plugin CC tool, which is a Cloud
  168. 6:06Code plugin that allow you to delegate
  169. 6:08task to a Codex agent. So you just
  170. 6:11install this plugin and add the OpenAI
  171. 6:13Codex, then reload plugins. And now I
  172. 6:16can prompt it to delegate to Codex agent
  173. 6:19to help improve our UI of to-do app on
  174. 6:22this URL, which is first version that
  175. 6:25our Cloud Code agent did. And then it
  176. 6:27will start this Codex session. And here
  177. 6:29is a bit of weird cuz it basically start
  178. 6:31a sub-agent to call this Codex agent.
  179. 6:33It's probably because our
  180. 6:35coordinator/executor
  181. 6:37setup in cloud.md. But while it is
  182. 6:40running, you can see this Codex plugin
  183. 6:42giving us a few command. One is Codex
  184. 6:45rescue. This basically treat Codex as a
  185. 6:48sub-agent. Or a Codex review, which
  186. 6:50allow you to get a Codex to review the
  187. 6:52local git. And Codex result allow Cloud
  188. 6:55Code to fetch the output from a specific
  189. 6:57Codex session. Same as Codex cancel. And
  190. 7:00it can even do Codex transfer, which
  191. 7:02should basically take the conversation
  192. 7:04history to this point but fork over on
  193. 7:07Codex side. Now if I check my to-do app
  194. 7:09again, you can see that it update the
  195. 7:11UI, which looks probably more OpenAI-ish
  196. 7:15while the Entropic feeling. The one
  197. 7:17limitation with this Codex plugin is
  198. 7:19that I don't think there's a way for you
  199. 7:21to keep sending message to the same
  200. 7:23Codex session. If here I ask it to, "Can
  201. 7:25you send a follow-up message to this
  202. 7:27Codex session to say good job?" Oh,
  203. 7:30actually I am wrong. It actually can
  204. 7:32send back message cuz there's a resume
  205. 7:35command, which will allow it to send
  206. 7:37message to the existing session. So it
  207. 7:40can actually achieve that by doing this
  208. 7:41hack. So, the bridge between CodeX and
  209. 7:44Claude Code is pretty much there. But,
  210. 7:46what if you wanted to actually talk to
  211. 7:48any other coding agent that you are
  212. 7:50using like Gemini CLI, Guark Build, Pi
  213. 7:53Agent, Open Claw, any others. This is
  214. 7:56actually a way by using Tmux. So, if you
  215. 7:58don't know, Tmux is basically a terminal
  216. 8:00multiplexer. It allows you to start
  217. 8:02multiple different persist terminal
  218. 8:04sessions and continuously read and
  219. 8:06manipulate any other terminals. For
  220. 8:08example, I can run this Tmux split
  221. 8:10window -h, which means it will start a
  222. 8:12new terminal session on the right side
  223. 8:14of the screen. And inside that terminal
  224. 8:16session, I want to run Claude Arsay and
  225. 8:18with this message. It will spin up a new
  226. 8:20session on the right and send out this
  227. 8:22message. And what's cool is that on one
  228. 8:24hand, this session is persist. You can
  229. 8:26continuously sending more message to it.
  230. 8:29For example, I can do Tmux send keys t,
  231. 8:32which is the target, and dollar one
  232. 8:34means the second terminal sessions on
  233. 8:37the screen, "Tell me a joke." And then,
  234. 8:39I'll do Tmux send keys enter. This one
  235. 8:43will basically control the terminal on
  236. 8:45the right side to typing this message
  237. 8:47and click enter to send out message. And
  238. 8:50once I run that, you can see on the
  239. 8:52right side, a new message has been sent.
  240. 8:54And I can also run this Tmux capture
  241. 8:57pane -p -t .1. So, this means it will
  242. 9:02actually capture what's showing on that
  243. 9:04terminal and print out the result. So,
  244. 9:06if I click enter that, then it will read
  245. 9:09the result from the screen on the right
  246. 9:12side and return that result in the
  247. 9:14terminal. So, with this one, you
  248. 9:16probably start getting the idea that you
  249. 9:18can just tell your agent to use Tmux to
  250. 9:20start new agent session just like you as
  251. 9:23human. And through that way, it can
  252. 9:25technically control any coding agent and
  253. 9:27use that as a real agent teams. The only
  254. 9:30caveat here is that it's easy for you to
  255. 9:32start new session in this way. But, how
  256. 9:34can the the agent actually notify back
  257. 9:36the main agent that it has finished task
  258. 9:39or it needs some help. So, there are
  259. 9:41some hacks you can do. So, in tmux,
  260. 9:43there's a way for each terminal to send
  261. 9:46signals like
  262. 9:47by doing this wait for -s with a
  263. 9:50message. So, what do you technically can
  264. 9:52do is start a tmux session and instruct
  265. 9:56agent that once it's finished send this
  266. 9:58special message. And then run this tmux
  267. 10:01wait for this special message. You can
  268. 10:03even just pipe and printing out the
  269. 10:05section after it finish. So, if I do
  270. 10:07that, it will restart the new agent
  271. 10:09session and once it finish, it will run
  272. 10:11this tmux wait for down hello world page
  273. 10:14command so that this command will
  274. 10:16finish. And you can imagine you can
  275. 10:18basically instruct your agent to follow
  276. 10:19this pattern, run background command so
  277. 10:22that once it finish, it will be
  278. 10:23notified. And I actually created a skill
  279. 10:25called open agent teams. It's basically
  280. 10:28encapsulating this tmux hack alongside
  281. 10:30reference and adapter for each harness
  282. 10:33like cloud code, code ask, grok pi, open
  283. 10:35code and maybe others you can add to
  284. 10:37achieve those kind of agent team
  285. 10:39experience for any agent. And it
  286. 10:41actually kind of works in any terminal
  287. 10:43you're using. Like I can just open a
  288. 10:45normal terminal and start grok and just
  289. 10:47give a command. Ask code ask to make a
  290. 10:49joke about engineer who write code and
  291. 10:51after finish delegate to pi agent to
  292. 10:54review the joke and also cloud code high
  293. 10:57cool model to check the grammar in
  294. 10:59parallel. And after all finish, you do
  295. 11:01the final review and tell me. Right, so
  296. 11:03you can do things like this. And with
  297. 11:05this skill, I actually encapsulated the
  298. 11:07short script that is encapsulating all
  299. 11:09those tmux kind of practice but exposing
  300. 11:12like start a new agent session, send
  301. 11:15message to a session, wait for the
  302. 11:17result, see the result, things like
  303. 11:19that. So, you can see if firstly run
  304. 11:22this command, start a code ask session
  305. 11:24and this is kind of ID with a prompt,
  306. 11:26then it run this peak command to quickly
  307. 11:29check if this session actually running
  308. 11:31well Cuz sometimes those coding agent
  309. 11:33session can have those kind of
  310. 11:35permission confirmation screen. And in
  311. 11:38this case, it is working well, then it
  312. 11:40will run this command to wait for the
  313. 11:42session to finish with a max timeout.
  314. 11:44And the session is running in the
  315. 11:45background. And once finished, it will
  316. 11:47do this result check. And here you can
  317. 11:50see that the Codex actually wrote a
  318. 11:52summary, but the summary didn't include
  319. 11:54joke itself. So, then it can send a new
  320. 11:57message to a specific session to ask to
  321. 12:00print out the result. Then it got a
  322. 12:02joke, stopped the Codex session, start a
  323. 12:04pie review session for this specific
  324. 12:07joke. And meanwhile, also start a haiku
  325. 12:09grammar session with a special prompt.
  326. 12:12And you can see there's some issues that
  327. 12:13is blocked by the classifier. So,
  328. 12:15there's probably some improvements that
  329. 12:17we can do for the script as well, but it
  330. 12:19is able to just self-healing and wait
  331. 12:21for the result from both this pie review
  332. 12:23and haiku grammar check. And also see
  333. 12:26that the haiku grammar session is in
  334. 12:28this kind of interactive mode. Then it
  335. 12:30was able to just do the enter to control
  336. 12:33this terminal session. And in the end,
  337. 12:35return back the final version to me. And
  338. 12:38I have included this open agent team
  339. 12:40skill inside the AI Build Club repo
  340. 12:42here. So, you can just copy and use. It
  341. 12:46has this skill file talking about how to
  342. 12:48use this script and also a reference
  343. 12:50file for the cloud.md or agent.md file
  344. 12:53that including this delegation rule
  345. 12:55section. So, you can just copy paste
  346. 12:57over. But meanwhile, if you really want
  347. 12:59kind of premium experience, there are
  348. 13:01also two like Herd and Orca that has
  349. 13:04those orchestration CLI feature built in
  350. 13:07and pair with a kind of UI layer. So,
  351. 13:09it's pretty easy for you to see the
  352. 13:10result. And I test almost all those
  353. 13:13options. Personally, I found Orca is
  354. 13:15providing the best experience. So, Orca
  355. 13:17has this orchestration skills, which is
  356. 13:20a CLI plus Q come out of box. And you
  357. 13:23can basically install it. And once you
  358. 13:24install that, it is basically achieving
  359. 13:26the similar open agent delegations in
  360. 13:29there I have to here. But because it's
  361. 13:31very tied to the interface they have
  362. 13:33here, the experience became very
  363. 13:35intuitive. I'll give you one example.
  364. 13:37Let's say I just start a kind of new
  365. 13:40report, and in this report we don't have
  366. 13:42any uh skills. It just have that
  367. 13:44orchestration skill come out of box. I
  368. 13:46can basically tell the same thing, like
  369. 13:48help me ask Codex to make a joke about
  370. 13:50any new whoop code. After finish
  371. 13:52delegate to Pi, except I will also add
  372. 13:55the skill to just make it more explicit.
  373. 13:57Sometimes they will just do it by itself
  374. 13:59as well. But just for demo purpose, if I
  375. 14:02enter this, it will use the skill which
  376. 14:04will invoke Orcas kind of still I that
  377. 14:07they build in. And then first they start
  378. 14:09a Codex session. But the really cool
  379. 14:11thing here is that you can see this new
  380. 14:14session just pop up on the right side.
  381. 14:16So, it's actually very easy for me to
  382. 14:18see all the sessions end-to-end, and I
  383. 14:20can just put the sub-agent session on
  384. 14:23the same screen here. Uh and on the left
  385. 14:25side, I just have this kind of hierarchy
  386. 14:28view to show me what are the
  387. 14:30sub-sessions under the session. The same
  388. 14:32thing, it also start this Pi agent for
  389. 14:34the review, as well as this Haiku agent
  390. 14:37for the grammar check. And again,
  391. 14:39everything is just very well tracked in
  392. 14:42their interface. I can just go into any
  393. 14:44sub-agent to continue the conversation
  394. 14:46there, and uh once I finish it will like
  395. 14:49automatically communicate back to the
  396. 14:51main agent. And I believe they will even
  397. 14:53have some kind of special data
  398. 14:55visualization to help you see how the
  399. 14:57tasks orchestrated across different
  400. 14:59agents. So, if you want a more kind of
  401. 15:01packaged experience, I highly recommend
  402. 15:03you check out Orcas well. They do have
  403. 15:06so many good stuff built in, like the
  404. 15:08Orca mobile experience, the Kanban view
  405. 15:10out of box, the token usage tracking,
  406. 15:13all the good stuff. And it's totally
  407. 15:14open source and free, and they're
  408. 15:16growing like really, really fast. For
  409. 15:18the past few weeks, it has been my daily
  410. 15:20driver for communicating with agents for
  411. 15:22the past few weeks. And we actually did
  412. 15:24a 1-hour deep dive workshop on some of
  413. 15:26advanced AI coding workflow with Alka
  414. 15:28founder. We actually showcase
  415. 15:29step-by-step of how they were managing
  416. 15:31to ship hundreds of commits to the Alka
  417. 15:34product itself. In Octrade advanced
  418. 15:36agent workflow across Grok, Codex, Cloud
  419. 15:39Code, Open Code. You can also join AI
  420. 15:40Build Club to see the in-depth workshop.
  421. 15:42So, I hope you enjoyed this video. As
  422. 15:44mentioned, feel free to get the skills
  423. 15:46that I put in for either using this open
  424. 15:48agent team skill as well as this
  425. 15:50Contagion Rules section for your
  426. 15:53cloud.md or agent.md file to achieve
  427. 15:55those kind of Octrader worker setup. So,
  428. 15:57that's pretty much for it today. Thank
  429. 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.