From 55895d0663671759161092adef463414ec98237c Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Sat, 28 Mar 2026 22:15:41 -0500 Subject: [PATCH] core: fix plugin hooks to properly handle async operations ensuring plugins can execute async code without errors (#19586) --- packages/opencode/src/plugin/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/opencode/src/plugin/index.ts b/packages/opencode/src/plugin/index.ts index 9698487f91..a945b4b98a 100644 --- a/packages/opencode/src/plugin/index.ts +++ b/packages/opencode/src/plugin/index.ts @@ -292,7 +292,7 @@ export namespace Plugin { for (const hook of state.hooks) { const fn = hook[name] as any if (!fn) continue - yield* Effect.promise(() => fn(input, output)) + yield* Effect.promise(async () => fn(input, output)) } return output })