From 3dcc8da0deccb0c5953e96b6e7975a9a445f9440 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Mon, 16 Nov 2026 05:19:14 +1100 Subject: [PATCH] fix(runs): find an unattended action's effect under the agent loop's key, which names the agent --- modules/runs/trail.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/modules/runs/trail.go b/modules/runs/trail.go index b5292e265..7880576e3 100644 --- a/modules/runs/trail.go +++ b/modules/runs/trail.go @@ -261,11 +261,15 @@ func stepKey(s store.Recorded) string { return s.RunID.String() + ":" + strconv. // toolKey is the idempotency key the agent loop gave the tool call a journal // step records. func toolKey(s store.Recorded) (string, bool) { + agent, ok := strings.CutPrefix(s.Name, "journal:agent:") + if !ok { + return "", false + } var je agentloop.Entry if err := json.Unmarshal(s.Output, &je); err != nil || je.Kind != agentloop.EntryTool { return "", false } - return s.RunID.String() + ":" + strconv.FormatInt(je.Position, 10), true + return s.RunID.String() + ":" + agent + ":" + strconv.FormatInt(je.Position, 10), true } // effectOf reads what an action's step recorded. A tool call's journal entry