Blog · Guide · 16 November 2026

Production Access for AI Agents: Always Ask a Person

Production access for AI agents is the question that decides whether a team trusts agents with real work. An agent that can only edit a branch is low risk. An agent that can run a migration, rotate a key or trigger a deploy is one wrong inference away from an incident. The answer is not "never". Agents can be useful near production. It is a layered design: keep credentials away, contain the run, and make sure the dangerous actions always reach a person. This guide sets out those layers, with published practice from Vercel, GitHub, CrewAI and Replit, and Forkit's rule for sensitive commands.

What can go wrong with production access for AI agents

Be specific about the failures you are designing against.

  • The wrong target. A migration meant for staging runs against production because an environment variable was set.
  • The helpful extra step. The agent finishes the task and then deploys, because deploying seemed like the natural next thing.
  • Steered by content. The agent reads a file, an issue or a web page containing instructions and follows them. Vercel's guidance on secure agents says to assume this can happen and design for it.
  • Leaked secrets. The agent prints a key into a log, a commit or a message.
  • Spending. The agent provisions resources or calls a paid API in a loop.

None of these requires a malicious agent. They need only a confident one.

Layer 1: Keep secrets out of reach

The strongest control is absence. An agent cannot misuse a credential it does not have.

  • Do not run agents in a shell that has production credentials loaded. Many developers' shells do.
  • Inject narrow credentials at run time. Vercel describes agents requesting short-lived, scoped tokens when needed instead of holding stored credentials.
  • Put a structured layer in front of data. CrewAI argues that agents should not be given database credentials at all, and should reach data through an abstraction that limits what they can ask.
  • Treat agents as untrusted with secrets. GitHub's security architecture for its agentic workflows states this as a principle: do not trust agents with secrets.

Replit's write-up of its architecture for agent work puts the general rule first: give agents only the authority they need.

Layer 2: Contain the run

A sandbox limits what a command can reach, whatever the agent intended.

  • Filesystem isolation keeps it inside the workspace.
  • Network isolation stops it calling hosts you did not approve, including your production endpoints.

Claude Code and Codex both have OS-level sandboxing. For headless agents, a disposable container or VM does the same.

A sandbox does not help once you deliberately open a path to production. At that point the question becomes who decides.

Layer 3: Stage writes

Where an agent must change something real, make the change a proposal first.

  • Pull requests are staged writes to code.
  • Plans. Vercel describes its own agent investigating production freely but needing an approved plan before changing anything, with tokens scoped to that plan.
  • Vetting. GitHub describes staging and vetting all writes from agents in its workflows.

The pattern is: read widely, write through a gate.

Layer 4: Always ask a person

Some actions should reach a human every time. No rule, no classifier and no other agent should answer them.

This needs to be a hard category, because every softer mechanism erodes. Allow rules accumulate. People click "always" to stop a prompt. A classifier is right most of the time. Over months, something sensitive ends up automated.

Forkit's design fixes the category in code. Its documentation says that production, secrets and money always reach a person:

  • Allow rules never answer them. A rule that would match is ignored for these requests.
  • The orchestrator agent never answers them. Even if an owner has delegated that tool.
  • A person can only allow them once. "For an hour" and "always" are not available. Each occurrence is a fresh decision.
  • They are never grouped. If two hundred agents ask, each request is answered alone.

On Forkit's site, the layer that describes the orchestrator puts it in one line: production, secrets and money always escalate to a person.

Escalation to a person is still fast. The request appears at the top of the inbox with the exact command, the repository and branch, and the agent that asked. One click allows it once or denies it with a note.

Detecting sensitive commands

To pin a category to a person, the system has to recognise it. Design the detection to err toward asking.

Signals worth using:

  • Words and flags: production, prod, --env production, deploy, release, publish.
  • Tools: cloud CLIs, database clients, infrastructure tools, package publishing.
  • Paths: environment files, key files, secrets directories, infrastructure definitions.
  • Money: billing commands, provisioning, purchase APIs.

Two cautions. A pattern list is never complete, so pair it with the layers above; it is a net, not a wall. And do not let the agent's description of a command influence the classification. Classify the literal command.

Forkit applies its own check to each request and marks it as sensitive. Its documentation does not publish the exact patterns, and this article does not guess at them. If you depend on a specific command being caught, test it.

Allow once, and mean it

"Allow once" matters because approval of a production action is approval of that action, at that time, with those arguments.

  • Show the literal command. Not a summary.
  • Show the target: environment, database, account.
  • Show who is asking and from which branch.
  • After approval, record who approved and when.

If a second, similar command follows, ask again. The inconvenience is the point. The few commands that touch production are few enough to read.

What happens when nobody answers

For a sensitive request, silence must mean no.

  • An agent in a terminal: Forkit's hook withdraws after its wait and Claude Code shows its own prompt, so the person at the keyboard still decides.
  • An agent with no terminal: the request is recorded as denied.

Never time out to "allow".

Separate the agent that proposes from the person who approves

For production changes, the approver should not simply be whoever is running the agent.

  • Route by ownership. The person responsible for the database approves migrations.
  • On a team, Forkit sends a permission request to the agent's own person, and workspace owners can also answer. For finished work, approval rules name approvers by file path.
  • Keep an audit trail: each decision records whether a rule, the orchestrator or a user made it, and who.

Practices to adopt this week

  1. Open a new shell and check which credentials an agent started there would inherit. Remove what it does not need.
  2. Turn on your agent's sandbox, with network access restricted.
  3. Write deny rules for deploy, publish and destructive commands in every repository.
  4. Decide your "always a person" list and write it down.
  5. Route those requests somewhere a person will see them promptly.
  6. Run a drill: ask an agent to "deploy this to production" in a test repository and watch what stops it.

What this does not solve

  • An agent can still write code that harms production when it is deployed later. That is what review and tests are for.
  • Pattern detection misses commands wrapped in scripts. Review scripts agents create.
  • People can approve without reading. Keep the list short enough that they do read.

Related: agent permission rules, agent sandbox vs approvals and human-in-the-loop approval for coding agents.

Where Forkit fits

Forkit holds every permission request an agent makes, lets rules and an orchestrator handle the routine, and guarantees that production, secrets and money reach a person, who can allow each one once. It works alongside your sandbox and your credential setup, and does not replace them. It is free to try. More at forkit-mcp.com.