feat: add --fast flag to task command for service_tier support#209
Open
WingsOfPanda wants to merge 1 commit intoopenai:mainfrom
Open
feat: add --fast flag to task command for service_tier support#209WingsOfPanda wants to merge 1 commit intoopenai:mainfrom
WingsOfPanda wants to merge 1 commit intoopenai:mainfrom
Conversation
Codex CLI supports service_tier="fast" (1.5x speed at 2x credits) via config.toml, but the companion script had no way to pass this through programmatically. This adds a --fast boolean flag to the task command that sets serviceTier: "fast" on thread start/resume requests. Usage: node codex-companion.mjs task --fast --prompt "analyze this code" node codex-companion.mjs task --fast --prompt-file prompt.md --effort high Changes: - codex-companion.mjs: parse --fast flag, thread through buildTaskRequest and executeTaskRun to runAppServerTurn - lib/codex.mjs: pass serviceTier to buildThreadParams and buildResumeParams when provided Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--fastboolean flag to thetaskcommand that setsserviceTier: "fast"on thread start/resume requestsbuildTaskRequest→executeTaskRun→runAppServerTurn→buildThreadParams/buildResumeParamsMotivation
The Codex CLI supports
service_tier = "fast"viaconfig.tomland/fast onin interactive mode, but the companion script (codex-companion.mjs) has no way to request fast tier programmatically. This is needed for CI/automation workflows and Claude Code plugin integrations that invoke Codex via the companion script and want to trade credits for speed on time-sensitive tasks.Usage
Changes
plugins/codex/scripts/codex-companion.mjs--fastflag, thread throughbuildTaskRequestandexecuteTaskRunplugins/codex/scripts/lib/codex.mjsserviceTiertobuildThreadParamsandbuildResumeParamswhen providedTest plan
task --fastwith simple prompt — verify faster responsetaskwithout--fast— verify no regression (serviceTier is null, not sent)task --fast --background— verify fast tier applies to background tasks--helpshows--fastin task usage line🤖 Generated with Claude Code