fix(server): respect Codex default-mode user input
Fixes #5282
T3 Code always injected instructions saying request_user_input was unavailable in Default mode, even when the effective Codex configuration enabled default_mode_request_user_input.
This change queries Codex's experimentalFeature/list API using the loaded provider thread ID, caches the effective state for the session, and removes the conflicting Default-mode restrictions when enabled. Missing, disabled, unsupported, or failed feature detection preserves the existing behavior.
The existing web, desktop, and mobile structured-question flow remains unchanged. No T3-specific setting or universal override is added.
Checks:
vp test run apps/server/src/provider/Layers/CodexSessionRuntime.test.tsvp test run apps/server/src/provider/Layers/CodexCollabRuntime.integration.test.tsvp run -F t3 typecheck- targeted type-aware lint
Implemented with gpt-5.6-sol through the Codex harness in T3 Code.
[!NOTE] Medium Risk Changes agent-facing developer instructions for all Default-mode Codex turns when the feature is on; detection fails closed, but mis-detection could confuse tool-use behavior.
Overview Stops always telling Codex that
request_user_inputis unavailable in Default mode when Codex’s effective config enables the experimentaldefault_mode_request_user_inputfeature.After a provider thread opens, the session runtime calls
experimentalFeature/list(with pagination), caches whether that feature is enabled, and passes that intobuildCodexDeveloperInstructions. When enabled, Default-mode developer instructions allow structured questions viarequest_user_inputwhen the tool is available for the turn; when disabled, missing, or if discovery fails, behavior stays fail-closed to the old “unavailable / will error” wording.User-facing docs note there is no separate T3 setting—restart and a fresh thread after toggling the flag in Codex.
Reviewed by Cursor Bugbot for commit 81fedeab3aa1681219038cfe73f57d4f1928dc6a. Bugbot is set up for automated code reviews on this repo. Configure here.
[!NOTE]
Respect Codex
default_mode_request_user_inputexperimental feature flag in session runtime
- Adds
detectCodexDefaultModeRequestUserInputin CodexSessionRuntime.ts, which pages throughexperimentalFeature/listRPC calls after opening a provider thread to detect whether Codex has enabled the feature.- When the feature is detected,
buildTurnStartParamspassesdefaultModeRequestUserInputEnabled: truethrough tobuildCodexDeveloperInstructions, switching to a new instruction variant that permits and guides use of therequest_user_inputtool.- Adds the new
CODEX_DEFAULT_MODE_USER_INPUT_ENABLED_DEVELOPER_INSTRUCTIONSconstant in CodexDeveloperInstructions.ts with guidance to ask concise plain-text questions only when necessary and avoid multiple-choice questions.- Documents the behavior in providers-codex.md: no separate setting is needed; users should restart and open a fresh thread after toggling the flag in Codex.
- Behavioral Change: on session start the runtime now issues one or more
experimentalFeature/listRPCs; errors are caught, logged at debug level, and fall back tofalse.📊 Macroscope summarized 81fedea. 1 file reviewed, 0 issues evaluated, 0 issues filtered, 0 comments posted
🗂️ Filtered Issues
No issues evaluated.
[!IMPORTANT]
Review skipped
Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the
.coderabbit.yamlfile in this repository. To trigger a single review, invoke the@coderabbitai reviewcommand.⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID:
b67d9a8c-c0a9-4f6e-8fbf-2da9155196deYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
- [ ] 🔍 Trigger review
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
Approvability
Verdict: Needs human review
1 blocking correctness issue found. Two unresolved review comments identify a potential logic issue: when the request_user_input feature is enabled, the instructions still direct the model to ask plain-text questions instead of using the tool, which may defeat the purpose of the change.
You can customize Macroscope's approvability policy. Learn more.
[!NOTE] 🤖 GPT-5.6 Sol responding on behalf of Theo
I am closing this because #6432 has landed in main and makes default-mode instructions respect the available user-input tools. I checked the current implementation and did not find any remaining change from this PR that we still need to merge.
Thank you for putting this together. The closure is only because the work is now covered elsewhere, not because there was a problem with your contribution.