Insights · Security

Security for AI coding agents: the limit sits outside the agent, and every decision leaves a trail

Published · updated

By Ithaca

A coding agent reads files, runs commands and calls tools on its own. In our reading, the limit that counts is the one the agent cannot turn off, and every decision to allow or deny leaves a trail. That is what makes the operation auditable and improvable. The studies on Claude Code published in November 2026 show the other side: when an approval becomes a rule saved in a project file, the password can travel with the code.

The September 2026 references are NVIDIA texts about its own product and an opinion article on the Thoughtworks blog: a source for design, not a product recommendation. The November case draws on Anthropic's documentation, a public reply from the Claude Code team, and studies by two companies that sell security products, Apiiro and GitGuardian, each carried out by the company itself. The passages below summarize those sources; quotes keep the original wording.

The limit sits outside the agent's process

On 28 September 2026, NVIDIA announced the general availability of OpenShell, an open-source runtime for AI agents. According to the release, companies need a limit that can be enforced outside the model and the agent's harness (there, the harness is the agent's software).

The OpenShell page sums up the rule. Nothing is allowed by default. Policy enforcement happens outside the agent's process, where a prompt cannot turn it off and it cannot be bypassed. And every allow and every deny is auditable.

The NVIDIA technical blog, on the same date, details the blocked request: the denial is logged for review by an operator or by an approving agent. With the proposals feature on, the agent can ask for a new, narrowly scoped rule; the proposal waits for human review by default, and the agent cannot approve its own request.

In our reading, the rule holds beyond the product: a limit that lives only in the prompt depends on the agent cooperating; a limit enforced from outside does not.

Guides, sensors and human gates

On 29 September 2026, an article on the Thoughtworks blog, by Jaya Simha Reddy Nandyala and Prabina Pani (the blog notes that it is the authors' opinion), described a pattern for coding agents with two layers of control, separated by selective human gates:

  • Guides, before the action. They constrain and steer the agent before it acts, for example with least-privilege tools (a verification agent that can only read). Asking the agent in the prompt not to do what it is not authorized to do is, in the authors' view, inherently fragile.
  • Sensors, after the action. Unit tests, linters, type checks and architecture rules check what the agent produced, instead of its own self-assessment.
  • Selective human gates, between the two. A person confirms only where the possible damage is large or the decision is irreversible: scope across several repositories, a schema migration, a change to a public API.

According to the authors, the design avoids two mistakes: the agent let loose, and the review fatigue of someone who has to approve every trivial tool call. In Ithaca's reading, approving every call repeats the problem of approval that turns into a rubber stamp (only approve what you can explain): whoever approves everything stops reading what they approve. During execution, the human gate only protects if it is rare enough to be read; reading the code that goes into production is a separate step and still happens.

The "Don't ask again" case: when an approval becomes a file

Claude Code, Anthropic's coding agent, has permission modes. In Manual mode, it asks before running terminal commands, except for a set of read-only commands. Since late September 2026, terminal and VS Code sessions start in auto mode, where a classifier reviews actions instead of the user; Manual mode is still available. When the prompt appears, one of the possible answers is "Yes, and don't ask again". According to Anthropic's documentation, that approval becomes a permission rule saved in .claude/settings.local.json, in the project folder, and it applies permanently to that repository and that command.

On 5 November 2026, Apiiro researchers Shmulik Cohen and Matan Giladi showed the side effect. The saved rule can be the command itself, and if the command carried a password or a token, the secret is stored along with it, in plain text. The documentation says Claude Code adds the file to the global list of files git ignores on that machine. According to Apiiro, that does not cover a folder that becomes a repository later, a clone on another machine, or a file someone had already committed, because the rule never goes into the repository's own .gitignore.

In Apiiro's search of public GitHub, from 1 to 3 November, there were 104,185 copies of the file. In 1,122 of them (1.1%) there was at least one real secret, for a total of 1,379 distinct secrets. Adding older versions of the file in git history, the settings.json that teams commit on purpose, and agent transcripts, the count reached 2,539 secrets in 1,994 repositories. Apiiro did not test the credentials: there, a "real secret" is a key in a known provider's format or a password next to a public host. One of the organizations it notified confirmed its key had been live.

GitGuardian measured it another way and published on 9 November: everything pushed to public GitHub from January 2025 to 7 November 2026. It counted 31,088 distinct secrets in that file, of which 5,343 were valid at the time of detection. The numbers do not contradict each other: one measures what is exposed today; the other, what was ever pushed. By the same measurement, new leak occurrences in that file peaked in April 2026 (12,535 that month) and fell to 959 in October; GitGuardian says it does not yet know what changed.

In Apiiro's test, two well-known secret scanners, run without verification, caught only some of the leaks. Of the 1,122 files with a secret, gitleaks flagged 564 and TruffleHog flagged 643; 215 were flagged by neither. A password after PGPASSWORD= or sshpass -p is just another word on a command line.

On 7 November, Boris Cherny, of the Claude Code team, replied on Hacker News that the file is meant to stay on the user's machine, that Claude Code adds it to git's ignore list when it creates the file, and that the exposed copies had therefore been created by hand and committed. He also wrote that "we are looking into what we can do to prevent this", and recommended Claude Code's auto mode instead of permission lists, along with the secret scanning that GitHub and other source control services offer. Apiiro records a data point that points the other way: in 539 of the 1,105 repositories with a real secret that it traced, a commit with Claude as co-author changed the file. We have no way to settle that difference, and the checklist below applies either way.

In version 2.1.323, from 12 November, the changelog says that a rule that looks like it holds a secret, or that would be saved to a settings.local.json tracked by git, now lasts for the session only and is not saved. The same version fixed the protection for a folder that becomes a repository later and for a new machine. That reduces the risk of new secrets in the file. The ones already committed remain in the history, in forks and in clones.

In our reading, the case brings together the two mistakes Thoughtworks describes: the review fatigue of the person approving, which ends up letting the agent loose. Approving command by command is tiring, and whoever gets tired starts approving permanently. The decision to allow, which should stay in the session trail for someone to read, becomes configuration in a file that usually nobody reviews and that, if committed, travels with the code. It is the same risk as review that turns into a rubber stamp (the AI code review bottleneck), now in permissions.

What goes into the trail

A useful session trail keeps the request, steps, model, cost, result and authorship (what to record in each session). With limits enforced from outside, three items are worth adding: what the agent asked for beyond what was allowed, what was denied, and what became a permanent approval, with who approved it, when, and where the rule was saved.

The Claude Code case adds a caveat: the trail keeps a reference to the secret, never its value. Apiiro also found secrets in agent transcripts, memory files and handoff notes committed to repositories, and a third of those notes with a secret had been written by the agent itself. Recording the session does not mean copying the raw command into a file.

In our reading, a request denied again and again may point to a limit that is too tight or to an agent drifting out of scope; in both cases, a person on the team decides. A list of permanent approvals that only grows is the opposite signal, and it also deserves a read: in Apiiro's data, one in ten files above 8 KB had a real secret, against fewer than one in 500 below 500 bytes.

Checklist for the CTO

Before giving coding agents more autonomy:

  • What can the agent read and change without asking, and what requires a person first?
  • Is the limit enforced in the prompt or outside the agent?
  • Where are the allow and deny decisions recorded, and who reads them?
  • Can the agent approve its own permission request? The answer has to be no.
  • Who reviews the policy, and when?

If the team uses Claude Code, or another agent that saves approvals to a file:

  • Is .claude/settings.local.json in the repository's own .gitignore and in the company's .gitignore templates, and not only in each machine's global ignore?
  • Has the file ever been committed? Search the git history, not just the current version. If it is tracked, remove it with git rm --cached .claude/settings.local.json.
  • Found a secret? Rotate the credential first and clean up afterwards: deleting the file does not clean the history, the forks or the clones.
  • Does anyone review the permanent approvals? Open the file or use the /permissions command, delete rules with a secret written out in full, and prefer approving command patterns over whole commands.
  • Does the secret stay out of the repository and out of the command? The command uses a variable, such as $DB_URL, supplied by the secrets manager, and the saved rule keeps only the variable.
  • Does the secret scanner in pre-commit and CI look at .claude/ and the other agent folders, and does it catch a password inside a command, not just key formats?
  • Is Claude Code up to date? Version 2.1.323, from 12 November, changed "don't ask again"; 2.1.325 and 2.1.327, from 13 and 17 November, brought other fixes on the same issue.

Where the platform comes in

The agentic development platform operates at autonomy level 4: coding agents execute, and people on Ithaca's team or the client's, depending on the project, read the code before it goes into production. The team defines what the agents do without prior approval and what requires a person first, and every session is recorded, from request to result, with authorship. It is supervision with context and session traceability: it is clear who is accountable for what went into production, and the session can be reconstructed afterwards. The design in the sections above comes from the cited sources; it is not the platform's spec sheet.

This is not zero risk: a failure is still possible. What changes is the size of the damage and how easy it is to find the cause in the session.

Want coding agents with limits set by your team, supervision with context and every session recorded? Request a free assessment

Frequently asked questions

Are a guardrail and a sandbox the same thing?

No. A guardrail is any limit placed on the agent, from the prompt to a policy enforced from outside. A sandbox is one of those limits: according to the OpenShell page, it isolates a process in a bounded task, while autonomous agents need governance over time, with credentials, policy and logging.

Do limits enforced outside the agent replace code review?

No. They control what the agent can do while it works; review checks what it produced. On Ithaca's platform, code that goes into production is read by a person.

What should you do if .claude/settings.local.json was committed?

First, rotate every credential the file has ever held, because deleting the file does not clean the git history, the forks or the clones. Then take the file out of version control with git rm --cached, add it to the repository's own .gitignore and delete any rules with a secret written out in full.

Has Claude Code fixed the "Don't ask again" leak?

Partly. According to Anthropic's changelog, version 2.1.323, from 12 November 2026, stopped saving the approval when the rule looks like it holds a secret or would go to a file tracked by git: it lasts for that session only. The same version also started adding the file to the global git ignore when the folder becomes a repository later or on a new machine. That reduces the risk of new secrets in the file, but it depends on the tool recognizing the secret. The ones already committed remain in the history, in forks and in clones, and the credential can stay valid until it is rotated. Versions 2.1.325 and 2.1.327, from 13 and 17 November, brought other fixes on the same issue.

What about the company network and firewall?

They still apply. According to the OpenShell page, it does not replace the company's identity, observability and security tools; in it, each agent runs in a sandbox with no direct network access, and a supervisor checks each network request against the policy. Ithaca's platform, for its part, is deployed in the company's environment, on a cloud account the company controls or in a data center.

Sources

Start with what weighs most on your backlog.

Tell us what is stuck. After the NDA and access to the code, the agents read the system with your team and show where to start.

Phone is optional. How we use your data, including to measure our ads: Privacy policy.