Codex
Run the OpenAI Codex CLI backed by a fused model panel.
fusionkit codex launches the OpenAI Codex CLI
with the fused panel as its model backend. Codex speaks the OpenAI Responses
dialect to the local gateway and treats fusion-panel as a normal model.
cd your-git-repo
fusionkit codexAnything after the tool name is forwarded to Codex, so your usual Codex arguments still work:
fusionkit codex -- "fix the failing parser test"Prerequisites
- The
codexbinary on your PATH. Install it from github.com/openai/codex. - A valid
.fusionkit/fusion.jsonv4 file and RouteKit endpoint config. Provider credentials are referenced only by.routekit/router.yaml.
fusionkit doctor verifies both before you launch.
How the wiring works
The launcher never touches your own Codex configuration. It creates a temporary
CODEX_HOME for the session and writes a config.toml that registers the
gateway as a Responses provider:
model = "fusion-panel"
model_provider = "fusionkit-local"
[model_providers.fusionkit-local]
name = "FusionKit local"
base_url = "http://127.0.0.1:<port>/v1"
wire_api = "responses"
requires_openai_auth = falseCodex is then spawned with CODEX_HOME pointing at that directory, and the
directory is deleted when the session ends. Your ~/.codex/config.toml stays
as it was.
If you prefer to wire Codex by hand against a running fusionkit serve, the
same snippet is printed at boot; paste it into your own ~/.codex/config.toml
or a temporary CODEX_HOME.
The model picker
Codex's /model picker lists the default fusion-panel model and every other
named ensemble (fusion-<name>). RouteKit owns single-model endpoint launches.
Each model also gets a [profiles.*] entry, so you can start Codex on a
different ensemble directly:
fusionkit codex -- --profile fusion-deepSub-agents
By default the launcher defines one Codex agent role per named ensemble, so
spawn_agent can delegate a task to any ensemble out of the box. Delegation
depth is capped at one level, because a fused sub-agent is itself a whole panel
run. Pass --no-subagents (or set "subagents": false in
.fusionkit/fusion.json) to skip this.
Caveats
- Codex validates its model catalog and agent-role config at startup, and the catalog schema changes between Codex releases. If Codex exits within the first two seconds, FusionKit retries automatically: first without the model catalog, then without the sub-agent roles. Fusion keeps working in both fallbacks; you lose only picker niceties.
- Direct and single-model mode belongs to RouteKit; FusionKit has no
--direct.
Related pages
- Codex subscription disclosure for credential ownership, billing, quota failover, protocol limits, and qualification status.
- Quickstart for the first session.
- Command reference for every launch flag.
- Rate-limit handoff for passthrough failover.