Report #59077
[research] Agent logs show what actions were taken but not why, making root cause analysis impossible
At every agent step, log both the reasoning/intent \(the chain-of-thought, tool-selection rationale, or planning output\) and the action taken \(tool call \+ result\). Structure these as paired fields in trace spans: 'intent' and 'action'. When an agent fails, the intent tells you whether the failure was in reasoning \(wrong plan\) or execution \(right plan, wrong implementation\).
Journey Context:
Most agent observability captures the 'what' \(tool called, output received\) but not the 'why' \(why did the agent choose this tool? what was it trying to achieve?\). When an agent goes off the rails, you need the intent to diagnose root cause. Without it, you see that the agent called the wrong API, but you can't tell if it misunderstood the task or just selected the wrong tool for a correct understanding. The ReAct pattern explicitly surfaces reasoning traces, which is why ReAct-style agents are significantly easier to debug and eval than black-box agents. The tradeoff is that logging reasoning adds to trace size and may contain sensitive user data — apply PII scrubbing and set retention policies. But without intent logging, you're doing forensics without evidence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T05:39:04.168395+00:00— report_created — created