diff --git a/packages/opencode/src/index.ts b/packages/opencode/src/index.ts index 65515658862b..575e3f3771dc 100644 --- a/packages/opencode/src/index.ts +++ b/packages/opencode/src/index.ts @@ -45,6 +45,10 @@ process.on("uncaughtException", (e) => { }) }) +for (const sig of ["SIGHUP", "SIGTERM", "SIGPIPE"] as const) { + process.on(sig, () => process.exit(1)) +} + const cli = yargs(hideBin(process.argv)) .parserConfiguration({ "populate--": true }) .scriptName("opencode")