The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
fix(opencode): release arguments of failed tools (#843)
Rudy Mizrahi Celeklif70325d5845b
diff --git a/cli/beacon/internal/endpoint/hooks/assets/opencode/beacon.ts b/cli/beacon/internal/endpoint/hooks/assets/opencode/beacon.tsindex f8bc8432..071b2932 100644--- a/cli/beacon/internal/endpoint/hooks/assets/opencode/beacon.ts+++ b/cli/beacon/internal/endpoint/hooks/assets/opencode/beacon.ts@@ -176,6 +176,8 @@ export const BeaconEndpointPlugin = async ({ project, directory, worktree, clienif (next.type === "tool") {const status = next.state?.statusif (status !== "completed" && status !== "error") return+ // A failed tool never reaches tool.execute.after, which is what releases its arguments.+ if (status === "error") activeCalls.delete(next.callID)if (status === "completed" && completedCalls.has(next.callID)) return} else if (next.type === "text" || next.type === "reasoning") {if (next.type === "text") {diff --git a/plugins/opencode-beacon/src/beacon.ts b/plugins/opencode-beacon/src/beacon.tsindex f8bc8432..071b2932 100644--- a/plugins/opencode-beacon/src/beacon.ts+++ b/plugins/opencode-beacon/src/beacon.ts@@ -176,6 +176,8 @@ export const BeaconEndpointPlugin = async ({ project, directory, worktree, clienif (next.type === "tool") {const status = next.state?.statusif (status !== "completed" && status !== "error") return+ // A failed tool never reaches tool.execute.after, which is what releases its arguments.+ if (status === "error") activeCalls.delete(next.callID)if (status === "completed" && completedCalls.has(next.callID)) return} else if (next.type === "text" || next.type === "reasoning") {if (next.type === "text") {