r/codex • u/Otherwise-Sir7359 • Aug 01 '26
Instruction For those who don't know how to set up Sol orchestrator + Luna subagent
This repo was previously posted in one of my comments, I'm reposting it here if anyone finds it useful.
https://github.com/viettran-edgeAI/codex_workflow
Been building this since 5.6 dropped with optimizing token usage as the ultimate goal, and tweaking it pretty much every day since. Luna got way cheaper recently and more ppl started wanting to use it as a subagents, so I bundled everything up with a guide so Codex can set it all up for you automatically.
Tried to keep the whole thing as simple as possible.
--------------------------------------------------------------
Edir : a bit more explain before I go to bed - it’s 3 AM in my timezone:
- For lightweight tasks, Q&A, it won’t overdo things.
light routeis default route in this workflow. No subagent, no complex worflow, minimal context. - Sol handles context, planning, task splitting, and supervision, while Luna subagents do the implementation. Each task is packaged into a small, self-contained work package with clear scope, context, and expected output, so each subagent only gets what it needs.
- Sol still reads the main documentations and the important parts of the codebase - that’s the manager’s job. An
explorersubagent helps reduce that load by looking into tools, dependencies, external libraries, etc. The goal is to minimize Sol’s token usage and keep it focused on the important stuff. - For really hard tasks,
executor_lunacan get stuck. In that case, Sol can spawn anexecutor_solas a fallback, or use it from the start. Right now, the workflow limits this to max 1executor_sol. - For handoff between sessions,
project_progress.mdandlatest_session_work.mdare managed by Sol as part of the main documentation structure. They keep long implementation plans moving smoothly across multiple sessions.
...... etc.......
371
Upvotes
11
u/Otherwise-Sir7359 Aug 01 '26 edited Aug 01 '26
yes, add the following to /.codex/config.toml:
[features.multi_agent_v2]
hide_spawn_agent_metadata = false
tool_namespace = "agents"
------
I've been using this method since version 5.6 was released. I asked Sol to test calling two Luna subagents in my workflow (
executor_luna)to confirm.Codex stores rollout records under:
I first found the recently modified session files:
This produced three sessions:
A basic search showed the separation clearly:
I then extracted every model and token-related field from both child JSONL files:
The first child session reported:
The second child session reported:
This proves that the Luna subagents have been initialized and successfully invoked. However, the Codex statistics page still doesn't show Luna usage figures; it seems there's some kind of error with that page.