Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

fix(#6174): main already words a spawn EAGAIN as no room to start a program; drop the unreachable branch and match its tests

milind-soni360ad0709925
diff --git a/server/cli-probe.test.ts b/server/cli-probe.test.ts
index d0e824f47f..dfb64c29bd 100644
--- a/server/cli-probe.test.ts
+++ b/server/cli-probe.test.ts
@@ -25,6 +25,6 @@ it("offers the install steps for a CLI that is missing, without the server-only
it("offers no install for a CLI that could not start because the machine is out of processes", async () => {
const result = await testCliBinary(FULL_PROCESS_TABLE_CLI, OpenCodeDriver);
expect(result.ok).toBe(false);
- expect(result.message).toContain("limit of running processes");
+ expect(result.message).toContain("There is no room to start another program (EAGAIN)");
expect(result).not.toHaveProperty("install");
});
diff --git a/server/procs.test.ts b/server/procs.test.ts
index 0e6f8fdf95..f01ef6b496 100644
--- a/server/procs.test.ts
+++ b/server/procs.test.ts
@@ -52,16 +52,6 @@ describe("Windows CLI argument safety", () => {
});
});
-describe("spawn EAGAIN", () => {
- it("says the machine ran out of processes instead of the raw errno", () => {
- const error = Object.assign(new Error("spawn claude EAGAIN"), { code: "EAGAIN" });
- expect(describeSpawnFailure(error, "claude")).toEqual({
- message: "`claude` couldn't start: this machine has reached its limit of running processes. Run fewer bots at once, or restart the server if this continues",
- setup: false,
- });
- });
-});
-
describe("spawn ENOENT", () => {
const enoent = () => Object.assign(new Error("spawn codex ENOENT"), { code: "ENOENT" });
diff --git a/server/procs.ts b/server/procs.ts
index 4f10fd1895..45dab9c20b 100644
--- a/server/procs.ts
+++ b/server/procs.ts
@@ -473,8 +473,6 @@ export function describeSpawnFailure(err: NodeJS.ErrnoException, cli: string, cw
}
if (err.code === "EACCES" || err.code === "EPERM")
return { message: `\`${cli}\` isn't executable — check its file permissions`, setup: true };
- if (err.code === "EAGAIN")
- return { message: `\`${cli}\` couldn't start: this machine has reached its limit of running processes. Run fewer bots at once, or restart the server if this continues`, setup: false };
if (err.code === "ENAMETOOLONG")
return {
message: `\`${cli}\` received too much launch data for Windows; update this provider or pass its prompt through stdin/a file`,