From 3925bd89face82ba2f919a0c4733e8d56c2c76d9 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 21 Aug 2026 18:13:35 -0700 Subject: [PATCH] refactor(codex): keep native effort config at owner --- extensions/codex/src/app-server/thread-requests.ts | 5 ----- extensions/codex/src/app-server/thread-supervision.ts | 9 +++++++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/extensions/codex/src/app-server/thread-requests.ts b/extensions/codex/src/app-server/thread-requests.ts index 14c3d927268b..a89b5b6ff2a3 100644 --- a/extensions/codex/src/app-server/thread-requests.ts +++ b/extensions/codex/src/app-server/thread-requests.ts @@ -164,7 +164,6 @@ export function buildThreadStartParams( environmentSelection?: CodexTurnEnvironmentParams[]; model?: string | null; modelProvider?: string | null; - reasoningEffort?: string | null; hostSystemAgentActive?: boolean; restrictedToolSurfaceInheritedMcpServerNames?: readonly string[]; shellEnvironment?: Readonly>; @@ -217,7 +216,6 @@ export function buildThreadStartParams( options.restrictedToolSurfaceInheritedMcpServerNames, shellEnvironment: options.shellEnvironment, disableLoginShell: options.disableLoginShell, - reasoningEffort: options.reasoningEffort, }), ...resolveCodexThreadEnvironmentSelection(options), developerInstructions: @@ -253,7 +251,6 @@ export function buildThreadResumeParams( restrictedToolSurfaceInheritedMcpServerNames?: readonly string[]; shellEnvironment?: Readonly>; disableLoginShell?: boolean; - reasoningEffort?: string | null; preserveNativeModel?: boolean; }, ): CodexThreadResumeParams { @@ -424,7 +421,6 @@ export function buildCodexRuntimeThreadConfigForRun( restrictedToolSurfaceInheritedMcpServerNames?: readonly string[]; shellEnvironment?: Readonly>; disableLoginShell?: boolean; - reasoningEffort?: string | null; } = {}, ): JsonObject { const ringZeroActive = @@ -486,7 +482,6 @@ export function buildCodexRuntimeThreadConfigForRun( params.authoredContextTokenCap === undefined ? undefined : { model_context_window: params.authoredContextTokenCap }, - options.reasoningEffort ? { model_reasoning_effort: options.reasoningEffort } : undefined, ) ?? baseConfig; const contextConfig = { ...runtimeConfig, diff --git a/extensions/codex/src/app-server/thread-supervision.ts b/extensions/codex/src/app-server/thread-supervision.ts index 775590199bc8..ee7823394560 100644 --- a/extensions/codex/src/app-server/thread-supervision.ts +++ b/extensions/codex/src/app-server/thread-supervision.ts @@ -13,6 +13,7 @@ import { import { CodexAppServerRpcError, type CodexAppServerClient } from "./client.js"; import type { CodexAppServerRuntimeOptions } from "./config.js"; import { buildCodexAppServerConnectionFingerprint } from "./plugin-app-cache-key.js"; +import { mergeCodexThreadConfigs } from "./plugin-thread-config.js"; import { attestCodexPluginThreadApps, discardUnattestedCodexPluginThread, @@ -176,7 +177,12 @@ export async function materializePendingSupervisionBranch( dynamicTools: params.dynamicTools, appServer: params.appServer, developerInstructions: params.developerInstructions, - config: params.config, + config: mergeCodexThreadConfigs( + params.config, + probeResponse.reasoningEffort + ? { model_reasoning_effort: probeResponse.reasoningEffort } + : undefined, + ), nativeCodeModeEnabled: params.nativeCodeModeEnabled, nativeProviderWebSearchSupport: params.nativeProviderWebSearchSupport, nativeCodeModeOnlyEnabled: params.nativeCodeModeOnlyEnabled, @@ -184,7 +190,6 @@ export async function materializePendingSupervisionBranch( environmentSelection: params.environmentSelection, model: nativeModel, modelProvider: nativeModelProvider, - reasoningEffort: probeResponse.reasoningEffort, hostSystemAgentActive: params.hostSystemAgentActive, restrictedToolSurfaceInheritedMcpServerNames: params.restrictedToolSurfaceInheritedMcpServerNames,