AI Agent Permissions: Who Gave It the Authority?

AI agent permissions diagram showing a coding agent with a credential token

AI agent permissions are under scrutiny after a coding agent erased a small company’s production database in roughly nine seconds. In late April 2026, an agent working for PocketOS hit a credential error in staging, went looking through the project and picked up an API token from a file that had nothing to do with its task. It used the token to delete a storage volume at the cloud host Railway. Both the production database and its backups lived on that volume.

Nothing was broken or forged. The token was real, the request was valid, and Railway complied.

How PocketOS lost its data

Founder Jer Crane said the token was issued for routine domain work through Railway’s command line tool. Nobody at the company knew it could also remove production volumes. PocketOS fell back on a three-month-old backup and then rebuilt missing bookings from payment histories, calendar entries and customer emails.

No attacker was involved. Looking back, the agent said it assumed the volume was a staging one and didn’t verify.

AI agent permissions versus authority

A credential’s permissions describe what it can technically do. Authority is the right to do it, and it has to be handed down by someone entitled to give it. Today’s agents tend to carry plenty of permission and little recorded authority.

Security teams split the problem into three questions: who is calling (authentication), what that caller may do (authorisation) and on whose behalf it acts (delegation). Most setups answer the first two and skip the third.

An authority letter for collecting a passport shows what delegation should look like. It names you and your courier, lists what may be picked up and carries a date. Software usually hands the courier your ID card, which is impersonation, or a master key, which is a broad API key. The OAuth token exchange standard, RFC 8693, separates the two cases: an impersonator is indistinguishable from the person it copies, while a delegate keeps its own identity.

Why agents make this riskier

A scheduled script with an oversized key runs the same code every time, so you can read it and predict it. An agent chooses its actions as it goes, shaped partly by web pages, emails, GitHub issues and error messages it meets. The scope of its credential becomes one of the few limits that still hold.

A January 2026 Cloud Security Alliance survey of 228 IT and security staff found that 43% of respondents’ agents use shared service accounts and 31% run under human identities. 74% said agents often get more access than they need, and 68% couldn’t clearly separate agent activity from human activity. The sample is small and Aembit, which sells agent identity tools, funded it.

An Internet-Draft from engineers at Okta, Ping Identity, AWS, OpenAI, Zscaler and Defakto Security calls static API keys an antipattern for agents: they’re long-lived, bound to nothing and hard to rotate. It’s still a draft.

An old bug in a new setting

In 1988 Norm Hardy described the “confused deputy”: a compiler allowed to write to its home directory, which also held the billing file. A user told it to save debug output under the billing file’s name, and the records were overwritten. The compiler couldn’t tell whose authority it was using.

Agents repeat the pattern. In 2025, Invariant Labs showed that a malicious GitHub issue could hijack an agent connected through the official GitHub MCP server and reach private repositories the attacker couldn’t touch. Replit’s coding agent deleted a user’s production database in mid-2025 despite an instruction to ask first. OWASP’s Top 10 for Agentic Applications, published in December 2025, ranks identity and privilege abuse third.

One safeguard covers the tricked agent and the careless one alike. If the credential can’t do the damage, it doesn’t matter why the agent tried.

What delegated access involves

  • Each agent gets its own identity and short-lived credentials the model never sees.
  • A person approves a narrow grant on a screen that names the agent.
  • The resulting token names both the user and the agent acting for them.
  • The token is valid for one server only; MCP rules say servers must reject tokens issued elsewhere.
  • A broker issues fresh tokens per task, so revoking the connection stops everything.
  • Scopes begin read-only and widen only when a privileged action is first attempted.

With that setup, a calendar service can allow a user to delete events while letting the agent acting for them only read. The audit log shows both names.

A confirmation pop-up inside the agent’s own interface doesn’t count as authorisation, the IETF draft says, unless it ties to a grant from the authorisation server. Approvals sent to the user’s phone with the exact action attached are stronger. Prompt rules are requests, while removed write access is a control. Keep human sign-off for actions that can’t be undone, such as deleting data or moving money, or people will start approving everything.

Checks on AI agent permissions before handing over access

Several agent authorisation drafts were circulating at the IETF in 2026, and none is a standard yet. Teams can’t wait for them. Ask whether the agent has its own identity, whether logs will show the agent and the person, what the worst single call is, when access expires, and whether you can revoke it in one place.

Also check what else the agent can read. That was PocketOS’s blind spot. Use per-project tokens, read-only database users and backups the same credential can’t reach, and keep production secrets out of the agent’s working folder.

Source: hackernoon.com

Written by

Saksham Bhargava

Saksham Bhargava runs Alteroid and has been writing about consumer technology for over five years, covering iPhone, Android, Windows, AI tools and gaming. With an MCA and six years of hands-on web development experience, he tests the features he writes about on his own devices and focuses on clear, practical guides that solve real problems. Away from the screen, he enjoys travelling to places most tourists skip.