Back to AI Jason

Tmux + Fable = Cut 35% less token

AI JasonJuly 20, 202616m
In a Nutshell

Use a Fable 5 orchestrator to plan and delegate execution to persistent Sonnet 5 sidekicks instead of spinning up fresh sub-agents. Persistent sessions let the executor inherit full context at cached-token prices, cutting cost 35% versus one-shot sub-agents. Wrap any agent (Cloud Code, Codex, Gemini CLI, etc.) behind Tmux-orchestrated “Open Agent Teams” so you can run the same coordinator-worker pattern across every harness.

AI-Generated Notes

These notes were generated by AI and may contain inaccuracies.

Cloud quota burns out quickly when Fable 5 or GPT-5.6 So Max is used directly for all tasks. These frontier models are powerful but expensive and slow. The recommended practice is to use Fable 5 as the advisor or planner while using smaller models like Sonnet 5 as the executor. Sonnet 5 costs only 20% of Fable 5 but delivers performance nearly equivalent to Opus 4.8, the strongest model from a few months ago.

Cloud Code officially demonstrates two methods. The first approach uses Sonnet 5 as the main executor agent and only calls Fable 5 as an advisor to review plans and provide advice. The second approach uses Fable 5 as the main agent that creates a plan and spins up worker agents using smaller models for execution.

Devin introduced a new harness called Devin Fusion that achieves similar or better performance than Fable 5 with 35% lower cost. Devin Fusion is fundamentally Cloud Code's Fable 5 orchestrator plus Sonnet 5 worker model. Devin compared the two Cloud Code methods and found that the Fable 5 orchestrator model works significantly better because advisor models require reading the full conversation history from the main agent rather than triggering cached context. Cached tokens cost only 10% of new input tokens, making the orchestrator approach more cost-efficient.

Devin refers to persistent sub-agents as sidekicks. Traditional sub-agents in Cloud Code or Code X create new sessions on the fly, and when the main agent needs to make edits, a new task tool spins up a fresh sub-agent with no prior context. This wastes tokens by rewriting the same information repeatedly. Sidekick sessions are persistent, so follow-up messages from the main agent inherit all past context. Since cached tokens are extremely cheap yet powerful, this approach provides full context at minimal cost.

Cloud Code users can achieve this using agent team functionality. Instead of starting one-time sub-agents, users prompt Cloud Code to use agent team for tasks, creating persistent sessions. Once finished, the main agent receives notification and can send follow-up messages to the same persistent session using the send message tool. Agent team sessions remain resumable until they call a shutdown request. Cloud Code can also define the model when starting an agent team session.

To achieve Fable 5 as main coordinator and planner with Sonnet 5 or smaller models as executors, add delegation rules to the cloud.md file. The rules specify that the coordinator handles design, planning, architecture, and tiny edits, while delegating hands-on execution to executor sub-agents using the Sonnet model. A critical road check section ensures sub-agents recognize their role and avoid spinning up nested agents.

Starting a session to design and build a to-do app triggers the coordinator to ask clarifying questions, perform planning, create a frozen spec in the task folder for complex tasks, and make the plan unambiguous for executors. The coordinator then spins up a Sonnet 5 sub-agent that receives the executor role, reads the spec first, and performs implementation without spawning additional sub-agents. Sonnet 5 execution is significantly faster than Fable 5 implementation.

This workflow works directly in Cloud Code, but many users work across multiple AI coding agents including Gemini CLI, Kimi Case 3, and others. The ideal setup uses the best coordinator model like Cloud Code or Codex with GPT-5.6 So Max, while allowing worker agents to use any preferred model based on specific strengths such as Gemini for front-end design.

Codex introduced the Codex plugin CC tool, a Cloud Code plugin that delegates tasks to Codex agents. After installation and adding OpenAI Codex, users can prompt delegation to Codex agents for tasks like improving UI. The plugin provides commands including Codex rescue to treat Codex as a sub-agent, Codex review for local git review, Codex result to fetch output from specific sessions, Codex cancel, and Codex transfer to fork conversation history to the Codex side. A limitation is that sending follow-up messages to existing Codex sessions requires using the resume command hack.

Tmux serves as a terminal multiplexer to control any coding agent by starting persistent terminal sessions and reading or manipulating them. Commands like tmux split-window -h create new sessions, while tmux send-keys sends messages to specific sessions. The tmux capture-pane -p -t .1 command captures and returns terminal output. This enables agents to control any coding agent as real agent teams.

Tmux provides notification mechanisms using wait-for -s with special messages. Agents can be instructed to send completion signals, allowing the main agent to wait for task completion and retrieve results. This pattern enables background command execution with automatic notification upon completion.

The open agent teams skill encapsulates tmux practices with adapters for Cloud Code, Codex, Grok, Pi, Open Code, and other harnesses. It exposes functions for starting new agent sessions, sending messages to sessions, waiting for results, and checking results. The skill works in any terminal environment and supports parallel delegation across multiple agents with self-healing capabilities for permission screens and interactive modes.

Herd and Orca provide built-in orchestration CLI features paired with UI layers. Orca offers the best experience with orchestration skills that include CLI and UI components, providing intuitive session management, hierarchy views, automatic communication back to main agents, and data visualization for task orchestration. Additional features include mobile experience, Kanban view, and token usage tracking. Orca is open source and free, serving as a daily driver for agent communication across Grok, Codex, Cloud Code, and Open Code workflows.

Keep AI Jason in your library

Save the videos and channels worth coming back to, and find them again in one place.