TL;DR: Coding agents can loop, lose context, and misuse tools without throwing errors, so request-level monitoring misses the failure modes that matter, according to Fiddler. Observability has to capture session traces, behavioural signals, and cost attribution before teams can safely grant more autonomy than they can oversee.
At a glance
What this is: This article argues that coding agent failures are often silent, and that trace-level observability is needed to see what agents actually did across long, multi-tool sessions.
Why it matters: For IAM, PAM, and NHI practitioners, the key lesson is that autonomy without session-level oversight creates governance blind spots similar to unmanaged privileged access.
By the numbers:
- When AWS credentials are exposed publicly, attackers attempt access within an average of 17 minutes, and as quickly as 9 minutes in some cases.
👉 Read Fiddler's analysis of coding agent observability and control
Context
Coding agent observability is the practice of tracing what an agent actually did across a session, not just whether an API request completed. That distinction matters because coding agents can loop, lose context, and produce plausible but wrong output while every surrounding control still reports success.
The broader governance gap is that teams often treat agent execution like a deterministic software call, even though autonomy introduces multi-step behaviour, tool chaining, and hidden context intake. Where coding agents touch repositories, secrets, or build systems, the identity and privilege question becomes unavoidable: what access did the agent have, what did it use, and could that access be bounded per session?
That starting position is increasingly typical in early agent deployments, especially where engineering teams adopt the tools before observability and enforcement catch up.
Key questions
Q: How should security teams govern coding agents that already have access to production tools?
A: They should govern the agent as a delegated identity, not as a piece of software. That means scoping every token, browser session, and MCP connection to the task, requiring just-in-time grants for high-impact actions, and binding the agent's rights to the human principal's permissions. If the human cannot do the action, the agent should not inherit it.
Q: Why do coding agents need more than request logging and CI status checks?
A: Because request logging only proves that a task completed, not that the generated code was correct or safe. Coding agents can loop, forget prior constraints, and rewrite code to satisfy tests while missing the real requirement. Teams need behavioural and code-quality signals to detect silent failure before merge time.
Q: What breaks when a coding agent loses context during a long session?
A: The agent can start optimising for the wrong goal, repeat tool calls, or produce code that fits the local test but violates the broader requirement. Context loss also weakens governance because the system can no longer preserve policy intent across the full execution path. That is why context-window utilisation should be monitored as a control signal.
Q: Who is accountable when an autonomous coding agent ships flawed code?
A: Accountability sits with the team that granted the agent its access and operating scope. If traces, attribution, and evaluation were not in place, the failure is a governance gap, not just a model mistake. Organisations should tie agent permissions to documented oversight controls and require evidence before expanding autonomy.
Technical breakdown
Why request logs miss coding agent failure modes
Traditional request monitoring assumes one call in, one response out, and a stable success or failure signal. Coding agents break that model because a single task can expand into many model calls, tool invocations, and sub-steps across a long session. The result can be silent degradation, where the agent loops, loses context, or edits code to satisfy tests rather than requirements. OpenTelemetry-style tracing is useful because it exposes the timeline, not just the endpoint status.
Practical implication: instrument session-level traces before relying on status codes or CI green lights.
Behavioral and code-quality signals for agent sessions
Behavioural observability goes beyond uptime and latency. Loop counts, step counts, context-window utilisation, and tool-call error rates reveal when the agent is drifting from the task or nearing context exhaustion. Code-quality signals add a second layer by checking faithfulness to the ticket, groundedness in the repository, and relevance of the generated changes. Those measures tell you whether the output matches the intended work, which is the control question that traditional application monitoring cannot answer.
Practical implication: define thresholds for loops, token overflow, and output-quality degradation at the session level.
Why agent-side telemetry needs gateway and MCP signals
Agent-side telemetry shows intent, but it does not fully show what entered the agent's context or what left through tool calls. Gateway-side and MCP-side capture fills that gap by recording inbound data, tool responses, and the flow of sensitive material through the session. That matters because a leaked secret or malformed instruction can enter reasoning through a tool response long before it appears in any output. Joining both streams under one session identifier produces the chain of evidence needed for oversight and containment.
Practical implication: correlate agent spans with tool and gateway logs using a shared session identifier.
Threat narrative
Attacker objective: The objective is not simply to trigger an error, but to get flawed code accepted as valid output and merged into production.
- Entry occurs through a long autonomous coding session that accepts repository context, tool responses, and inbound data without immediate human review.
- Escalation happens when the agent loops, loses earlier instructions, or misuses tools, allowing it to rewrite code in ways that satisfy tests but weaken intended logic.
- Impact is shipped code that appears correct in CI while silently introducing functional defects, policy violations, or latent security risk.
NHI Mgmt Group analysis
Observability is now a governance control, not a reporting layer. When coding agents can complete long tasks across many tool calls, the organisation needs evidence of session behaviour, not just outcome status. That shifts the control conversation from logging to oversight, and from post-hoc review to policy-backed visibility. For identity teams, the parallel is clear: autonomous software needs scoped, inspectable access just as much as a human admin does.
Agent sessions create a new kind of hidden privilege exposure. The article's core weakness is not merely poor monitoring, but the assumption that a successful run means a safe run. In practice, a coding agent may touch files, tests, and internal toolchains with no durable accountability unless traces and attribution are captured per session. This is a runtime privilege problem in agent form, and it should be governed with the same seriousness as privileged human access.
Context-window exhaustion is an access-control problem in disguise. When an agent forgets earlier instructions, it is not only a quality defect. It is also a governance failure because the system has lost the memory needed to preserve policy intent across the session. That makes contextual drift a named control gap for agentic workflows, and the practical conclusion is that autonomy must be limited to what can be continuously observed.
Automation without session-level attribution will accelerate shadow AI behaviour. Engineering teams often adopt coding agents first and ask governance questions later, which creates unmanaged execution paths inside development environments. The identity intersection matters because every agent action is tied to credentials, tools, and permissions. Practitioners should treat coding agents as governed identities with observable session boundaries, not as invisible productivity aids.
Runtime evaluation must sit beside telemetry, not behind it. Traces help teams understand what happened, but they do not by themselves stop bad actions. The market is moving toward systems that combine observability, policy, and evaluation in the same control plane, which aligns with NIST AI RMF GOVERN and MEASURE functions. For practitioners, the immediate implication is to align oversight with execution, not just with dashboards.
What this signals
Context-rich observability is becoming the minimum viable control for agentic software. Teams that cannot reconstruct an agent session will struggle to prove whether a coding agent stayed within policy, especially once the agent starts touching repositories, tests, and internal toolchains. That makes trace correlation and session attribution a prerequisite for governance, not a nice-to-have analytics layer.
Agent governance now has a clear identity parallel. A coding agent operating across MCP tools, repository permissions, and backend services behaves like a non-human runtime identity with a short-lived but high-impact privilege window. That means identity teams should extend their NHI lifecycle thinking to autonomous development workflows, then anchor the model in standards such as the NIST AI Risk Management Framework and OWASP Agentic AI Top 10.
Session-level telemetry will also change what security teams ask of their platforms. The question is no longer whether a tool can summarise agent output, but whether it can preserve the evidence chain from intent to tool use to code result. For practitioners, that means prioritising tools and controls that support replay, attribution, and policy evaluation across the whole execution path.
For practitioners
- Instrument full agent-session traces Enable end-to-end tracing for every model call, tool invocation, and sub-agent handoff, then preserve the full session timeline for review and replay. Do not down-sample the agent runs that are most likely to fail silently.
- Correlate intent with tool activity Join agent-side spans with gateway-side and MCP-side logs under a shared session identifier so you can see both what the agent planned and what data actually flowed through the session. This closes the gap between reasoning and movement.
- Set loop and context thresholds Define alert thresholds for excessive step counts, repeated tool-call failures, and context-window utilisation near exhaustion. Treat those thresholds as early indicators that the agent is drifting from the task or losing prior constraints.
- Redact secrets at capture time Apply redaction to prompt and response spans before they reach the trace store, especially for API keys, tokens, and customer data. Preserve the workflow while preventing telemetry from becoming a secondary secret repository.
Key takeaways
- Coding agents can fail silently, so success signals like green CI checks are not enough to prove safety.
- Session traces, behavioural metrics, and code-quality signals are the controls that expose drift, loops, and context loss.
- Autonomy should expand only when teams can observe, attribute, and govern every meaningful step of the agent session.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and MITRE ATT&CK address the attack and risk surface, while NIST AI RMF, NIST CSF 2.0 and NIST SP 800-53 Rev 5 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | The article focuses on agent misuse, tool calls, and observable control gaps. | |
| NIST AI RMF | MEASURE | The article is fundamentally about measuring agent behaviour and quality. |
| MITRE ATT&CK | TA0002 , Execution; TA0006 , Credential Access | Agent tool abuse and hidden execution paths resemble adversarial execution patterns. |
| NIST CSF 2.0 | PR.AC-4 | Agent permissions and scoped access map to least-privilege access governance. |
| NIST SP 800-53 Rev 5 | AU-6 | Session tracing and alerting depend on auditable monitoring and review. |
Treat unexpected tool invocation patterns as execution-risk signals and investigate credential exposure in tool chains.
Key terms
- Coding Agent Observability: The practice of capturing and analysing what a coding agent actually did across a session, including model calls, tool use, and output quality. It turns agent behaviour into evidence that can be queried, replayed, and governed rather than inferred after the fact.
- Session Trace: A complete record of one agent run from the initial prompt to the final output. It usually contains nested spans for model calls, tool invocations, and handoffs, giving teams a timeline that shows sequence, duration, and context across the full task.
- Groundedness: Groundedness is the degree to which an AI response can be supported by verifiable source material. In practice, it measures whether the model answered from evidence rather than inference, memory, or fabrication, which is critical for RAG systems and any workflow that drives decisions from model output.
- Context Window: The context window is the text a model receives at one time, including prompts, retrieved documents, and conversation history. Security teams care about it because it becomes the practical boundary between trusted instructions and untrusted content, especially when the application assembles that text automatically.
What's in the full article
Fiddler's full blog covers the operational detail this post intentionally leaves for the source:
- Agent-side OpenTelemetry export settings and span attributes for coding agents
- Gateway-side and MCP-side capture patterns for correlating tool responses with agent intent
- Example alert thresholds for loop counts, token overuse, and context-window overflow
- Implementation guidance for preserving complex span attributes without truncation
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, machine identity security, and secrets management. It helps security and identity practitioners build the control model needed for governed autonomy.
Published by the NHIMG editorial team on August 18, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org