TL;DR: Developers using Claude Code are independently rebuilding governance layers for context retention, constraint enforcement, verification, and multi-agent orchestration, according to Obot, because the platform does not supply those primitives natively. The result is agent governance debt, where productivity gains are offset by bespoke controls, hidden supervision costs, and fragile operational workarounds.
At a glance
What this is: The article argues that Claude Code users are converging on the same manual governance patterns because AI agent platforms still lack built-in coordination, memory, and verification controls.
Why it matters: This matters because AI agent governance now intersects with IAM, secrets, auditability, and privilege boundaries, so identity teams need to understand where agent behaviour becomes an access-control problem.
By the numbers:
- Only 44% of developers are reported to follow security best practices for secrets management, exposing a significant developer behaviour gap.
👉 Read Obot's analysis of AI agent governance debt in Claude Code workflows
Context
Claude Code is an AI coding agent, and the article’s core finding is that teams are inventing the same governance workarounds because the agent architecture does not yet provide durable session memory, enforced constraints, or native auditability. In practice, that turns agent use into an identity and access problem as much as a productivity problem, because each workaround is really a control layer around what the agent can see, do, and retain.
The pattern is familiar to identity and security teams: when the platform does not express policy clearly, practitioners push policy into documents, scripts, and human process. Here, those documents are CLAUDE.md files, state bridges, and role protocols, which means the governance boundary sits outside the platform and depends on local discipline. That is typical of early agent deployments, but it is not a stable operating model for production use.
Key questions
Q: How should security teams govern AI agents that can invoke multiple tools in one session?
A: Security teams should govern AI agents as decision-making identities, not just tool users. That means defining tool access, context scope, and escalation limits together, then monitoring the full execution chain for unexpected combinations of actions. If those controls are split across teams or policies, the agent can move faster than review cycles and create impact before anyone intervenes.
Q: Why do AI coding agents create access and governance risk even when they are not autonomous?
A: Because they already operate with tool access, repository access, and execution permissions inside a live workflow. That means the risk comes from delegated authority, not just independence. Even partially supervised agents can still manipulate sensitive code, secrets, or deployment paths if their permissions and review boundaries are loose.
Q: What breaks when teams rely on handwritten prompts and local files to govern AI agents?
A: The control model becomes brittle, because policy depends on individual habits instead of enforced system design. Once the developer who wrote the file leaves or the workflow changes, the organisation inherits undocumented behaviour. That creates audit gaps, inconsistent access decisions, and drift between intended and actual agent behaviour.
Q: How do organisations decide whether agent governance should sit in process or in platform controls?
A: If the control is important enough to affect access, audit, or production behaviour, it belongs in the platform or an enforced workflow layer, not only in process. Process can support governance, but it should not be the only control. The more privileged the agent, the less acceptable manual-only enforcement becomes.
Technical breakdown
Why context loss creates governance drift in AI coding agents
AI coding agents like Claude Code operate in sessions, and each session can begin without durable memory of prior architectural decisions, constraints, or rejected approaches. Developers therefore recreate context in files such as CLAUDE.md or scratchpad notes so the agent can behave consistently. That is not just convenience. It is a governance control compensating for a missing state layer. Without it, the agent optimizes for immediate task completion and can drift from the intended design, especially when projects span many tool calls or multiple days of work.
Practical implication: teams need explicit session-context standards and ownership, not ad hoc notes that vanish when the repository changes.
How parallel agents expose the need for orchestration and isolation
Once multiple agents work on the same codebase, the problem shifts from single-session memory to coordination. Git worktrees, numbered step-result protocols, and JSON state files are all attempts to prevent state collisions, conflicting edits, and ambiguous handoffs between agents. In security terms, this is orchestration with enforced separation of duties. The important point is that the control is external to the model: the model is not deciding when a task is safe to continue, the surrounding workflow is doing that job.
Practical implication: treat multi-agent workflows like a governed production process, with isolation boundaries and explicit handoff rules.
Why verification remains the limiting control for agent output
The most expensive failure mode is not that an agent is slow or verbose. It is that it produces plausible but wrong output that looks ready for use. That shifts the burden to human review, especially where code, configuration, or security-sensitive changes are involved. Verification therefore becomes a control in its own right, not a final courtesy check. If the organisation cannot independently validate the output, the agent has effectively expanded the review surface without reducing the trust requirement.
Practical implication: add independent validation steps for agent output wherever the result could affect access, configuration, or runtime behaviour.
Threat narrative
Attacker objective: The objective is not classic intrusion but uncontrolled agent behaviour that creates governance debt and weakens confidence in code and configuration decisions.
- Entry occurs through an AI coding session that starts without durable context or governance state.
- Escalation happens when the agent over-engineers, carries stale assumptions forward, or produces plausible but wrong outputs that bypass weak review.
- Impact is operational debt, hidden supervision cost, and fragile control layers that become production dependencies.
NHI Mgmt Group analysis
Agent governance debt is now a real security pattern: when teams rebuild context management, verification, and orchestration around an AI coding agent, they are compensating for a platform-level control gap. The work may be effective locally, but it creates undocumented operational dependency and makes ownership harder to sustain. For security leaders, that means the question is no longer whether the agent is useful, but whether its control plane is governable.
AI coding agents increasingly behave like non-human identities with session-bound authority: they do not need full autonomy to create identity risk, because they already hold tool access, repository access, and execution permission inside active workflows. That makes agent governance relevant to IAM and PAM teams, especially where tokens, secrets, and approval paths are shared across humans and machines. The boundary between productivity tooling and privileged access is now operationally thin.
Context loss is a control failure, not a user inconvenience: if an agent cannot retain the constraints that define safe operation, the organisation is forcing policy into markdown files and informal practice. That weakens auditability and makes access governance dependent on team memory rather than system design. For practitioners, the lesson is to treat durable context as part of the identity and policy stack.
Verification is the real scaling constraint for agentic development: the article shows that the speed problem is secondary to the trust problem. If outputs remain plausible but subtly wrong, organisations will add human supervision until the productivity benefit erodes. The right control objective is therefore bounded trust, not blind automation, and that requires review gates tied to code risk and privilege impact.
What this signals
Agent governance debt is a useful lens for security and platform teams because it explains why AI productivity gains often come with hidden control scaffolding. As agent use spreads, the programmes that succeed will be the ones that move context, verification, and auditability into managed controls rather than leaving them in repository notes and individual developer habits.
The identity implication is straightforward: once an AI coding agent has persistent tool access, it should be treated as a governed non-human entity with scoped permissions, traceable actions, and revocation paths. That is where NHI and IAM teams can add real value, especially when secrets, repositories, and deployment systems are part of the same workflow. See the NIST Cybersecurity Framework 2.0 for the broader control model and OWASP Agentic AI Top 10 for agent-specific threat thinking.
If organisations keep treating agent governance as documentation rather than enforcement, the result will be fragmented local workarounds that are hard to audit and harder to retire. The practical signal is to look for ownership, versioning, and change control around every file or script that now functions as a policy layer. Those artefacts are becoming part of the production security boundary, whether teams acknowledge it or not.
For practitioners
- Define session-context governance for coding agents Standardise what must be present at session start, what must persist across sessions, and who owns updates to project context files. Treat the context document as controlled operational policy, not developer convenience.
- Separate agent roles and handoffs explicitly Use distinct roles, step-result conventions, and repository isolation so one agent cannot silently overwrite another’s assumptions or outputs. This reduces state collisions and makes multi-agent work reviewable.
- Add independent verification gates for sensitive output Require human or automated validation before agent-generated code, config, or workflow changes touch authentication, secrets, network access, or deployment paths. The more privileged the change, the stricter the review path.
- Track agent governance debt as an operational risk Inventory bespoke prompts, markdown policies, state bridges, and orchestration scripts that now function as hidden control infrastructure. Assign an owner, a review cycle, and a retirement plan for each one.
Key takeaways
- AI coding agents are exposing a governance gap because teams are rebuilding memory, verification, and orchestration outside the platform.
- The risk is not only productivity loss but also hidden control debt, especially when agent workflows touch secrets, code, and execution paths.
- Teams that want scalable agent adoption need enforced context, scoped authority, and reviewable handoffs, not just better prompts.
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 OWASP Non-Human Identity Top 10 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 centres on agent behaviour, context loss, and tool misuse risks. | |
| OWASP Non-Human Identity Top 10 | NHI-03 | Persistent agent credentials and session context create NHI lifecycle risk. |
| NIST AI RMF | GOVERN | The article is fundamentally about accountability for AI agent operation. |
| NIST CSF 2.0 | PR.AC-4 | Scoped access and least privilege are central to agent tool permissions. |
| NIST SP 800-53 Rev 5 | IA-5 | Agent secrets and credentials need disciplined authenticator management. |
Inventory agent secrets and enforce rotation, revocation, and scoped access for each workflow.
Key terms
- Agent Governance: Agent governance is the set of policies, controls, and evidence required to manage autonomous software as a non-human identity. It covers consent, tool access, lifecycle review, audit logging, and revocation so that an agent remains bounded as its workflows change.
- Session context: The surrounding authentication and access conditions attached to a login, such as MFA status, device trust, IP reputation, and prior behaviour. It matters because identity risk is rarely decided by one event alone; context shows whether the event fits the account’s normal pattern.
- Agent Orchestration: Agent orchestration is the coordination of multiple AI agents or workflows to complete a task set with limited human intervention. In identity terms, it creates delegated execution paths that need ownership, scope limits, and auditability because work is no longer performed only by a person in one session.
- Approval Gate: An approval gate is the human or policy checkpoint that must be crossed before an AI system can take a state-changing action. For identity governance, the gate is the point where responsibility stays with the organisation, and it should be enforced separately from the system’s ability to observe or recommend.
What's in the full article
Obot's full article covers the operational detail this post intentionally leaves for the source:
- The exact CLAUDE.md patterns teams are using to encode constraints and project memory
- Examples of the state bridges and JSON handoff files used to coordinate multiple agents
- The discussion of parallel orchestration schemes that keep agents from becoming the bottleneck
- The workflow assumptions behind the Obot MCP Gateway and how teams use it to centralise control
Deepen your knowledge
NHI Foundation Level course, the industry's only accredited NHI security programme, covers NHI governance, agentic AI identity, machine identity security, and secrets management. It is suitable for practitioners who need to bring governed access thinking into AI and identity programmes.
Published by the NHIMG editorial team on August 19, 2026.
NHI Mgmt Group — the independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org