Feature Request
Add a --fast flag to the task command in codex-companion.mjs that enables the Codex fast tier (service_tier = "fast") — 1.5x speed at 2x credits.
Motivation
The Codex CLI supports fast mode via config.toml (service_tier = "fast") and interactive /fast on, but the companion script has no programmatic way to request the fast tier. This matters for:
- CI/automation workflows that invoke Codex via the companion script and want to trade credits for speed on time-sensitive tasks
- Claude Code plugin integrations that dispatch parallel Codex tasks and benefit from faster turnaround
- Selective fast mode — some tasks (broad code scans) benefit from speed, while others (deep audits) benefit from quality. A per-invocation flag is more useful than a global config toggle.
Proposed Usage
node codex-companion.mjs task --fast --prompt "analyze this code"
node codex-companion.mjs task --fast --prompt-file prompt.md --effort high
node codex-companion.mjs task --fast --background --prompt-file prompt.md
Implementation
We have a working prototype in PR #209 that threads serviceTier: "fast" through buildTaskRequest → executeTaskRun → runAppServerTurn → buildThreadParams/buildResumeParams.
However, in our testing the speed improvement was inconsistent — 1.35x faster on a simple task (18.8s → 13.9s) but actually slower on a heavier code analysis task (1m37s → 2m12s). This may indicate that serviceTier needs to be set at a different level in the app-server protocol (e.g., at the turn level rather than thread level), or that the fast tier has startup overhead that only amortizes over longer sessions.
Questions for the team
- Is
serviceTier the correct parameter name for the app-server thread/start request? Or does it need to be passed differently (e.g., at the turn/start level, or as a separate API call)?
- Does the fast tier apply per-thread or per-turn? If per-turn, should the flag be on
turn/start instead of thread/start?
- Are there known limitations of fast tier when invoked via the app-server (as opposed to the interactive CLI)?
Related
Feature Request
Add a
--fastflag to thetaskcommand incodex-companion.mjsthat enables the Codex fast tier (service_tier = "fast") — 1.5x speed at 2x credits.Motivation
The Codex CLI supports fast mode via
config.toml(service_tier = "fast") and interactive/fast on, but the companion script has no programmatic way to request the fast tier. This matters for:Proposed Usage
node codex-companion.mjs task --fast --prompt "analyze this code" node codex-companion.mjs task --fast --prompt-file prompt.md --effort high node codex-companion.mjs task --fast --background --prompt-file prompt.mdImplementation
We have a working prototype in PR #209 that threads
serviceTier: "fast"throughbuildTaskRequest→executeTaskRun→runAppServerTurn→buildThreadParams/buildResumeParams.However, in our testing the speed improvement was inconsistent — 1.35x faster on a simple task (18.8s → 13.9s) but actually slower on a heavier code analysis task (1m37s → 2m12s). This may indicate that
serviceTierneeds to be set at a different level in the app-server protocol (e.g., at the turn level rather than thread level), or that the fast tier has startup overhead that only amortizes over longer sessions.Questions for the team
serviceTierthe correct parameter name for the app-serverthread/startrequest? Or does it need to be passed differently (e.g., at theturn/startlevel, or as a separate API call)?turn/startinstead ofthread/start?Related
service_tier = "fast"in config.toml