What APM Span Models Structurally Cannot Represent That Agent Trace Schemas Must
Agent execution graphs need intent, decision basis.

To detect silent failures in AI agents in production, traces must link actions to intent, decision basis, token use, and authority across a non-linear execution graph. APM span models record work and duration, but successful spans do not establish that an agent reached the right outcome. An agent-native schema must represent those missing relationships so that wrong answers and unsafe actions can be distinguished from successful execution.
Why APM span models were built for a world agents do not inhabit
APM’s core abstraction is a named, timed unit of work with a parent-child relationship. Those relationships produce a tree, which gives the flame graph its structure and supports attribution to code paths. The underlying premise is a predictable request-response flow whose possible branches can be enumerated in advance. Timing and status then show where that execution slowed or failed.
An agent does not follow the same premise. The same input can produce a different chain of tool calls because the LLM chooses its next action at runtime. AgentPProf identifies a deeper mismatch than unpredictability alone, since prompts, tool calls, and system effects do not form the runtime call-stack hierarchy that function execution produces. Hierarchical attribution therefore lacks its usual foundation. These structural limits require changes to the abstraction itself, beyond configuration adjustments, so retaining the span tree as the complete execution model cannot resolve them.
How the span tree’s shape breaks on non-linear agent execution graphs
In a parent-child tree, each child has one parent. That constraint becomes a problem when the relationships needed to explain an agent’s execution extend beyond nested work. A tree can show branching, but turning a general directed graph into that tree loses some of its relationships. Parallel sub-agents, repeated visits to action states, and cross-agent handoffs need more than a series of nested calls to show how they relate. A waterfall can show activity while leaving its causal connections unclear.
An asynchronous delegation exposes the distinction between recording work and representing its relationship to other work. When Agent A delegates to Agent B over a message queue, propagation of the traceparent header preserves the connection to the originating trace. Without that connection, the receiving agent shows up in a separate trace with no link to the first. Both executions may still have records. The missing property is their linkage, and preserving a shared trace identity is necessary without being sufficient to express the full delegation graph.
TraceGraph takes a different starting point by building a graph over observable action–observation states from pooled rollouts before introducing model identity. It then overlays outcome-informed productive cores and trap regions. AgentPProf addresses attribution through an operation stack that can group activity by task category, execution phase, session, or action type independently of runtime nesting. A loop-related failure or a failed handoff becomes interpretable only when the schema preserves the relationship that explains it.
How do you know when an AI agent gives wrong answers instead of crashing?
A successful tool call establishes only that an operation completed. When a Salesforce API call returns 200 OK, its status and timing alone cannot show whether it made a correct subscription-tier update or an update with a hallucinated custom field. Both can look operationally successful in the span record. Without a representation of what the agent was trying to accomplish, monitoring has no basis for identifying that divergence.
AgentTrace identifies insufficient transparency into reasoning, state changes, and environmental interactions as a limitation of methods such as proxy-level input filtering and model glassboxing. That same gap explains why operational telemetry alone cannot establish agent correctness. A record of the call does not supply the intended state change against which to judge it. An intent field gives the execution a semantic reference point. Detecting a silent failure still requires comparing behavior with that purpose rather than treating the absence of an error as evidence of success.
AgentPProf attributes resources to task intent and workflow phase. A code path explains where work ran. It does not necessarily explain which task the work was meant to advance. An agent-native schema therefore needs intent as a primitive.
What spans omit about the basis on which an agent made each decision
Intent explains the goal, while decision basis explains the information used to choose an action. Those are separate properties of an execution. Even when the intended outcome is known, a debugger needs the context, retrieved facts, and policy available at the relevant step. Without those records, a failed run may not show whether the agent misread retrieved context, ignored a policy constraint, or acted on stale memory.
The Decision Evidence Maturity Model, or DEMM, names the mistaken equation of trace presence with audit sufficiency the “container fallacy”. Its academic contribution is a property-level test of whether evidence answers a particular governance question. The framework defines eight properties that must be reconstructable, namely actor, authority, action, policy, decision basis, resource touch, lifecycle context, and verification strength. Standard APM spans do not make policy basis, decision basis, or verification strength required parts of their representation.
DEMM-Bench demonstrates the consequence within its benchmark cases, where trace-present and schema-present baselines overclaim on the majority of governance questions. The evidence exists, but it does not necessarily establish the requested property. The Replit/SaaStr incident in July 2025 and the Claude Code/DataTalks.Club incident in February 2026 provide operational anchors for that distinction. In each, traces document destructive action, but no single record answers under what authority the mutation was authorised. Recording an action and reconstructing its justification are different evidentiary tasks.
For root-cause analysis, the same distinction applies at a shorter time horizon. Timing can show which step was slow, and status can show where an explicit execution error occurred. Neither shows which retrieved fact or policy led to a wrong choice. Decision-basis fields must be tied to each step so that the evidence used there can be reconstructed. A run-level statement of purpose cannot substitute for the basis of each decision within it.
Token economics as a resource dimension spans were never designed to track
APM’s conventional resource model centres on duration and infrastructure cost, leaving token consumption outside its scope. That leaves a separate form of pathological execution outside its normal view. A slow API call has a latency signature, while an LLM call that places an entire database schema into context consumes tokens even if it completes promptly. Without token accounting, the trace cannot explain that expense in terms of the agent’s work.
AgentPProf tracks how many tokens were used in semantic stack frames such as task, skill, phase, and action, making it possible to identify which workflow phases consume budget. Its flame graph can use operation count, token count, or execution time as the width dimension. The visual form is not the limiting factor. The semantic operation stack beneath it supplies an attribution structure that the runtime call stack does not provide.
Token accounting also has a direct connection to correctness. With context window decay, a safety instruction is silently dropped when context gets too full, so a token-budget failure becomes a semantic failure. The span can still report successful execution. A schema without token-aware fields cannot show when context grows out of control or which task category used the tokens. It also lacks the basis for distinguishing an operation that is appropriately expensive from one whose context use has become pathological.
This is more than a request to place a token total beside duration. Agent-native resource accounting must connect tokens to intent and workflow phase so that context growth can be examined as execution behavior alongside its cost and reliability implications.
How authority and permission provenance fall entirely outside the span schema
Authority is distinct from both intent and decision basis. An agent can work toward the requested goal using evidence that bears on it and still act outside its permission scope. A canonical APM span schema does not include the permission envelope under which a tool call executed. It records the call and its result, leaving unresolved whether permission was inherited, escalated, or narrowed. That record also fails to show whether the required approval came before the action.
DEMM treats authority as one of its required decision-evidence properties. Its fixture analysis finds that authority has one of the highest structural unfillability rates among the properties, though the paper says this finding applies only to its worked-example anchors and makes no such claim for production trace regimes generally. That qualification is important to the evidence. DEMM-Bench provides a separate bounded result across its 64 cases, where ledger-present baselines overclaim on half of all cases. The existence of a ledger does not establish that a specific authority question can be answered.
An execution incident was observable and still catastrophic, illustrating the distinction between observable execution and governable execution. Visibility into activity did not, by itself, provide control over the authority under which that activity occurred. This is the boundary that timing, status, and call relationships cannot cross on their own. A trace of what happened is not proof that the action was permitted.
The Replit/SaaStr incident’s destructive action was documented, yet no single record answered who had authority to permit the mutation. More detail about execution duration would not resolve that omission. The required evidence concerns permission scope, its provenance, and any approval that should have preceded the call. Those properties must be reconstructable at the action level rather than inferred from the fact that execution was possible.
An authority-provenance record would make those questions addressable, but recording permission is not itself an enforcement mechanism. The distinction prevents another version of the container fallacy. Governability requires more than visibility, and evidence of authority requires more than a successful tool response. The schema’s role is to preserve the permission relationship clearly enough to assess it.
Why these gaps cannot be patched onto span trees and what an agent-native schema must include instead
Adding attributes to a span can store more information, but it does not change a single-parent tree into a graph or establish evidence sufficiency. The obstacle is the underlying model. A schema that treats topology, intent, decision basis, tokens, and authority as optional annotations still depends on relationships and meanings defined elsewhere. Once those properties become explicit, linked, and reconstructable, the design has moved beyond request tracing. Span-like records can still be part of the design even when they no longer serve as its governing abstraction.
For topology, the required model is a directed graph with explicit handoff records linking the delegating agent, receiving agent, and payload. The same trace ID must pass across that handoff to keep the executions connected. TraceGraph demonstrates the graph-native direction. Within that graph, a typed taxonomy must distinguish tool calls, reasoning steps, state transitions, and memory operations so that each failure surface has an identifiable record. To do this, AgentTrace links operational, cognitive, and contextual traces under one unified envelope.
For decision evidence, each step needs reconstructable context, retrieved facts, and policy. DEMM’s eight-property Decision Event Schema specifies the properties against which sufficiency can be assessed. Resource fields must then link token counts to task intent categories as well as track wall-clock duration. AgentPProf’s semantic operation stack demonstrates how that attribution can work across trajectories. Together, these structures connect the agent’s goal to the evidence and resources used in pursuing it.
For authority, every tool call needs an explicit permission-envelope record that states its scope, inheritance chain, and the approval events that came before it. That record must hold enough authorisation data to reconstruct the answer to the particular permission question. This is also the practical test for the whole schema. Silent failure detection depends on evidence that distinguishes correct behavior from a wrong but successfully executed action. A trace that cannot support that distinction measures execution alone.
Sources
- AgentPProf: Semantic Profiler for Long Horizon AI Agents
- Decision Evidence Maturity Model for Agentic AI: A Property-Level Method Specification
- TraceGraph: Shared Decision Landscapes for Diagnosing and Improving Agent Trajectories
- DEMM-Bench: A Cross-Regime Benchmark for Agent-Runtime Governance-Evidence Sufficiency
- AgentTrace: A Structured Logging Framework for Agent System Observability


