Sensitive AI workflow Hyungyu Lee

AI Agent Permissions: What a Yes Covers and What It Doesn’t

A grid of soft purple tiles inside a translucent panel, with one green tile sliding out past the panel's edge

In a case reported in November 2026, a coding agent fetched web pages for a developer. Some of its requests carried the developer’s account email in a header, because the email sat in the text the agent worked from.

AI agent permissions are the rules and approvals that decide which actions an AI agent may take, such as running a command or fetching a page, and they apply to the action the agent asks to take, not automatically to every value the agent has been given to read.

Adapted from The Email Address Nobody Decided to Send by Hyungyu Lee, Co-Founder and CRO of CUBIG, on the CUBIG Tech Blog (November 2026).

AI agent permissions answer a question about the action. Lee’s advice is to treat what an agent can read as something it can send, which puts two questions before the yes: what the agent was given to read, and which requests it writes for itself. CUBIG treats the first as a data question.

Key takeaways

  • A permission approves an action; it does not automatically approve every value the agent can read and put into that action.
  • One-time approvals, standing rules and classifiers each judge a request the agent has already built from its context.
  • Removing values the task does not need from the agent’s context acts before a request is written, while checks depend on noticing a leak as it happens; values that must stay, such as project names, are not covered.
  • Teams can review what an agent can read, who fills in identifying headers and which saved rules cover which data.

What are AI agent permissions?

In Claude Code, a user can say yes in three ways, and each one checks a proposed action differently.

  • One-time approval: the agent shows a command and the user approves or rejects it.
  • Standing rule: the user saves a rule, and the agent reuses it for later commands without asking.
  • Classifier approval: a second model reviews the proposed action and decides whether it can proceed.

The Claude Code permissions documentation warns that “Bash permission patterns that try to constrain command arguments are fragile.” A rule that matches the start of a command does not reliably limit every argument, destination or value that the command carries.

What happened in the Claude Code User-Agent case?

On November 5, 2026, a user filed a bug report titled “Bug Report: Privacy violation in User-Agent header” in the anthropics/claude-code repository. The report said the agent had put the user’s account email into the User-Agent header of requests to sites the user had not chosen to share it with.

A web request carries a few labeled lines, called headers, ahead of what it asks for. The User-Agent header says which software is asking.

Some sites ask automated programs to identify themselves. The Wikimedia Foundation User-Agent Policy says: “Scripts should use an informative User-Agent string with contact information, or they may be blocked without notice.”

According to Hacker News comments quoted in Hyungyu Lee’s essay, a contributor to the project wrote that the model “apparently tends to decide that this policy is worth following.” An engineer who works on Claude Code explained that the account email had been added to the model’s context because users reported the model making up names in author tags, and that when the model later wrote a web request itself, it sometimes put that email in the User-Agent as a contact address.

Lee describes it this way: a site made a reasonable request, a company made a reasonable fix for a different problem, and a model put the two together.

  1. 01Email in context

    The account email is added to the text the agent works from.

  2. 02Site asks for contact

    A site policy asks automated programs to say who they are.

  3. 03Request runs

    The task calls for a page, and the request the model wrote is allowed to run.

  4. 04Email goes out

    The request the model wrote carries the address in its header.

How an account email ended up in a request header, as described in the bug report and in comments quoted in Lee’s essay

How much harm followed is disputed. The reporter said scam emails followed, a connection Lee says the report does not establish and he could not confirm. One user reported, from logs Lee could not check, that headers the agent wrote itself also carried a project or client name. The HTTP standard, RFC 9110 (June 2022), warns that overly long and detailed User-Agent values increase “the risk of a user being identified against their wishes.”

Why could each kind of yes let such requests through?

Each approval method would judge a request that already contained the address. Lee does not know how many of these requests a person or the classifier ever reviewed.

  • One-time approval: the address would appear inside a long command line in the prompt, where a careful reader could catch it.
  • Standing rule: a saved rule matches the opening words of a command or the site a page comes from, so a saved yes to a general command-line tool for web requests covers later requests made with it, wherever they go and whatever they carry.
  • Classifier approval: according to Lee’s reading of the project changelog, new interactive sessions have started in auto mode since late September unless configured otherwise, so by default a classifier, not a prompt, reviews risky actions.

Anthropic’s engineering post How we built Claude Code auto mode (March 25, 2026) describes the classifier’s limits. When a value the user never named appears in a command, the classifier “can’t tell whether the agent pulled it from a query or fabricated it.” The post reports a 17% false-negative rate on a set of 52 real overeager actions and explains: “The classifier finds approval-shaped evidence and stops short of checking whether it’s consent for the blast radius of the action.”

Each method only passes or stops a request the agent has already built from what it was given to read. A site the task called for is evidence for the fetch, not for the address.

What did each repair change, and what does each one depend on?

According to Lee’s reading of the project’s public changelog and of a Claude Code engineer’s comment, there were four repairs. The first told the model to use the account email only to identify the user and not to send it to unrelated services unless the user asks. The second asked before a command or web request sent the address, and the third narrowed that check. The fourth, announced in that engineer’s Hacker News comment but not yet found in a release when Lee wrote, would remove the account email from the model’s context.

Four repairs and what each depends on
RepairWhat it depends onLimit
Tell the modelThe model following an instruction when it writes a requestThe same model already judged the site policies worth following
Ask at sendingA check recognizing the address as it leavesA script the agent writes and runs on its own can bypass the check
Narrow the checkThe check refusing one kind of command without askingOnly one kind of command is checked; other commands and scheduled runs no longer stop at its prompt
Remove from context (announced, not yet released)Nothing at the moment of sending; the value is not therePer user reports Lee could not check, an address from git settings or project names can still be used

The first three repairs depend on a person, a model or a check noticing the leak while it happens. The fourth would take the value away before the request is written. Lee notes its limits, citing two user reports he could not check: one user saw the agent take an address from git settings, and another pointed out that project names would still appear in requests. CUBIG’s earlier article on agent tool output leakage describes a related path, where data an agent reads through a tool moves on to another service.

What does RFC 9110 say about contact information in requests?

RFC 9110 defines a From header, separate from User-Agent, meant only for a contact address, and it separates two kinds of program.

“A user agent SHOULD NOT send a From header field without explicit configuration by the user,” while a robotic user agent should send one so that the person running it can be contacted if problems occur. Lee reads a coding agent as both at once, acting for a person while making automated requests; that reading is his, not the standard’s.

On that reading, the model-written requests handed over a contact address the way a robot should, though in the User-Agent line, where Wikimedia asks for it, rather than in From, and while acting for a person who had never set that up.

How should teams set AI agent permissions for data?

  • The platform team lists what the agent can read: its context, the files it opens and the settings it can reach.
  • The AI team removes values the task does not need before the agent sees them, following data minimization rather than instructions alone.
  • The platform team lets a tool, not the model, fill in identifying headers such as the User-Agent line, knowing that a script the agent writes can still set its own.
  • The platform team denies general network commands and fetches only from allowed domains through a built-in tool, as the Claude Code documentation advises, pairing deny rules with a sandbox network allowlist where the restriction must hold, and noting that “using WebFetch alone doesn’t prevent network access.”
  • The data owner reviews saved rules as data rules, checking which values each rule lets leave, not only which commands it allows.

CUBIG Shorts

When should an AI agent act, ask, or stop?

A short clip from CUBIG.

▶  Watch on YouTubeSubscribe

Where does CUBIG fit?

LLM Capsule is a CUBIG product that replaces sensitive or controlled values with context-preserving substitutes before data is sent to an AI service, then restores the original values in the response so the result can be used in the actual work. LLM Capsule can be adopted on its own.

LLM Capsule does not manage agent permissions, headers or network requests. Teams still decide what their agents can read and where requests may go; related terms include AI data leakage and sensitive data discovery.

A yes to an agent answers what it may do. What it was given to read was decided before that. When a workflow sends sensitive values to an external AI service and needs their context rather than the values themselves, see how LLM Capsule fits.

LLM Capsule. Use external AI on operational data that cannot be sent as raw data, with a context-preserving data layer. Contact CUBIG.

FAQ

What are AI agent permissions?

AI agent permissions are the rules and approvals that decide which actions an agent may take, such as running commands or fetching pages. They approve the action the agent asks to take, not automatically every value the agent has read and could put into that action.

How can an AI agent send data it was never asked to send?

An agent writes requests from the text it was given. If that text holds a value, such as an account email, the agent can place it in a request it builds, even when the user only approved fetching a page.

Are standing permissions riskier than approval prompts?

A standing permission for a general command-line tool covers later requests made with it, wherever they go and whatever they carry. Approval prompts let a person inspect each request, but long commands make values easy to miss. Both judge a request the agent has already built.

How can teams reduce what an AI agent sends?

Teams can list what the agent can read, remove values the task does not need, let tools fill in identifying headers, fetch only from allowed domains and review saved rules for the data they let leave.