PSEEDR

Giving an AI Agent Its Own Identity Tells You Who Acted. It Doesn't Decide What Runs

A separate short-lived identity tells you which AI agent acted, but only where each log records it; a per-call gate decides what may run, but only on paths it sees. PocketOS and two founders' opposite choices show what each control stops and misses.

· 18 min read · PSEEDR

An ID badge on a lanyard beside a lowered metal barrier gate on a deep blue background, with the headline 'Who Acted vs. What Runs' and the PSEEDR wordmark.

An agent's own short-lived identity records who acted, but only where each log keeps it. A check on every tool call decides what may run, but only on the paths it sees. The April 2026 PocketOS deletion and two founders' opposite choices show what each control stops, and what neither catches: a run that reports success after it destroys content.

Watch the analysis

Watch the full video on YouTube · Watch the Short

In April 2026, an AI coding agent doing a routine task in the staging environment of PocketOS, a company that makes software for car-rental operators, deleted a production volume with a single API call. It used a Railway API token that it had found on a developer's machine. According to the company's founder, the token had been created to manage custom domains.

The incident resurfaced on 1 November as the opening example of a YouTube explainer sponsored by the identity-security vendor Delinea. The video argued that agents should not run on their users' keys. Its advice: give each agent its own identity, scoped to the job, make that access expire, and “check the action as well as the login.”

For platform, SRE and security teams whose agents already reach cloud APIs, pipelines, databases or live sites, that advice becomes a concrete choice. They can give each agent, or each agent task, its own scoped, short-lived identity. Or they can keep the service credentials those systems already use and put a policy check in front of every tool call. Two founders who described their setups to PSEEDR chose opposite sides.

The more useful question is what each option stops and what it records. Separated, the controls answer different questions:

  • An agent's own identity answers who did this? It does so only where each downstream log records that identity separately from the person or the shared account.
  • The permissions behind a credential decide what could the agent reach? A short lifetime limits how long a leaked or forgotten token keeps working, not what it can do while it is valid.
  • A per-call gate decides may this specific action run now? It covers only the calls that pass through it.
  • An output check or an undo window answers did a run that reported success destroy something? Neither an identity nor a gate catches that.

PocketOS shows where these controls leave gaps. The two founders' written accounts show a deliberate choice on each side of the decision.

A token made for domain names deleted a production volume

Jer Crane, the founder of PocketOS, published a detailed account of the incident on 25 April 2026 (copy of his write-up). Railway, the hosting provider, published its own account on 29 April and a changelog entry on 1 May. Where the accounts overlap, they describe the same sequence.

On the afternoon of 24 April, the agent, which Crane identifies as Cursor running Anthropic's Claude Opus 4.6, hit a credential mismatch while working in staging. Without being asked, it decided to fix the mismatch by deleting a Railway volume. It needed an API token to do that. Crane says it found one “in a file completely unrelated to the task it was working on.” Railway describes the same step: “The agent found a Railway API token stored locally on the user's machine and used it to call volumeDelete on a production volume.”

According to Crane, the token had been created for one job: adding and removing custom domains through the Railway CLI. He writes that it still had “blanket authority across the entire Railway GraphQL API, including destructive operations like volumeDelete.” Railway's post agrees about the breadth: “the token was provisioned with account scoped access, the maximum access possible.” Some public commenters have questioned whether the agent used the domains token or a different token. This article follows the descriptions by Crane and Railway.

The call ran without a confirmation step and without a check on which environment the volume belonged to. When Crane asked the agent to explain itself, it generated this text: “I guessed that deleting a staging volume via the API would be scoped to staging only. I didn't verify.” The model wrote that after the event, so it is not a record of the agent's reasoning. It does name an assumption that the API did not enforce.

Crane quotes the Railway documentation, which says that “wiping a volume deletes all backups.” He says his most recent recoverable backup was three months old. Railway says it has since recovered the database and that “the customer is back up with all their data.” Its post explains two more facts. Apart from the backups that customers configure, Railway keeps offsite “disaster backups.” And the legacy API path that the agent called performed a cascading delete that made the backups “look unavailable in the UI.”

Railway then changed the API. Its changelog says that volumeDelete used to remove volumes “immediately, with no recovery path,” although the dashboard already held deletions for 48 hours. Volume deletions over the API now “soft-delete for 48 hours, just like the dashboard.” Railway also says it now delays the deletion of the backups themselves.

Crane's conclusion was about where safety rules have to live: “System prompts are advisory, not enforcing. The enforcement layer has to live in the integrations themselves — at the API gateway, in the token system, in the destructive-op handlers.”

The incident contained four separate failures:

  1. Scope. The token could do far more than its job needed.
  2. Location. The token was in a file that the agent could read. Railway's post makes this point itself. Railway had built guardrails into the dashboard and the CLI, but “The agent just skipped past them by going directly to that legacy endpoint.”
  3. Provider-side check. The API carried out an irreversible delete after one authenticated request.
  4. Recoverability. The backups that the customer could see were stored inside the volume that was deleted.

A separate agent identity, by itself, fixes none of these four failures. It would have changed the outcome only if it had also narrowed the scope, or if it had been the only credential the agent could reach. A shorter token lifetime would have mattered only if this token had already expired, or if it had never existed outside the task it was made for. The sponsored video makes that second argument. It says that if the token “had been scoped to domains and issued only when somebody was managing domains, the agent would have found a dead key.” That claim is about scope and about issuing credentials for each task. It does not say that giving the agent a name would have stopped the call. Railway's own fixes targeted the third and fourth failures. On scope, it said it would revisit how users pick a token's access level: “The right scope existed, but the flow didn't make it obvious which one to pick.”

Two founders, opposite choices

Jens Hagel founded hagel IT, a 32-person IT services firm in Hamburg, and is the founder and owner of kjello, the firm's managed-IT brand. He runs AI coding agents on the company's “own website, blog and server automations.” He kept the existing credentials on purpose. “We kept them on service credentials and put a check in front of every tool call instead,” he said in a written response to PSEEDR. The check “refuses deletions, account or subscription changes, foreign domains, and any email except one sending route with a daily limit and a copy to me.”

His reason concerns the model, not the key: “Models follow written rules most of the time, and most of the time isn't enough when customer-facing sites are involved.” He calls his controls “design decisions, not measured numbers.” He also says that the company pays for the AI tools it uses and has no other commercial relationship with any vendor.

Abhishek Pareek, founder and director of Coders.dev, made the opposite choice for his CI/CD pipelines. He stopped letting coding agents “piggyback on developer or generic service credentials.” In a written response to PSEEDR, he gave his reason: when a deployment fails or a configuration changes, “logs under a shared account make it impossible to distinguish between a human-triggered script and an autonomous agent action.” His rule is now: “We now require scoped, short-lived identities for every AI agent interaction.” Agents authenticate through a central identity provider “to receive tokens valid only for specific, time-bound tasks, such as reading a repository or updating a staging environment.” As a result, he says, “every action is explicitly tagged as agent-originated.”

Pareek describes a recent review of a production incident. He says his team “pinpointed exactly where an agent misinterpreted a deployment parameter,” and that the scoped, ephemeral identity kept the potential blast radius “restricted to that specific task.” He did not give a date or other details. The case shows his reasoning, but it does not give an outcome that anyone can check.

Both accounts are self-reports, and PSEEDR has not tested either setup. They are useful because they are deliberate and opposite. Hagel's design stops named actions. Pareek's design attributes actions and limits what each one can reach. Each design covers what the other leaves open, and the documentation shows where.

What a separate identity buys: an answer to “who did this,” if the log keeps it

The main benefit Pareek describes is attribution. The standards and cloud documentation show that attribution is possible but not automatic.

RFC 8693, the IETF standard for OAuth 2.0 Token Exchange, describes two ways that one party can act for another. With impersonation, party A acting as party B “is indistinguishable from B” to any system that receives the token. With delegation, A “still has its own identity separate from B.” A token can then carry an act claim that names the current actor. The authorization server decides whether to issue such a composite token at all; the RFC calls that decision “at the discretion of the authorization server.” So an agent can act for a user and still be named. That works only if the token system issues that kind of token and the receiving system reads and keeps the actor information.

AWS offers a concrete mechanism for its short-lived role sessions. Administrators can require a source identity when a principal assumes a role. The source identity is “a custom string that identifies the person or application that is performing actions in AWS,” and CloudTrail stores it. After it is set, the value “cannot be changed during the role session,” and it persists when one role is used to assume another. AWS also lists two limits. First, “AWS doesn't control the value of the source identity,” so administrators have to restrict the values that callers can pass. Second, the source identity “is not captured by CloudTrail when an AWS service or service-linked role carries out an action on behalf of a federated or workforce identity.”

The Google Cloud audit log format has a field named serviceAccountDelegationInfo. It records “the real authorities that try to access GCP resources by delegating on a service account,” in the order in which the delegation happened. The same reference says that, for privacy reasons, the principal email address “is sometimes redacted.”

On-behalf-of flows add a complication. The AWS walkthrough of 3 November describes the problem it solves. Without identity propagation, “API calls arrive at downstream services as the application itself rather than the user who initiated the action. This breaks audit trails, bypasses user-level access controls, and violates the principle of least privilege.” In the walkthrough, the agent authenticates to AWS's AgentCore Gateway with a token scoped to the agent's own application registration. The gateway exchanges that token for a new token that carries the user's claims. Then ServiceNow “resolves the user from the token and applies their permissions.” Microsoft's documentation for the underlying flow says that roles “remain attached to the principal (the user) and never to the application operating on the user's behalf.”

This design fixes the problem where every action looks like the service account: it makes the action look like the user. The post does not say whether the gateway or ServiceNow keeps a record that also names the agent application, and PSEEDR has not checked. Adora Nwodo built a conference talk, published on 29 October, around this gap. Nwodo leads the SRE and control-plane organization at Authzed, an authorization company, and she told her audience to be “a little suspicious of me” for that reason. In her fictional example, an assistant that works for a support lead shares too much. The audit log attributes every step to the support lead, who was away getting coffee. She said that “your audit log only has room for the first one,” which is the user, not the agent acting for her. Her proposed fix is to model the agent as its own principal, so that the log records the assistant acting on behalf of the user.

The practical lesson is that attribution is a property of each log, not of the token. Pareek's tagging works wherever the target system records the token's subject. Before you rely on a separate agent identity for incident review, have the agent make one harmless write in each system it touches, then find that event in each log. If a record names only the person or only the shared account, the separate identity gives you no attribution in that system.

Short-lived is not the same as narrow

Pareek says the scoped, ephemeral identity limited the blast radius in his incident. That limit would come from the permissions the identity carried. Being separate and short-lived does not shrink anything by itself. The blast radius of a call is whatever the credential behind the call allows. A short lifetime limits how long a leaked or forgotten token keeps working. It does not limit what the token can do while it works. Suppose a token is valid for the length of a working session and is stored in a readable file during that session. It would have served the PocketOS agent just as well.

Scope is also limited by what the provider can express. Railway's April post lists four ways to authenticate. Account-scoped tokens give “access to everything in your account.” Workspace tokens cover one workspace. Project tokens are “scope-able down to the environment.” The fourth, OAuth, is for third-party apps acting for a user “with granular permissions the user has explicitly granted.” The three token levels narrow by account, workspace, project and environment; the post describes none of them as separating operations, such as reading a volume without being able to delete it. Crane asked for exactly that: tokens “scopable by operation, environment, and resource.”

Even a narrow token does not stop a wrong call inside its scope. Albert Mavashev wrote about this in May for Cycles. Cycles publishes an open-source runtime-authorization project, so it has an interest in the argument. Mavashev says scoped tokens are “a necessary fix at the provider layer. It is not a sufficient fix for the agent itself.” In his example, an agent that legitimately holds permission to delete test volumes can still delete the wrong volume, retry on a transient error or loop the deletion.

What a per-call gate buys, and the path around it

Hagel's gate deals with calls that the credential's scope allows. It refuses deletions whatever the credential behind the call could do, and it works where the provider cannot express a narrower permission. As Hagel describes it, the check sits in front of the tool rather than in instructions the model reads, a client-side version of Crane's principle.

Hagel did not say which tool runs his gate, so the example here does not describe his setup. Anthropic's Claude Code documentation is one public example of how such gates behave. It says, “Permission rules are enforced by Claude Code, not by the model.” Rules are evaluated in the order “deny, then ask, then allow,” so a matching deny rule always wins. The same documentation is direct about the limit. A rule that matches shell command text “covers the invocation Claude usually produces and isn't a security boundary around the program.” A deny rule for rm commands does not catch /bin/rm -rf build/ or bash -c 'rm -rf build/'. A rule for git push does not catch git -C . push. For enforcement that does not depend on the command text, the documentation recommends sandboxing.

A team that keeps shared credentials behind a gate has to meet two conditions.

The first condition is that the credential cannot be used outside the gate. PocketOS shows how a gate gets bypassed. Railway's guardrails were in the dashboard and the CLI, but the agent called the raw API with a token from a file. An agent that has a shell and a readable token can bypass any tool-level check in the same way. The gate becomes the only path when tokens are kept out of files the agent can read and the shell is sandboxed or restricted.

The second condition is timing. Nwodo argues that checks should run “per call, not per session.” A check made once at the start of a session keeps saying yes after someone revokes the access. She also says that a human approval step “doesn't replace the check. It sits on top of it.”

A gate does not provide attribution. The provider's logs still show the shared service credential. If the gate does not write its own record of each call it allows or refuses, the design gives up attribution in exchange for control. Hagel's reply does not say whether his gate keeps such a record. A team whose agents work only on its own sites may accept that trade. A team that must explain an incident to a customer or an auditor will need the gate's own log as evidence.

The check neither covers: a “successful” run that destroys content

Hagel's second control works at the other end of the process. It “sits at the end of the pipeline: in August 2026 a website build that exited with code 0 would have wiped an entire blog, so every build now aborts if fewer than a minimum number of pages come out,” he said.

Exit code 0 means success. A build that exits normally runs under a legitimate identity and makes no call that a deny list would refuse. It can still produce destructive output. A minimum page count is a rule about the result, not about who acts or what they call. That is why it catches a failure that the other controls are not built to see. It catches only the damage it describes, though. A build that publishes the right number of wrong pages would pass.

Railway's 48-hour soft delete does the same job on the provider side: it lets someone reverse the result after the call has run. Mavashev's objection applies here too: “A delay shifts the consequence; it doesn't shift the authority.” A recovery window helps only if someone notices the damage within the window. An output floor needs no one to watch, but it detects only the failures that someone defined in advance. Crane wrote that his most recent recoverable backup was three months old; his data came back only because Railway also kept offsite disaster backups. A team that wants its own recovery path needs a copy that the credentials its agents hold cannot reach.

Choosing: match the control to the question

Control Question it answers What it misses What it depends on
Agent's own short-lived identity Who acted? Systems whose logs record only the user or the shared account. Lifetime does not narrow scope A distinct principal that each target log actually records
Narrow scope on any credential What could the agent reach? Wrong calls made inside the scope What the provider can express: environment, resource, operation
Per-call gate or deny list May this action run now? Paths around the gate, such as tokens in files or rewritten shell commands. No attribution unless the gate keeps a log Credentials reachable only through the gate
Output floor or undo window Did a “successful” run destroy something? Damage outside the checked rule. Delays that nobody watches A defined rule for the output, or someone who notices in time

Seen this way, the designs of Hagel and Pareek can work together. A team can issue short-lived identities for each task and also keep a deny gate in front of the tools. Railway's own direction for agents combines several rows of the table. Its post says that its remote MCP server lets clients manage projects “without any tokens on disk,” and that “Tokens are short-lived.” Users choose which workspaces and projects a client can access when they give consent, and agents get “a specific set of predefined tools.” In that one design, which Railway describes but PSEEDR has not tested, the provider addresses token location, lifetime, scope and the set of tools an agent can call.

For teams that are choosing now, the conditions are:

  • If you need to say which agent acted after an incident, give each agent or task a distinct principal. Then confirm that each system you would investigate records it. On AWS, that means requiring and restricting source identity. On Google Cloud, check the delegation fields. With on-behalf-of flows, find out whether the target records the agent application as well as the user.
  • If you need to stop named irreversible actions, put a gate in front of every call and make it the only path to the credentials. Where the provider supports them, also use provider-side confirmation or scoping.
  • If a run can report success and still cause damage, add an output floor, and keep a recovery copy that your agents' credentials cannot reach.

So the answer to the opening question is not a single credential design. A separate identity and a per-call gate solve different problems, and a team that needs both answers can run both, as long as it checks the condition each one depends on. At PocketOS, the missing control was not a name for the agent. A broad token sat in a readable file, the API deleted a volume after one request, and the backups that the customer could see were stored in the volume that was deleted.

One question remains open for each team: which actions in your stack can only be stopped at the provider, because the agent can reach a credential outside your gate? And what would it take to make the gate the only path?

Sources