viettran-edgeAI/codex_workflow

A swarm orchestration system in Codex, drastically reduce overall token usage.

What it solves

Codex Workflow is designed to maximize token efficiency and reduce context pressure on a main orchestrating agent. It prevents the main agent from being overwhelmed by low-value operational work by delegating tasks to a specialized swarm of sub-agents (workers) who return only small knowledge deltas rather than full context dumps.

How it works

The system operates using three distinct execution routes based on the task complexity:

  • Light route: The default mode for simple Q&A and lightweight tasks with minimal context.
  • Medium route: Deploys a Companion and Investigator to assist the main agent, while the main agent retains ownership of the implementation.
  • Heavy route: Implements a full swarm of specialized workers, including a Companion (context assistant), Investigator (research), Default Executor (routine coding), Senior Executor (complex algorithms), Tester (verification), and Archivist (documentation).

Coordination is handled by a Main Agent who breaks tasks into bounded work packages. A dedicated agent_docs/ framework is used as durable project memory, managed automatically by the Archivist to record goals, architecture, and session handoffs.

Who it’s for

Developers using the Codex app/CLI who want to manage complex, long-term software projects with high token efficiency and structured agentic coordination.

Highlights

  • Multi-tiered routing: Switches between light, medium, and heavy execution modes to match task complexity.
  • Specialized agent swarm: Uses distinct roles like Senior Executor and Archivist to optimize reasoning effort and cost.
  • Durable project memory: Automatically maintains an agent_docs/ directory for cross-session continuity.
  • Token reporting: Includes an integrated report to track token consumption at the end of each session.

Related

  • Project
  • Project
  • Dispatch
  • Project
  • Project