From b53a95fd81a1f86fc0c9e67baea76eb0d72ca29f Mon Sep 17 00:00:00 2001 From: Kit Langton Date: Thu, 19 Mar 2026 16:23:07 -0400 Subject: [PATCH] log errors in catchCause instead of silently swallowing --- packages/opencode/src/command/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/command/index.ts b/packages/opencode/src/command/index.ts index 0dc36a91a1..3ef6974f09 100644 --- a/packages/opencode/src/command/index.ts +++ b/packages/opencode/src/command/index.ts @@ -9,8 +9,10 @@ import PROMPT_INITIALIZE from "./template/initialize.txt" import PROMPT_REVIEW from "./template/review.txt" import { MCP } from "../mcp" import { Skill } from "../skill" +import { Log } from "../util/log" export namespace Command { + const log = Log.create({ service: "command" }) export const Event = { Executed: BusEvent.define( "command.executed", @@ -155,7 +157,7 @@ export namespace Command { }) const loadFiber = yield* load().pipe( - Effect.catchCause(() => Effect.void), + Effect.catchCause((cause) => Effect.sync(() => log.error("init failed", { cause }))), Effect.forkScoped, )