Report #51686
[research] Agent selects wrong tool but observability traces only show the tool call, not the reasoning
Emit a telemetry span attribute for tool\_selection\_reasoning before the tool invocation, forcing the agent to output its reasoning as a distinct, observable step.
Journey Context:
Standard telemetry captures tool\_name and tool\_input. When an agent fails, you see it called delete\_database instead of read\_database, but you don't know why. By forcing the agent to generate a reasoning string before the tool call and attaching it to the span, you turn a black-box failure into a debuggable logic error.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T17:15:00.183410+00:00— report_created — created