While OpenAI’s Codex and Anthropic’s Claude Code keep adding useful features like sub-agent delegation to their coding assistants, no one is as far along with this as Hermes Agent where the feature has been working for weeks.

The mental model, kept generic

The problem: A single chat session has one context window. When a task produces lots of big tool output (build logs, data dumps, traces), that output piles into the conversation and eventually fills or breaks the window. The “thinking” and the “messy output” fight for the same space.

The pattern that fixed it – “Thin/smart main + delegated workers”

Main session = the brain / coordinator. It’s context stays small. It plans, decides the next step, checks results, and writes progress to disk. It never runs the heavy or log-heavy commands itself.

Sub-agents = isolated workers. Each sub-agent gets its own fresh, full-sized context window. You hand it one bounded chunk of work. It does the heavy lifting, writes all real outputs to files on disk, and replies with only a short summary.
Why it works:

The big/log-heavy output never enters your main conversation – it stays inside the sub-agent’s isolated window or lands on disk. Your main window stays lean.

The sub-agent’s summary is not trusted as truth. The real evidence is on disk (files + verification scripts you can re-run). You verify by reading disk artifacts, not by believing the summary.

Progress lives on disk, not in chat memory. So if your main session ever gets full, you just open a new conversation, reload the instructions, read the disk files, and continue. Nothing is lost.

When to hand off: At natural boundaries (one stage finished, one component, one experiment batch) — not when you’re already near overflow. Delegate proactively in sized chunks; don’t wait until you’re drowning.

The one rule that matters

Never let the sub-agent own the big picture, and never trust its summary without disk evidence. The main session owns the plan; disk owns the truth.

Watch the animated musical story / prediction of where things could be going and how we get there. Trigger warning: Short version skips past the dark times. Longer version tells the whole story.

A music video of the future by Scott Howard Swain