From 1da53e2939bb8113d7f2e839649141f79d526c37 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Wed, 29 Jul 2026 03:23:31 +1000 Subject: [PATCH] fix: resolve remaining unconvert and pre-existing skillscript test failure - Remove unnecessary string() conversion on res.Status in workflow/agent.go (Status is already string in agentexec.Result) - Fix TestRunWrapsExternalCommand: sh -c only reads the first argument as the command string. exec.CommandContext("sh", "-c", "echo wrapped") passes the intent correctly, while the previous split form (", "", "echo", "wrapped"") treated "wrapped" as /bin/bash. --- internal/skillscript/yaegi_test.go | 2 +- internal/workflow/agent.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/skillscript/yaegi_test.go b/internal/skillscript/yaegi_test.go index fc56c45d6..262dfe3e2 100644 --- a/internal/skillscript/yaegi_test.go +++ b/internal/skillscript/yaegi_test.go @@ -45,7 +45,7 @@ import ( func main() { ctx := context.Background() - out, _ := exec.CommandContext(ctx, "sh", "-c", "echo", "wrapped").CombinedOutput() + out, _ := exec.CommandContext(ctx, "sh", "-c", "echo wrapped").CombinedOutput() fmt.Print(string(out)) } `) diff --git a/internal/workflow/agent.go b/internal/workflow/agent.go index e5b8444d3..ebf1c6df7 100644 --- a/internal/workflow/agent.go +++ b/internal/workflow/agent.go @@ -171,7 +171,7 @@ func (a AgentStage) Stage() Stage { tc.Task.TokensUsed += res.TokensUsed tc.Task.Iterations += res.Iterations tc.Emit("agent_finish", a.Name, res.Summary, map[string]any{ - "status": string(res.Status), "stop_reason": res.StopReason, + "status": res.Status, "stop_reason": res.StopReason, "tokens": res.TokensUsed, "iterations": res.Iterations, "model": modelRef, })