Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): keep the shared Codex app-server scope alive after a tool OOM kill #18329

Mergedonly21mil(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/18329/headmerged by juliusmarminge View on GitHub

Showing 4 changed files with 82 additions and 21 deletions (loading 1).

x
0 of 4 viewed, 4 left
1 addition and 0 deletionsapps/server/src/orchestration-v2/Adapters/CodexAdapterV2.tsModified
View file
@@ -1366,6 +1366,7 @@
name: "codex",
threadId: input.threadId,
env: input.env,
+ shared: true,
const spawnCommand = yield* resolveSpawnCommand(launch.command, launch.args, {
...(input.env === undefined ? {} : { env: input.env }),
61 additions and 4 deletionsapps/server/src/process/agentScope.test.tsModified
View file
@@ -4,13 +4,15 @@
import * as NodePath from "node:path";
​
import * as NodeServices from "@effect/platform-node/NodeServices";
-import { describe, expect, it } from "@effect/vitest";
+import { assert, describe, expect, it } from "@effect/vitest";
+import { AgentScope } from "@t3tools/shared/AgentScope";
import * as HostProcess from "@t3tools/shared/HostProcess";
import * as Effect from "effect/Effect";
import * as Layer from "effect/Layer";
-import { ChildProcessSpawner } from "effect/process";
+import { ChildProcess, ChildProcessSpawner } from "effect/process";
​
import * as ServerConfig from "../config.ts";
+import { makeCodexAppServerSpawnCommand } from "../orchestration-v2/Adapters/CodexAdapterV2.ts";
import * as ProcessRunner from "../processRunner.ts";
import {
agentSliceMemoryLimits,