Skip to content

Commit 5e90d1e

Browse files
fix(server): Codex closes settled threads and their MCP servers right away
T3 sends thread/unsubscribe only when it unloads a Codex thread, but Codex kept the unsubscribed thread, and its stdio MCP servers, loaded for its own thread_unload_delay_secs (30 minutes by default). Start the app-server with -c thread_unload_delay_secs=0 ahead of the user's launch args, so a user's own value still wins. Fixes #33747 AI-assisted; verified with the tests and tools listed above. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a681e96 commit 5e90d1e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎apps/server/src/provider/codexLaunchArgs.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,11 @@ export const resolveCodexLaunchArgs = (
99

1010
const codexLaunchArgv = (launchArgs?: string): ReadonlyArray<string> => tokenizeCliArgs(launchArgs);
1111

12+
// T3 unsubscribes only when it unloads a thread; Codex's own unload delay would stack on that.
1213
export const codexAppServerArgs = (launchArgs?: string) => [
1314
"app-server",
15+
"-c",
16+
"thread_unload_delay_secs=0",
1417
...codexLaunchArgv(launchArgs),
1518
];
1619

0 commit comments

Comments
 (0)