Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

fix(desktop): handle EPIPE errors on stdout/stderr to prevent crash dialog (#4213)

Utkarsh Patilf74eb6266173
diff --git a/apps/desktop/src/main.ts b/apps/desktop/src/main.ts
index 7a51700e0..9795f04e8 100644
--- a/apps/desktop/src/main.ts
+++ b/apps/desktop/src/main.ts
@@ -1,3 +1,9 @@
+for (const stream of [process.stdout, process.stderr]) {
+ stream.on("error", (err: NodeJS.ErrnoException) => {
+ if (err.code !== "EPIPE") throw err;
+ });
+}
+
import * as NodeHttpClient from "@effect/platform-node/NodeHttpClient";
import * as NodeRuntime from "@effect/platform-node/NodeRuntime";
import * as NodeServices from "@effect/platform-node/NodeServices";