From 2949981e4356547eb0e0fff5624bb58fedec191f Mon Sep 17 00:00:00 2001 From: Brydon DeWitt Date: Fri, 22 May 2026 23:48:03 -0400 Subject: [PATCH] fix(plugin): actually inject post-tool-use hook output into response runHook() return value was being discarded. The hook was called but its additionalContext was never appended to output.response, so reminders never appeared in the model's tool result. --- .agents/frameworks/opencode/plugin.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.agents/frameworks/opencode/plugin.ts b/.agents/frameworks/opencode/plugin.ts index fa73dd5..bba0cc6 100644 --- a/.agents/frameworks/opencode/plugin.ts +++ b/.agents/frameworks/opencode/plugin.ts @@ -280,7 +280,11 @@ export const AgentSupportPlugin: Plugin = async ({ $, directory }) => { tool_input: input.args ?? {}, tool_response: (output.response as string).slice(0, 500), // truncated for hook }); - await runHook("post-tool-use.sh", hookInput); + const postToolOutput = await runHook("post-tool-use.sh", hookInput); + const postToolContext = parseAdditionalContext(postToolOutput); + if (postToolContext) { + output.response = `${output.response}\n\n${postToolContext}`; + } } },