TL;DR: Platform's $720 weekly bill included $208 from failed-call retries, abandoned sessions, and idle activity, while a separate view linked $408 in estimated savings to four pending changes, according to Codenotary. The real governance problem is not raw usage but whether teams can connect cost, identity, and workflow outcomes well enough to change behaviour.
At a glance
What this is: This is an analysis of session-level agent cost visibility, with the key finding that spend only becomes actionable when teams can tie retries, idle time, and workflow outcomes back to specific usage patterns.
Why it matters: It matters because IAM and NHI teams increasingly need to govern AI agents as operational identities, where cost leakage often signals weak authentication, overuse, or poor task scoping rather than mere budget drift.
By the numbers:
- The Platform team spent $720 on agents in one week, against a budget of $650.
- $208 went to failed-call retries, abandoned sessions, and idle activity.
- That is 29% of the team's weekly spend.
- The company view covers total weekly spending of $1,880 and four decisions with estimated savings of $408 per week.
Context
Agent cost management is becoming a governance problem, not just a finance problem. When an environment records spend by session outcome, teams can see whether money is going to productive work, retry loops, idle time, or unproductive exploration.
For AI systems that act as delegated identities, cost visibility is also an access signal. If the same session patterns keep generating retries or idle activity, the issue may sit in authentication, authorisation, or workflow design rather than in model choice alone.
Key questions
Q: How should teams govern agent spend when sessions can retry or stay idle for long periods?
A: Treat spend as a governance signal, not just a finance metric. Teams should break usage into session outcomes such as completed work, retries, abandoned sessions, and idle time, then tie each pattern to the control that caused it. That lets you decide whether the fix is authentication, workflow design, timeout policy, or task scoping.
Q: Why do repeated retries matter in AI agent cost management?
A: Repeated retries usually mean the agent is failing to complete work because of access friction, unstable integrations, or missing context. That creates cost without delivery and often exposes a deeper control weakness. If retries are common, the issue is usually not the model alone but the surrounding authorisation and workflow design.
Q: What should security teams do first when agent costs rise unexpectedly?
A: Start with the session evidence before changing budgets or models. Identify whether the increase came from retries, idle activity, longer sessions, or more users, then test the most likely control failure. If retries dominate, authentication and connector stability deserve attention before broader optimisation work.
Q: How do you know whether an agent cost optimisation actually worked?
A: Compare the same session and cost views before and after the change. A good fix should reduce the specific waste pattern it targeted, such as retries, idle time, or repeated reading, while leaving productive work intact. If the savings do not appear in later data, the proposed control change did not solve the underlying issue.
Technical breakdown
Why session-level cost attribution matters
Agent cost attribution works when each session is linked to an outcome such as a shipped change, a retry loop, or idle time. That turns spend into a behavioural signal rather than a flat usage total. In practice, this is closer to operational telemetry than accounting: it tells you which interactions created value and which ones consumed resources without useful output. For AI agents, the control value is in separating productive work from wasted execution, especially when multiple retries or long-lived sessions hide the real driver of cost. See the AI Agent Observability, Audit and Incident Response Guide.
Practical implication: Use session-level attribution to distinguish productive agent use from waste before changing budgets or policies.
How retry loops and idle sessions inflate agent spend
Retry loops often mean the agent could not complete a task because of authentication failures, unstable integrations, or missing context. Idle sessions usually mean the system remained open after useful work stopped, which turns elapsed time into cost without delivery. These patterns matter because they are often symptoms of governance issues, not just technical inefficiency. A repeated failure to complete a task can indicate brittle permissions, over-fragmented workflows, or poor tool access design that keeps forcing the same action again and again. See the AI Agent Authorisation Guide.
Practical implication: Treat repeated retries and idle time as control signals that something in the access or workflow design is misfiring.
Why projected savings need to be tied to implementation effort
A savings estimate is only useful if it is paired with the work needed to achieve it and the control change that creates it. The article shows that some fixes have short payback and others require engineering time, security review, or policy adjustment. That is important because cost optimisation in agent environments can create hidden risk if teams chase savings without checking what access or behaviour changes they are introducing. Governance has to compare expected savings with the operational and security cost of the change itself. See the AI Agent Identity Security Buyer's Guide.
Practical implication: Review savings proposals as control changes, not just cost cuts, and verify the implementation burden before approval.
NHI Mgmt Group analysis
Cost telemetry is becoming an identity governance signal for agentic systems. When a platform can attribute spend to session outcomes, it gives security and platform teams a way to see whether an agent is behaving like a governed identity or like an uncontrolled consumer of resources. That matters because repeated retries, abandoned sessions, and idle time often point to access, authentication, or workflow design issues. The practical conclusion is that cost management and identity governance now overlap in the same control plane.
Retry-heavy sessions are a governance failure mode, not just a cloud efficiency issue. The article's budget overrun is not mainly about model price. It is about a system repeatedly paying for the same failed action, which suggests weak integration control or brittle credentialed access. For AI operations, this is a specific form of control debt: the environment keeps funding failure until someone changes the session design.
Session wastage should be treated as a named operational risk: agent cost leakage. This is the pattern where an agent consumes budget through retries, idle sessions, or repetitive work that never reaches a useful outcome. The concept matters because it is measurable, recurring, and often fixable through governance rather than model tuning alone. Teams should treat it as a standing programme metric, not an occasional variance.
Agent budgeting and access governance are converging. The most useful part of the dashboard is not the total spend, but the link between spend, session outcome, and change approval. That makes the control discussion more concrete: if a team cannot explain why a session exists, it cannot confidently govern what that session is allowed to do. Practitioner implication: bring finance, platform, and identity owners into the same review loop.
What this signals
Agent cost leakage: the more useful governance question is no longer how much an agent costs in aggregate, but which session patterns are burning spend without producing work. When retries and idle time dominate, the control problem is usually upstream of the model itself and sits in authentication, workflow design, or task boundaries.
A cost dashboard becomes materially more useful when it can distinguish productive exploration from wasteful repetition. That distinction helps teams avoid misclassifying investigation work as inefficiency while still exposing the operational patterns that deserve policy change.
For programme owners, the practical next step is to treat cost data as a decision signal alongside access and usage telemetry. That allows finance, platform, and identity stakeholders to review the same evidence before approving timeout, token, or retry-limit changes.
For practitioners
- Instrument session-level cost by outcome Track retries, abandoned sessions, idle periods, and successful task completion in the same view so cost can be tied to behaviour rather than volume alone.
- Separate authentication failures from model inefficiency Investigate repeated retries first when cost rises, because connection problems and access friction can dominate any savings from model mix or caching.
- Require approval for cost-saving changes with security impact Treat service tokens, retry limits, and session timeout changes as governance decisions that need both savings estimates and security review.
- Set a review loop for realised savings Recheck post-change cost and session data after rollout so the team can verify that the proposed savings actually appear in subsequent runs.
Key takeaways
- Agent spend becomes actionable only when teams can separate productive sessions from retries, idle time, and repeated work.
- The article links a weekly overrun to specific behavioural patterns, which is the kind of evidence needed for meaningful governance.
- The most useful response is to change the session and access controls that create waste, then verify the effect in later cost data.
Related NHI Mgmt Group resources: AI Agent Observability, Audit and Incident Response Guide · AI Agent Authorisation Guide · AI Agent Identity Security Buyer's Guide
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 CSA MAESTRO address the attack and risk surface, while NIST AI RMF and NIST CSF 2.0 set the governance and control requirements practitioners need to meet.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | Agent sessions and retries expose how identity and privilege design affects cost and control. |
| Recommendation — Review agent sessions for identity and privilege scope that drives unnecessary retries or idle execution. | ||
| NIST AI RMF | MANAGE — AI risk management | The article focuses on operationalising AI controls through measurable session and cost governance. |
| Recommendation — Manage AI system cost and behaviour as part of ongoing risk controls, not as a one-time optimisation. | ||
| NIST CSF 2.0 | PR.AA-05 — Access Permissions, Entitlements and Authorizations | Retry costs and token usage point to authorisation and entitlement design as a control issue. |
| Recommendation — Align agent permissions and entitlements to the minimum needed for each task and review them regularly. | ||
| CSA MAESTRO | Identity and Access Governance | Agent cost patterns reflect how identity and access decisions shape AI system behaviour. |
| Recommendation — Use MAESTRO to govern agent identity, access, and runtime behaviour as a single control problem. | ||
Key terms
- Agent Cost Leakage: Unnecessary spend created when an agent repeatedly retries, stays idle, or performs work that does not produce useful output. It is a governance issue as much as a finance issue because the waste usually reflects weaknesses in access design, workflow structure, or task boundaries rather than simple model pricing.
- Session Outcome Attribution: The practice of linking a session's cost to what it actually produced, such as a completed change, a retry loop, or an abandoned task. This gives teams a control view of agent behaviour and lets them distinguish productive usage from operational waste.
- Retry Loop Behaviour: A pattern where an automated system repeats failed actions until a step succeeds or the workflow is exhausted. In attacker tooling, retry loops can turn a partially successful intrusion into a completed ransomware event by persisting through errors that would stop a human operator.
- Idle Session: A session that remains open while no useful work is being done, creating cost without delivery. Idle sessions often indicate missing timeout policy, poor session closure, or workflows that allow activity to continue after the practical task has ended.
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, workload identity, and secrets management. It helps practitioners connect operational identity controls to the broader security and governance decisions their programmes need.
Published by the NHIMG editorial team on October 22, 2026.
NHI Mgmt Group, the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org