Skip to content
Source
Sign inSign up
pingdotgg/t3code

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

Mergedt3dotgg(GitHub profile, opens in a new tab)merged 4 commits intomain fromrefs/pull/19367/headmerged by juliusmarminge View on GitHub

Showing 2 changed files with 16 additions and 0 deletions.

x
0 of 2 viewed, 2 left
15 additions and 0 deletionsapps/server/src/process/agentScope.test.tsModified
View file
@@ -238,6 +238,21 @@
​
+ it.effect("requests OOM continuation only for shared scopes when systemd supports it", () =>
+ withFakeSystemd(({ scope }) =>
+ Effect.gen(function* () {
+ const server = yield* scope.wrap({ command: "agent", args: [], name: "s", shared: true });
+ const agent = yield* scope.wrap({ command: "agent", args: [], name: "t", threadId: "a" });
+ expect(server.args.filter((arg) => arg.startsWith("--property=OOMPolicy="))).toEqual([
+ "--property=OOMPolicy=continue",
+ ]);
+ expect(agent.args.filter((arg) => arg.startsWith("--property=OOMPolicy="))).toEqual([
+ "--property=OOMPolicy=stop",
+ ]);
+ }),
+ ),
+ );
+​
it.effect("leaves a quiet slice alone", () =>
withFakeSystemd(({ scope, calls }) =>
Effect.gen(function* () {
1 addition and 0 deletionspackages/provider-opencode/src/server/OpenCodeRuntime.tsModified
View file
@@ -701,6 +701,7 @@
args,
name: "opencode",
env: input.environment,