feat(coding-agent): add Codex fast mode (OpenAI priority service tier) - #1143
Conversation
Add persisted chat/workflow Codex fast-mode toggles, conditional /fast UI, and OpenAI priority service-tier wiring for supported providers. Refs #1134 AI-Assisted-By: Codex
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
Assistant-model: GPT-5.5
Review: feat(coding-agent): add Codex fast modeNice, focused PR — clear scoping (chat vs workflow), good defensive guards (provider whitelist, payload non-overwrite), and solid test coverage. A few things worth addressing before merge: Bugs / correctness
Code style / conventions
Tests
Other notes
Overall: ship-able after addressing #1 and #3 (correctness/error-handling), with #2/#5 as easy nits. |
Code Review —
|
Filter scoped fast-mode candidates by configured auth so stale scoped OpenAI models do not expose /fast after logout. Reserve the full built-in slash command namespace when filtering extension commands so hidden built-ins cannot be shadowed in autocomplete. AI-Assisted-By: OpenAI Codex
Code Review — Codex fast modeOverall this is a clean, well-scoped feature with thoughtful policy isolation in Bugs / correctness
API / design
Testing
Nits
Nothing security-sensitive; fast mode only flips a service-tier field on the OpenAI/OpenAI-Codex providers and never touches credentials or routing. Performance impact is negligible. 🤖 Generated with Claude Code |
Code ReviewNice work. The feature is well-scoped, the helper module factors provider eligibility cleanly, and there's good test coverage across the helper, settings, SDK wiring, the TUI component, and Issues1. 2. 3. Minor
Strengths
Security / PerformanceNo concerns. Fast mode only changes a request header/payload field, doesn't touch auth, and the per-request overhead is a shallow object copy gated on a boolean. |
Preflight initialization notesEvidence inspected
Setup state
Commands run
Blockers
Decisions / tradeoffs
Iteration 1 implementation notesDelegation summary
Decisions and tradeoffs
Validation outcomes
Git / PR status
Iteration 2 implementation notesDelegation summary
Decisions and tradeoffs
Validation outcomes
Git / PR status
|
|
Manual QA feedback for
|
Code reviewThanks for the thorough PR — the design follows existing patterns well (helper module + selector component + settings round-trip), test coverage is broad, and the safety checks (no overwrite of an existing Bugs / correctness
Code quality
Performance
Security
Test coverageGood breadth — settings round-trip, payload guard, scope selection, visibility, UI rendering, footer indicator, and SDK injection are all covered. Two gaps worth filling:
Overall direction looks good. Items 1 (stage-runner SettingsManager) and 9 (telemetry leak of the |
Code Review —
|
Code Review — feat(coding-agent): add Codex fast modeThanks for the thorough RFC, broad test coverage, and the clean helper module. The design is well-factored and the project-override propagation in What works well
Bugs / correctness1. Inconsistent The payload helper defaults 2. Defensive optional chaining in const fastModeSettings = this.session.settingsManager?.getCodexFastModeSettings?.();In production, 3. Constructed
Code quality / consistency4. Type duplication. 5. PR description vs. code drift. PR description names a 6. Arrow-key semantics could be clearer ( 7. Spec file checked in. PerformanceNegligible; only worth noting:
Security
TestsStrong coverage. Gaps I'd consider filling:
Style nit — test frameworkCLAUDE.md states tests use Overall: approve with minor changes. Items 1–3 are the only ones I'd want addressed before merge; the rest are suggestions. |
Code Review: Codex Fast ModeSolid feature implementation with strong test coverage across helpers, SDK injection, settings persistence, the TUI component, footer rendering, autocomplete visibility, and workflow stage metadata. The provider allowlist ( Bugs & correctness1. Extension The autocomplete filter for extension commands is 2. Concurrent
3. Duplicated fast-mode resolution —
Code quality4. Inconsistent
5. Defensive optional chaining on a non-optional field — const fastModeSettings = this.session.settingsManager?.getCodexFastModeSettings?.();
6. Tiny render cost in footer — Negligible, but Style / nits
TestsCoverage is genuinely good — helper unit tests, SDK integration test that exercises the real One gap worth considering: there is no test for the Security & privacyNo concerns. SummaryLooks ready to merge after addressing #1 (or explicitly confirming the design) and #2. Everything else is polish. |
Code review — Codex fast mode (
|
Code Review —
|
Code Review: Codex Fast Mode (
|
Review: Codex fast mode (
|
PR Review — Codex fast modeSolid, well-tested feature overall — clean separation between the helper module ( Code quality / design
Potential bugs / edge cases
Test coverageCoverage is thorough (helper unit tests, payload/stream-option mutation, scope selection, settings round-trip, selector keystrokes, footer label, autocomplete visibility, stage-runner fast-mode meta). Suggested additions:
Nits
VerdictThe implementation looks careful and the behaviour matches the PR description. Tighten up the duplicated provider list, fix the Posted by Claude Code review |
Code Review: Codex Fast ModeThanks for the well-scoped PR — the helper module + scoped settings + per-scope wiring is a clean shape, and the test coverage is impressive. A few observations below, roughly in priority order. Correctness / behavior1. Eager session creation is broader than needed. In
The first branch causes every default-model stage — including stages that never touch OpenAI — to incur an eager 2. Silent swallowing in 3. 4. 5. 6. Tests7. Strong coverage overall — provider eligibility, scope selection, payload/stream mutation, settings round-trip with project overrides, footer indicator, autocomplete visibility, and stage-runner/executor fast-mode metadata are all exercised. Nice. 8. Polling loops in 9. 10. The Code quality / nits11. 12. 13. 14. 15. Spec file in Security / privacyNothing concerning. The PR doesn't change auth handling, log payloads, or expose credentials. The fast-mode toggle does have billing implications (priority service tier), and the docs/UI correctly call this out. ✅ PerformancePer-request overhead is negligible (provider string check + shallow object spread when enabled). The main cost is the eager session creation noted in (1) and the autocomplete rebuilds in (14). SummaryThe implementation is correct in its happy path and the chat/workflow split is a thoughtful design choice. The biggest concrete asks are (1) narrowing the eager session creation to fast-mode-eligible cases and (3)/(4) clarifying the Nice work on the test breadth — especially the project-override regression tests and the workflow node-card fast marker. 🚀 |
Assistant-model: GPT-5.5
Code Review: Codex fast mode (
|
Assistant-model: GPT-5.5
Review — Codex fast mode (#1143)Nice, well-scoped feature with strong test coverage (~1,000 lines) and clear separation of policy ( Bugs / correctness
Design / UX
Style / consistency
Tests
Nits
Overall this is a careful, complete implementation — the bug in finding 1 and the provider-scoping issue in finding 3 are the items I'd want addressed before merge; the rest are judgment calls. |
#1143) * feat(coding-agent): add Codex fast mode Add persisted chat/workflow Codex fast-mode toggles, conditional /fast UI, and OpenAI priority service-tier wiring for supported providers. Refs #1134 AI-Assisted-By: Codex * refactor(coding-agent): simplify Codex fast mode wiring Assistant-model: GPT-5.5 * fix(coding-agent): tighten fast command autocomplete Filter scoped fast-mode candidates by configured auth so stale scoped OpenAI models do not expose /fast after logout. Reserve the full built-in slash command namespace when filtering extension commands so hidden built-ins cannot be shadowed in autocomplete. AI-Assisted-By: OpenAI Codex * refactor(coding-agent): reuse builtin slash command names * fix(coding-agent): show active codex fast mode * fix(coding-agent): persist fast mode project overrides * fix(workflows): render fast mode indicator separately * fix(workflows): propagate fast mode metadata settings * fix(coding-agent): tighten fast mode follow-ups * fix(workflows): surface fast mode during stage runs * fix(workflows): show fast marker for explicit model stages * fix(workflows): resolve fast metadata model aliases * fix(workflows): synchronize fast metadata across fallback * fix: preserve fast mode scope settings * fix(codex-fast-mode): propagate runtime fast mode state Assistant-model: GPT-5.5 * fix(codex-fast-mode): preserve registered provider streams Assistant-model: GPT-5.5
Summary
Adds
/fast— a slash command that toggles OpenAI'sservice_tier: "priority"foropenai/*andopenai-codex/*models. Fast mode is independently scoped to chat sessions and workflow stages, persisted to settings, and propagated via environment variable so it survives process boundaries and session replays.Closes #1134.
Key Changes
Core (
packages/coding-agent/src/core/)codex-fast-mode.ts(new) — Provider eligibility checks (isCodexFastModeSupportedProvider), scope resolution (chatvsworkflow), guardedserviceTier/service_tierpayload helpers (withCodexFastModeStreamOptions,withCodexFastModePayload) that never overwrite an existingservice_tier, andformatCodexFastModeModelLabelfor status displaysettings-manager.ts— NewCodexFastModeSettingsinterface (chat?: boolean,workflow?: boolean, both defaultfalse);getCodexFastModeSettings()/setCodexFastModeSettings()with project-override propagation; runtime settings layer readsENV_CODEX_FAST_MODEon every load so fast mode survives restartssdk.ts— InjectsserviceTier: "priority"into stream options andservice_tier: "priority"into raw payloads for eligible requests before extension hooks run; selectschatvsworkflowscope fromOrchestrationContext; never overwrites an existingservice_tieragent-session.ts— ExposesorchestrationContextgetter for downstream scope resolutionconfig.ts—ENV_CODEX_FAST_MODEenv var withchat=1;workflow=0serialization format;getCodexFastModeEnvironmentSettings()/setCodexFastModeEnvironmentSettings()helpersindex.ts— Exports all public fast-mode utilities and typesInteractive mode (
packages/coding-agent/src/modes/interactive/)interactive-mode.ts— Handles/fastinput; hides autocomplete entry when no supported model is in scope; re-runssetupAutocompleteProvider()after auth/model changes; promotesBUILTIN_SLASH_COMMAND_NAMESto module level to prevent extension shadowingcomponents/fast-mode-selector.ts(new) —FastModeSelectorComponent: two-row TUI toggle (Tab/arrows to navigate, Left/Right/Space/Enter to toggle), live status feedback, Escape/Ctrl+C to closecomponents/footer.ts— Appends· fastsuffix to the active model name when fast mode is enabled; composes correctly with the existing reasoning-level suffixWorkflows (
packages/workflows/src/)runs/foreground/executor.ts—applyModelFallbackMeta()helper consolidates metadata application including newfastModefield; eager session setup for OpenAI/Codex models records fast-mode state before firstprompt()call; replays fast-mode metadata from persisted sessionsruns/foreground/stage-runner.ts— ExportsStageSessionCreateResulttype; propagatessettingsManagerfrom session create result; surfacesfastModein__modelFallbackMeta()using a scopedOrchestrationContextwith the stage's IDs for accurate scope resolutionextension/wiring.ts— ThreadssettingsManagerthroughcreatePiSdkAgentSessionresult; exposesgetCodexFastModeSettings()onPiSdkSettingsManagerinterfacetui/node-card.ts— Appends· fastto workflow node card dependency metadata whenstage.fastMode === trueshared/store-types.ts/shared/types.ts— Add optionalfastMode?: booleantoStageSnapshotandWorkflowTaskResultTests (~1,000 lines of new test code)
test/codex-fast-mode.test.tstest/fast-mode-selector.test.tstest/footer-codex-fast-mode.test.tstest/interactive-mode-status.test.ts/fastautocomplete visibilitytest/sdk-codex-fast-mode.test.tstest/settings-manager-codex-fast-mode.test.tstest/unit/executor.test.tstest/unit/stage-runner.test.tsfastModemetadatatest/unit/node-card.test.ts· fastindicatortest/unit/wiring-adapters.test.tsDocs & changelog
docs/providers.md— Codex fast mode section under OpenAI Codexdocs/settings.md—codexFastModeconfig block with field descriptionsdocs/usage.md—/fastcommand entrypackages/coding-agent/CHANGELOG.mdandpackages/workflows/CHANGELOG.md— Entries under[Unreleased]Notes
openaiandopenai-codexprovider IDs.github-copilot/*, Azure OpenAI, OpenRouter, and other OpenAI-compatible providers are excluded by design./fastis hidden from autocomplete when no supported model is authenticated or in scope.service_tiervalues in payloads are never overwritten — extension hooks that set their own value are respected.ENV_CODEX_FAST_MODE(chat=1;workflow=0format) so it survives process boundaries and session replays.