From c070cdef28fe62169b4702b1017a73e7b115062f Mon Sep 17 00:00:00 2001 From: weishu Date: Tue, 19 May 2026 17:07:15 +0800 Subject: [PATCH] Fix probe failure --- cli/src/codex/codexRemoteLauncher.test.ts | 10 +++++++--- cli/src/codex/codexRemoteLauncher.ts | 3 +-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cli/src/codex/codexRemoteLauncher.test.ts b/cli/src/codex/codexRemoteLauncher.test.ts index fd3d3db3..7e703a3f 100644 --- a/cli/src/codex/codexRemoteLauncher.test.ts +++ b/cli/src/codex/codexRemoteLauncher.test.ts @@ -1103,18 +1103,22 @@ describe('codexRemoteLauncher', () => { ])); }); - it('shows unsupported message when goals feature cannot be enabled', async () => { + it('still attempts goal RPC when dynamic goals feature enablement is unsupported', async () => { harness.failSetFeatureEnablement = true; const { session, sessionEvents } = createSessionStub(['/goal improve benchmark coverage']); const exitReason = await codexRemoteLauncher(session as never); expect(exitReason).toBe('exit'); - expect(harness.goalSetCalls).toHaveLength(0); + expect(harness.goalSetCalls).toEqual([{ + threadId: 'thread-1', + objective: 'improve benchmark coverage', + status: 'active' + }]); expect(harness.startTurnParams).toHaveLength(0); expect(sessionEvents).toContainEqual({ type: 'message', - message: 'Codex goals are not supported by this Codex runtime. Upgrade Codex or enable features.goals.' + message: 'Goal active' }); }); diff --git a/cli/src/codex/codexRemoteLauncher.ts b/cli/src/codex/codexRemoteLauncher.ts index 581ace5f..005c7d0e 100644 --- a/cli/src/codex/codexRemoteLauncher.ts +++ b/cli/src/codex/codexRemoteLauncher.ts @@ -2308,8 +2308,7 @@ class CodexRemoteLauncher extends RemoteLauncherBase { await appServerClient.setExperimentalFeatureEnablement({ enablement: { goals: true } }); logger.debug('[Codex] goals feature enabled'); } catch (error) { - supportsGoals = false; - logger.debug(`[Codex] failed to enable goals feature: ${errorMessage(error)}`); + logger.debug(`[Codex] failed to enable goals feature: ${errorMessage(error)}; will rely on configured feature state`); } try { const response = await appServerClient.listCollaborationModes();