From 56ad2db02055955f926fda0e4a89055b22ead6f9 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Thu, 12 Feb 2026 09:54:47 -0500 Subject: [PATCH] core: expose tool arguments in shell hook for plugin visibility --- packages/opencode/src/session/prompt.ts | 3 +++ packages/plugin/src/index.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/opencode/src/session/prompt.ts b/packages/opencode/src/session/prompt.ts index 1d3d74509..99d44cd85 100644 --- a/packages/opencode/src/session/prompt.ts +++ b/packages/opencode/src/session/prompt.ts @@ -454,6 +454,7 @@ export namespace SessionPrompt { tool: "task", sessionID, callID: part.id, + args: taskArgs, }, result, ) @@ -805,6 +806,7 @@ export namespace SessionPrompt { tool: item.id, sessionID: ctx.sessionID, callID: ctx.callID, + args, }, result, ) @@ -850,6 +852,7 @@ export namespace SessionPrompt { tool: key, sessionID: ctx.sessionID, callID: opts.toolCallId, + args, }, result, ) diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts index 4cc84a5f3..664f2c967 100644 --- a/packages/plugin/src/index.ts +++ b/packages/plugin/src/index.ts @@ -187,7 +187,7 @@ export interface Hooks { ) => Promise "shell.env"?: (input: { cwd: string }, output: { env: Record }) => Promise "tool.execute.after"?: ( - input: { tool: string; sessionID: string; callID: string }, + input: { tool: string; sessionID: string; callID: string; args: any }, output: { title: string output: string