fix: preserve priority fast mode#286
Draft
neubig wants to merge 2 commits into
Draft
Conversation
Co-authored-by: openhands <openhands@all-hands.dev>
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
priorityservice-tier response as Fast modefastresponse valueRoot cause
Current Codex normalizes both
fastandpriorityconfiguration values toprioritybefore returningthread/startorthread/resume. codex-acp onlyinitialized
fastModeEnabledwhen that response equaledfast, so the firstprompt sent
serviceTier: nulland cleared a configured Fast tier.Impact
Fast mode configured through
CODEX_CONFIGorconfig.tomlnow remains enabledfor new and resumed sessions. ACP clients that cannot directly set the
fast-modesession option, including OpenHands Agent Canvas, can rely on Codexconfiguration instead.
Closes #285.
Validation
npm test— 298 passed, 28 skippednpm run typechecknpm run buildserviceTier: "priority"Live evidence
Run on 2026-07-13 UTC on Linux x86_64 with Node v24.15.0 and the real
@openai/codex0.144.1 app-server. The reusable harness is committed as.pr/live_priority_fast_mode.ts; it starts the actual Codex subprocess, initializes the productionCodexAcpClientandCodexAcpServer, creates an ACP session with the same{service_tier: "priority"}object supplied byCODEX_CONFIG, sends one real prompt, and records only service-tier/config state and the final response.The identical command was used for both checkouts:
Current
main: canonical priority is clearedCommit:
75893cd87741b2fe127f6698a8741a2e625c3787Codex accepted the configured tier and returned canonical
serviceTier: "priority"fromthread/start, but codex-acp initialized its Fast option as off. The first real prompt then sentserviceTier: null, clearing the configured tier:{ "codexVersion": "0.144.1", "configuredServiceTier": "priority", "appServerServiceTier": "priority", "fastConfigOption": {"type": "select", "currentValue": "off"}, "fastModeEnabledAfterStart": false, "firstPromptServiceTier": null, "promptStopReason": "end_turn", "finalMessage": "priority-fast-live-ok" }PR head: Fast mode remains enabled
Commit:
dee5214f2bb53fcd7f8f8a383826de47228c56d7The same Codex response now initializes Fast mode on, preserves enabled state, and sends the legacy-compatible Fast tier on the first live prompt:
{ "codexVersion": "0.144.1", "configuredServiceTier": "priority", "appServerServiceTier": "priority", "fastConfigOption": {"type": "select", "currentValue": "on"}, "fastModeEnabledAfterStart": true, "firstPromptServiceTier": "fast", "promptStopReason": "end_turn", "finalMessage": "priority-fast-live-ok" }Both runs issued the production
initialize,thread/start,model/list, andturn/startJSON-RPC sequence. On the final PR head,npm run typecheck,npm test(298 passed, 28 skipped), andnpm run buildalso passed.