feat(chat): persist agent tool-chain across reload + nudge requester ack into My Chat (core#2636) #2637
Reference in New Issue
Block a user
Delete Branch "feat/2636-decision-visible-and-tooltrace-persist"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Resolves both user-reported gaps from the request/approval flow.
1. Tool-chain progress survives refresh. The live feed is ephemeral; the agent reply's
metadata.tool_tracewas stored on the a2a_receive row but chat-history never selected it. Now the message store readstool_traceand emits it on the agent ChatMessage; the canvas maps it totoolTraceand renders a collapsible "N tools used" chain under the agent bubble (ToolTraceChips). A reload re-shows the same steps.2. Decisions are no longer silent. Respond/notification rides a background A2A turn that never renders in My Chat — so the agent woke,
get_request'd, and ended its turn invisibly. The notification text now instructs the agent to acknowledge viasend_message_to_user(which DOES render) when the outcome changes what it owes the user. The canvas decision-chip half stays tracked in #2636.Tests: messagestore tool_trace carry + 5-col wire-order mock; ToolTraceChips collapse/expand/singular; full handlers + messagestore Go suites + canvas build + chat vitest all green.
Refs core#2636, #2614.
🤖 Generated with Claude Code
APPROVED on current head
3af3d3d121.Full SOP / 5-axis review:
messagestorenow selects and scanstool_trace, carries it only on the agentChatMessage, and the canvas history hook maps servertool_traceintotoolTraceso tool-chain progress survives reload. The notification copy also explicitly tells the requester agent when to usesend_message_to_user, addressing the My Chat visibility gap without changing request state semantics.tool_traceis omitted; existing chat-history pagination/order tests were updated and a focused agent-message trace test was added. Frontend component handles empty, singular, and expanded traces.Platform (Go),Canvas,E2E API Smoke,Handlers Postgres, secret scan). Governance/security contexts are expected to clear with review approval.