codex-stage-orchestrator
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@codex-stage-orchestratorset up planning, design, development, review, and verification for my current task"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Codex Stage Orchestrator
This is an independent open-source project, not an official OpenAI product. Version0.1.x is an early release: its evidence and safety contracts are deliberate, while host UI integration may evolve with Codex.
Why this exists
Different phases of a software task benefit from different roles and, sometimes, different models. But orchestration becomes untrustworthy when it cannot answer three basic questions:
What route was configured?
Did Codex accept that route?
Which model did the host actually report at runtime?
Codex Stage Orchestrator answers each question separately. It gives one root agent responsibility for the whole task, routes only the stages that benefit from specialization, and keeps a small local evidence ledger populated by Codex lifecycle hooks.
Related MCP server: Proof Mode
At a glance
Capability | Behavior |
Stage routing | Maps discovery, planning, design, development, review, verification, and delivery to logical roles. |
Role routing | Keeps a role on the root, launches an exact Codex subagent route, or explicitly skips it. |
Current tasks | Activates a profile for one existing task without changing other tasks. |
Future tasks | Selects a default profile that new tasks capture when they start. |
Live evidence | Records root and subagent model slugs mechanically reported by lifecycle hooks. |
Enforcement | Observes mismatches by default; optionally denies mismatched agent launches in strict mode. |
Privacy | Never reads transcripts or stores prompts, agent messages, generated work, or unrelated tool inputs. |
Runtime | Dependency-free Node.js MCP server and hook handler. |
How it works in practice
Imagine asking Codex to build a new product surface.
1. A task starts
The SessionStart hook registers the task id, active profile, working directory, and the root model slug reported by Codex. It injects the exact task id into agent context; it does not read the transcript.
2. The root chooses useful stages
The orchestration skill evaluates the request. A simple bug may need only development and verification. A new interface may benefit from planning, design, development, review, and verification. It does not create agents merely to prove orchestration is enabled.
3. A stage resolves to a role and route
Profiles use a two-step mapping:
stage → role → routeFor example:
planning → planner → agent:model-planning
design → designer → agent:model-design
development → developer → agent:model-development
review → reviewer → agent:model-review
verification → verifier → rootBefore work begins, Codex shows a compact status update:
Orchestration · planning · planner → agent:model-planning · evidence: configured4. The route runs
A
rootroute keeps the stage in the current task.An
agentroute launches a bounded subagent with the exact configured type, model, effort, service tier, and context-forking policy.A
skiproute deliberately omits the stage.
The root remains responsible for decomposition, task packets, integration, verification, and the final response. A subagent never owns the whole user request.
5. Hooks confirm what happened
The pre-tool hook records the requested routing fields and can reject mismatches in strict mode. SubagentStart records the agent id, type, and model slug reported by Codex. If the configured and observed values differ, status shows both and flags the mismatch.
6. The root integrates the result
When the stage finishes, the root checks the result, records a short non-sensitive outcome, moves to the next useful stage, and eventually returns one integrated answer to the user.
This is the central boundary: the plugin does not hot-swap the root model inside an existing task. A stage assigned to another model runs as a Codex subagent.
Architecture
flowchart LR
U["User request"] --> R["Accountable root agent"]
R --> S["Stage orchestration skill"]
S --> C["Local MCP control plane"]
C <--> L["Private evidence ledger"]
S -->|"exact bounded route"| A["Codex subagent"]
H["Lifecycle hooks"] -->|"runtime evidence"| L
A --> R
R --> USee Architecture and Protocol for state transitions, locking, trust boundaries, and the complete MCP contract.
Installation
Requirements
A Codex build with plugin and lifecycle-hook support.
Node.js 20 or newer available as
node.Git, for marketplace installation and updates.
The package follows the official Codex plugin authoring and lifecycle hook contracts.
Install from GitHub
codex plugin marketplace add slegarraga/codex-stage-orchestrator
codex plugin add codex-stage-orchestrator@codex-stage-orchestratorThen:
Review and trust the bundled hook definition when Codex asks.
Open a new Codex task so
SessionStartcan register it.Ask: “Show my current orchestration profile and live model evidence.”
Plugin hooks are not trusted automatically. Without hook trust, profile and stage configuration still work, but the plugin correctly reports runtime model evidence as unavailable.
Install from a local checkout
git clone https://github.com/slegarraga/codex-stage-orchestrator.git
cd codex-stage-orchestrator
codex plugin marketplace add .
codex plugin add codex-stage-orchestrator@codex-stage-orchestratorFirst five minutes
The built-in balanced profile is intentionally safe: every role stays on the root until you configure it.
Use natural language in Codex:
Inspect: “Show the active orchestration profile, every stage role, and current evidence.”
Create: “Create a profile called
specialistsbased onbalanced.”Configure: “Route planning to model
model-planning, design tomodel-design, development tomodel-development, and review tomodel-review.”Test safely: “Keep this profile in observe mode and use it only for this task.”
Promote later: “After I confirm, make
specialiststhe default for future tasks.”
Persistent configuration tools require explicit confirmation. The agent cannot silently change a shared profile or future-task default.
Profiles, roles, and routes
The standard stages are:
Stage | Default role | Typical purpose | Required by default |
|
| Inspect unknowns and gather bounded evidence. | No |
|
| Decide scope, architecture, sequence, and acceptance criteria. | Yes |
|
| Make UX, visual, interaction, or artifact decisions. | No |
|
| Implement the approved work. | Yes |
|
| Independently inspect correctness, quality, and risk. | Yes |
|
| Run proportionate tests and validate the visible outcome. | Yes |
|
| Package, publish, or hand off a verified result. | No |
Route types
Keep a role on the current task model:
{ "kind": "root" }Launch a bounded Codex agent:
{
"kind": "agent",
"agent_type": "worker",
"model": "model-a",
"reasoning_effort": "high",
"service_tier": "priority",
"fork_turns": "none"
}Explicitly skip a role:
{ "kind": "skip", "reason": "No visual surface in this workflow." }Model ids are opaque strings. The plugin never guesses an id or claims it is available before Codex accepts or observes a launch. See the complete generic example at examples/profiles/specialists-observe.json.
Current task versus future tasks
User intent | Scope | Result |
“Use | Current task | Only this task points to that profile. |
“Make | Future tasks | New tasks capture that profile at |
“Change the developer route in | Profile | Future stages in every task referencing that profile resolve the updated route. |
“Clone | New profile | The experiment can evolve without changing the original profile. |
This separation makes it possible to change future behavior from inside any current Codex conversation without retroactively moving unrelated conversations.
Evidence you can trust
Evidence | What it proves | Runtime identity? |
| A validated profile selected the route. | No |
| A | No |
| Codex accepted the route or returned an agent id. | Not yet |
| A lifecycle hook mechanically reported the active model slug. | Yes |
| The route or stage failed. | Failure state |
Evidence never moves backward. A late acceptance event cannot replace an earlier hook observation, and agent self-identification is never treated as proof.
Observe versus strict
Mode | Mismatched launch | Recommended use |
| Records the mismatch and allows Codex to continue. | Initial setup, experimentation, and compatibility testing. |
| Denies a mismatched | Stable, audited profiles where exact routing matters. |
Strict matching checks every configured routing field. It cannot rewrite a tool call, so the root must pass the exact route. Route verification errors remain fail-open by default; advanced users may set STAGE_ORCHESTRATOR_FAIL_CLOSED=1 after validating local state.
Privacy and local state
By default, state lives at $CODEX_HOME/stage-orchestrator or ~/.codex/stage-orchestrator. Set STAGE_ORCHESTRATOR_DATA_DIR to isolate it.
Stored:
Profiles, stage mappings, and routing fields.
Task/session ids, working directory, agent ids, and timestamps.
Stage transitions and hook-reported model slugs.
A small capped evidence and event history.
Never read or stored:
Transcript contents or transcript paths.
Prompt bodies or agent task packets.
Agent messages, generated work, or final answers.
Shell commands, patches, file contents, browser data, or unrelated tool inputs.
Files use private permissions where supported. Writes are atomic, session filenames are hashed, and cross-process locks protect concurrent hook/MCP updates. See Security.
Product boundaries
No in-place root-model hot swap; specialization uses bounded subagents.
No native badge injected into the Codex task header in version
0.1.No macOS menu-bar application.
Live status appears through lifecycle state, MCP results, Codex agent surfaces, and concise orchestration commentary.
The model catalog is host-owned; configured ids are validated only as strings until Codex accepts or observes them.
Hook trust and a new task are required for runtime evidence after installation.
These constraints are explicit so the plugin remains honest across Codex hosts. A future MCP App can provide a richer visual surface over the same evidence ledger without changing its trust semantics.
Development
The runtime has no third-party package dependencies.
npm ci --ignore-scripts
npm run checkValidation covers profile schemas, persistence, current/future scope, strict enforcement, evidence monotonicity, runtime mismatches, hook privacy, cross-process locking, MCP stdio, and package structure. CI runs on Ubuntu, macOS, and Windows with supported Node.js versions.
Repository layout:
plugins/codex-stage-orchestrator/ Plugin manifest, MCP server, hooks, skill
examples/profiles/ Generic example profiles
docs/ Architecture, protocol, and Spanish guide
test/ Node test suite
.agents/plugins/marketplace.json Git-backed Codex marketplace catalogContributing and support
Contributions are welcome. Please read Contributing and the Code of Conduct, search existing issues, and include tests for protocol or persistence changes.
Questions and ideas: GitHub Discussions
Bug reports and feature requests: GitHub Issues
Security concerns: follow the private process in SECURITY.md
General help: SUPPORT.md
Roadmap
Gather compatibility evidence across Codex desktop and CLI releases.
Add import/export for profiles with explicit review.
Explore an optional MCP App status view where supported.
Stabilize the state migration contract for
1.0.Submit to the public Plugins Directory after real-world validation.
License
MIT © 2026 Stage Orchestrator Contributors.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityAmaintenanceAn MCP server that turns independent AI agents into a coordinated engineering team with shared task board, context, review loop, and enforced plan-implement-review-iterate workflow.Last updated24MIT
- -license-qualityCmaintenanceAn MCP server implementing a multi-phase backend for structured model interactions, bounded compilation, exact-hash confirmation, and Codex-run provenance, with trust-separation hardening.Last updated1
- Alicense-qualityDmaintenanceMCP server that enables Claude Code to delegate tasks to Codex for real-time collaborative code generation and execution.Last updated6MIT
- Alicense-qualityBmaintenanceA local MCP control plane for Codex that manages task queues, dynamic roles, and side-panel team collaboration with persistence, dependency gating, and structured reporting.Last updatedMIT
Related MCP Connectors
A paid remote MCP for OpenAI Codex agent coordination MCP, built to return verdicts, receipts, usage
Control plane for autonomous software labor. Agents claim objectives over MCP with audit trail.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/slegarraga/codex-stage-orchestrator'
If you have feedback or need assistance with the MCP directory API, please join our Discord server