@devries-cameron20 / t3code Mirror · read-only / commits / ed2ca82d80
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Mirrored from https://github.com/Camo67/t3code.git

Synced Nov 22, 23:15 UTC

fix(opencode): a tool killed for memory no longer stops every OpenCode thread (#19367)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Julius Marminge <julius0216@outlook.com>

Theo Browne committed Oct 19, 2026 at 21:22 UTC ed2ca82d807ea32e7777d1d7774112948e3fc01f
2 files changed +16
apps/server/src/process/agentScope.test.ts
+15
@@ -238,6 +238,21 @@ describe("AgentScope service", () => {
238 ),
239 );
240
241 + it.effect("requests OOM continuation only for shared scopes when systemd supports it", () =>
242 + withFakeSystemd(({ scope }) =>
243 + Effect.gen(function* () {
244 + const server = yield* scope.wrap({ command: "agent", args: [], name: "s", shared: true });
245 + const agent = yield* scope.wrap({ command: "agent", args: [], name: "t", threadId: "a" });
246 + expect(server.args.filter((arg) => arg.startsWith("--property=OOMPolicy="))).toEqual([
247 + "--property=OOMPolicy=continue",
248 + ]);
249 + expect(agent.args.filter((arg) => arg.startsWith("--property=OOMPolicy="))).toEqual([
250 + "--property=OOMPolicy=stop",
251 + ]);
252 + }),
253 + ),
254 + );
255 +
256 it.effect("leaves a quiet slice alone", () =>
257 withFakeSystemd(({ scope, calls }) =>
258 Effect.gen(function* () {
packages/provider-opencode/src/server/OpenCodeRuntime.ts
+1
@@ -701,6 +701,7 @@ const makeOpenCodeRuntime = Effect.gen(function* () {
701 args,
702 name: "opencode",
703 env: input.environment,
704 + shared: true,
705 });
706 const spawnCommand = yield* resolveCommand(launch.command, launch.args, input.environment);
707 const serverPassword = resolveOpenCodeServerPassword({