fix: give a failed MCP tool call error status and a named reason #912
No reviewers
Labels
No labels
move-to-repo
coilyco-bridge-deploy
move-to-repo
coilyco-flight-deck-agent-compose
move-to-repo
coilyco-gaming-eco-app
move-to-repo
coilysiren-inbox
move-to-repo
unknown
🔒⚠️📦⚠️🔒 SANDBOXED 🔒⚠️📦⚠️🔒
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
c#
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-gaming/sirens-echo!912
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-873-mcp-tool-span-error"
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?
Gives a failed MCP tool call the span status every generic observability surface keys on, and a reason where there was none.
What changed
result.IsErrornow marks the span under a newsirens_echo.mcp.tool_reported_error, which fillserror.type,error.stage,error.outcome, and the status description.sirens_echo.mcp.tool_call_timed_outwhen the error wrapscontext.DeadlineExceeded,sirens_echo.mcp.tool_call_failedotherwise.mcp.The reason, and what it deliberately is not
The issue asks why a call failed. The tool's own failure text does not go on the span. A span here carries byte counts and identifiers and no bodies, which is the boundary
docs/sirens-echo-observability.mdstates, and the tool's text already reaches the model where it is acted on. So the recorded reason is the class: a tool reporting failure reads apart from a transport error, and a deadline reads apart from every other transport error.That last one is the third bullet. The 30.45s turn could not be confirmed as a 30s MCP timeout from telemetry; a deadline is now named rather than inferred from duration.
What this does not close
The missing child spans on
trace_id c64e75d46fb352930a248cfa374641af. Every span in that path is started and ended in-process, so a trace holding only its root points at export rather than instrumentation, and I have no evidence to distinguish those from source. Worth a separate issue if it recurs on a build carrying this change.Tests
tooloutcomespan_test.godrives a real tool round throughCompleteand reads the recorded span: a reporting tool carriescodes.Errorand the catalog type, a succeeding one carries neither, and the deadline classifier is asserted directly.just gatePASS.closes #873