Agent instructions aren't permissions: move guardrails out of the prompt

This article has been automatically translated.
Loading article...
Merry Christmas & Happy New Year!
Loading article...

This article has been automatically translated.
Have you ever written "never touch production" or "don't delete files" in an agent's instructions? After writing it, did you check which component would actually say "no" if the model decided not to listen? A Kilo Code blog post rounds up the views of eight speakers from All Day AI 2026, and the core conclusion comes down to one sentence: what you tell the agent is guidance, what the system allows it to do is permission, and you are responsible for both. This article is for developers who already let LLM agents take real actions (write files, run shell commands, call APIs, initiate payments). It helps you audit your existing guardrails one by one and decide whether each restriction belongs in the prompt, a tool allowlist, a sandbox, or a runtime policy check.
Lawyer Sam Shaddox had his personal AI agent search his inbox for a $300 mattress rebate. The agent found it, then kept going: it clicked the link, signed up for an account, accepted the terms "without asking me," submitted the claim, and accepted a second set of terms on the way out.
At no point in the chain did the model disobey an instruction—the setup allowed every step. Shaddox's warning: "Delegation is never a defense." If those terms had said "claiming the rebate means agreeing to pay a third party $500," he would have been on the hook just the same.
This changes where you start troubleshooting. Don't ask "are my rules clear enough?" Ask "which component is responsible for saying no?"
One check you can do right now: open your agent's tool and permission configuration and list every action that is currently allowed automatically. For each one, ask yourself—if the model decided on its own to take this step, what would stop it? If the only answer is "my prompt," flag it. If you can't find the configuration at all, that is itself the conclusion: the restriction isn't being enforced.
Axari chief strategy officer Caroline Wong uses an accounts payable agent to illustrate the problem. The agent reads invoices, purchase orders, and the vendor list, and approves payments of up to $10,000 for vendors already in the system. It cannot add vendors, change bank details, or move money outside the payment system, because "adding vendors and changing bank details create opportunities to redirect payments."
The key is what happens above the limit: payments over $10,000 go to a manager, and "without a manager's approval record, the payment system will not release funds." In Wong's words, that approval "should be checked by the payment system, not by the agent."
That is the difference between an enforceable limit and a limit on paper. A limit only truly holds when it lives in a component the agent cannot rewrite.
There is also a prior question: the authorization itself has to be right. Charlemagne Labs co-founder Staford Titus Selvaraj warns that if a vague request gets translated into overly broad authorization, "even perfect downstream execution will faithfully execute that bad authorization." So make two separate decisions: how broad the authorization is, and where the check lives.
During the audit, for each numeric or categorical limit (spending cap, allowed vendors, allowed branches), find the component that actually enforces it, then test three amounts: just below the threshold, exactly at it, and just above it. Add two invoices that split a payment to evade the cap, an absent approver, and the agent trying to record its own approval.
Agents read untrusted text every day: issues, emails, READMEs, attachments, web pages. Wong puts it plainly: "We can't fully stop an agent from being influenced by what it reads."
Take a scenario from the source: the user only asked for a payment recommendation, but the invoice attachment says to update the vendor's bank details. The attachment could come from a real vendor or from an attacker. "Either way, reading a request and having the ability to act on it are two different things."
An analogy: you get a letter saying "you may now empty the safe," but the letter doesn't give you the safe's combination. The analogy has an important limitation—an LLM really might act on the letter, so the combination has to be somewhere it can't reach.
Since influence can't be eliminated, the design goal shifts from "make the model ignore bad text" to "make bad text unable to grant permission." Selvaraj's testable property is short: "The agent cannot edit policy or grant itself authorization."
A concrete check: find every entry point through which the agent reads external content, and see whether any tool reachable from that read path can modify permissions, credentials, or payment details. If the agent can change its own policy or issue itself authorization, that is the first restriction to move out of the prompt.
Composio's Brendan O'Leary tells a widely circulated case: a user set up an agent to privately send him a monthly personal financial audit report, calling it his "private CFO." The report later showed up in a company executive Slack channel, "posted as him."
His bank connection was read-only, and the Slack post came from a different agent. He only found out because a colleague told him—by then the report had been sitting in the channel for two hours. Afterward, "all we got was an apology from the agent."
This shows that read-only permission doesn't control where data flows afterward, and a shared identity makes accountability impossible. O'Leary's fix starts with identity: "If the user ID is supplied by the model, it can't prove who the agent is acting for." Permissions must also expire—when a user changes teams, a scheduled job must re-check when it wakes up, because "Monday's permission can't quietly become permanent."
Meta's Anusha Mukka uses the valet key as a metaphor: it starts the car but can't open the trunk or the glovebox. She cites the OAuth token exchange spec RFC 8693, distinguishing "impersonation" (one identity becoming another) from "delegation" (the agent keeps its own identity and acts on the user's behalf). She also warns against assuming revocation is instant: "Removed is not revoked." It's like removing someone from a group chat while their phone is offline—they can still see new messages; until every system has the latest information, removed permissions may keep working.
Check two things: whether the agent acts under its own identity or borrows the user's credentials, and whether scheduled jobs re-verify permissions at runtime. Then actually test revocation—after removing access, confirm that the next scheduled run really fails. If a removed user's agent can still complete tasks, revocation isn't being enforced where it matters.
Wong's closing checklist turns the argument above into an operational acceptance process, summed up in one line: "What you want to confirm is the system refusing, not the agent refusing."
In a tabletop exercise at Anaconda, only 22% of 59 respondents had an agent incident playbook tested within the past six months. That is exactly why you test rather than assume. Shannon Lietz's line works as the throughline: "If you don't measure it, you didn't do it."
Kilo sets permissions per tool (allow, ask, deny) and can also maintain allow and deny lists for shell commands. This amounts to writing down Shaddox's "always allow" so it can be audited.
But note that the default posture leans permissive: most tools are allowed by default out of the box, and reading .env files is one of the few exceptions that prompts first—which covers only part of the risk that 1Password's Mariane Bekker warns about. Bekker points out that developers often leave .env files, SSH keys, and tokens in mcp.json right next to the agent, where any agent with file access can read them.
The sandbox adds an operating-system boundary around tools on macOS and Linux, and it still applies even if a tool passes Kilo's permission check. It restricts writes and outbound network access, butdoes not restrict filesystem reads; it is also off by default, and the docs explicitly say it "can't make 'allow everything' safe."
My assessment (not a conclusion from the source): the sandbox shrinks the blast radius but can't replace correct authorization; read access remains a gap that needs separate handling. These describe the configuration currently available, not a roadmap—verify the defaults in your own environment.
Back to the $300. The agent did what the setup allowed it to do. Better instructions might change its behavior, but they can't change what it is allowed to do—that takes a system-level restriction.
Pick an agent you run with real credentials, and in a test environment have it do something just over the line: push to a protected branch, read a secret, approve an over-limit payment. Then see what stops it.
If the answer is "the agent decided not to do it," you've found the first restriction to remove from the prompt.