Your AI setup needs guardrails

Learn how to delegate work to AI agents that change files, tools and connected systems, while keeping judgment, visibility and control.

A cobalt sphere between two curved porcelain-white guardrails.

When teams first adopted AI assistants, the main concern was whether their answers were reliable. A model suggested code, summarized a requirement or recommended a next step, and a person decided whether to use it.

Agents such as Codex and Claude Code now do the work themselves. They run commands, edit files, navigate websites and change connected systems, using the accounts you are signed in to. Their output can be a change in a real environment, made after several decisions you did not review.

We’ve gone from a problem with the reliability of responses to a problem with controlling actions.

Fewer interruptions, more delegated decisions

Approval prompts ask you before an agent runs a command or edits a file, but they lose their value when they appear too often. Anthropic reports that Claude Code users accept 93% of approval prompts. It links that habit to approval fatigue: people stop paying close attention to what they approve. A prompt that is always approved records a click, not a decision.

Both agents let you reduce or remove these prompts. The Codex security documentation and the Claude Code permission modes describe two broad options: let an automatic reviewer answer some requests, or skip the checks altogether.

Setting

What it changes

What still applies

Codex: Approve for me

A separate reviewer agent answers eligible approval prompts in your place.

The agent still works inside the same sandbox, with the same file and network limits.

Codex: Dangerous full access

Removes both the sandbox and the approval prompts.

Nothing from the Codex sandbox. OpenAI marks this combination as elevated risk and not recommended.

Claude Code: Auto mode

A classifier model reviews actions before they run, in place of routine approval prompts.

Your allow, ask and deny rules. Some actions, such as production deploys, are blocked by default.

Claude Code: Bypass permissions

Disables approval prompts and safety checks, including writes to protected paths.

Deny rules, explicit ask rules and a few protected file removals. Anthropic recommends it only for isolated containers and virtual machines.

You can also start both bypass modes from the command line, with flags whose names state the risk:

codex --dangerously-bypass-approvals-and-sandbox
claude --dangerously-skip-permissions
codex --dangerously-bypass-approvals-and-sandbox
claude --dangerously-skip-permissions
codex --dangerously-bypass-approvals-and-sandbox
claude --dangerously-skip-permissions

Fewer approval prompts let agents finish longer tasks on their own, so the question becomes how to delegate that work while keeping judgment, visibility and control.

What we lose when agents work without sufficient oversight

Understanding and accountability

Reviewing a result and understanding how it was produced are different tasks. You can open a finished automation, see that it runs, and still not know why the agent chose one approach over another, which data it left out or which edge case it decided not to handle. Those choices matter later, when you need to figure out why a request was handled a certain way or when the next change has to fit around this one.

The usual evidence does not fill that gap. A conversation history buries these choices among hundreds of routine steps. A completion message is only the agent’s own summary: “All tests pass” does not show that the tests check the agreed behavior.

You remain accountable for output you cannot fully explain or maintain.

Human expertise and context

Much of a consultant’s judgment never reaches the brief: the client’s preferences, informal agreements made in workshops, what their team can maintain and lessons from earlier projects. An agent can only work from what it is given, so it can satisfy the written requirement while choosing an approach the consultant would reject.

Example: you ask an agent to add finance approval for large orders. It writes custom approval code, fully tested, and the code works. A consultant would have used the approval feature already built into the software. Experience tells them custom code needs a developer to maintain it. The client’s situation tells them there is no developer, only two administrators who work in the settings.

Alignment with the original objective

An agent can misunderstand a request from the start. Reviewing its plan usually catches that. Drift during execution is harder to see. When the agent meets an obstacle, its workaround can widen the scope, change an assumption or replace the requested solution with another one.

A workaround needs your decision when it changes the agreed outcome, a business rule, the systems affected or an assumption you relied on. Fixes that leave all of these unchanged can go ahead without you.

External content can also redirect the work. A web page, file, email or ticket can contain instructions that the agent follows when it reads them. OWASP calls this indirect prompt injection.

Control over actions and consequences

An agent can use all the access its environment has, which is often more than the task needs. If your terminal or browser is signed in to a production system as an administrator, the agent has administrator access too. OWASP calls this risk excessive agency: more functionality, permissions or autonomy than the task requires.

It helps to separate three levels of access:

  • Inspect: read files, query data and look up settings. The main risks are wasted effort and exposure of sensitive data.

  • Modify: edit local files or change a test environment. Mistakes are usually contained and recoverable.

  • Deploy: release changes to production, update live data, send messages or call external services. Mistakes reach users, clients and their data.

How to build controlled autonomy

Controlled autonomy gives the agent room to work inside boundaries you have set, and brings you in where your judgment changes the outcome. Four practices make that possible.

Define the objective and the delegation

Many oversight problems start before the agent runs. A brief that names only the task leaves the agent to decide the outcome, the constraints and what “done” means. Agree on these first, in writing:

  • Outcome: what should be true when the work is finished, in business terms.

  • Constraints: the systems, environments, files and data the agent may touch, and those it must leave alone.

  • Evidence of completion: the tests, checks or examples that will show the outcome was reached.

  • Assumptions: what you believe about the current setup, stated so the agent can confirm or challenge it before building on it.

  • Delegated decisions: the choices the agent may make alone, such as naming or test data, and those that stay with you, such as the data model, the choice of tool or anything users will see.

  • If blocked: what the agent should do when the requested approach is unavailable: stop and report, propose alternatives, or use a fallback you have named.

Our article on giving a coding agent a usable brief shows how to turn these points into lasting project rules.

Involve people when their judgment matters

A checkpoint is a planned stop before a consequential decision, not a stop at every step. Useful moments include:

  • Direction: before a choice that shapes the rest of the work or is hard to reverse, such as the data model, the choice of tool or a change to production.

  • New information: when a missing field, a conflicting rule or a failed assumption changes the assignment.

  • Outside the delegation: before any action the agreed delegation does not cover.

At each checkpoint, the agent should present the decision and the consequence of each option. “Should I continue?” invites an automatic yes. “The validation rule rejects the test data: should I fix the data or relax the rule?” invites judgment.

Permissions determine what an agent can do; checkpoints determine what it may decide independently. An agent allowed to deploy to a test environment can still be required to stop before it changes the data model. Between checkpoints, the agent works on its own, as Anthropic’s guidance on building effective agents also describes.

Make the work understandable and traceable

You should not have to read every command to understand what happened. At each checkpoint and at the end of a run, ask the agent for a readable account of the important choices it made and why, what it changed and where, and what it did not do or could not confirm.

Keep the underlying record as well: the original request, the approvals given, the actions taken and the execution evidence, such as test results or deployment IDs. The readable account tells you where to look, and the record lets you confirm it. The record shows that a change happened, not that it works.

Report every piece of work in one of three states:

State

What it means

Evidence

Proposed

The agent has described a change. Nothing has run.

A plan or diff you can review

Executed

The change has been applied in a named environment.

Command output, a deployment ID, the changed data

Verified

Someone has checked the result against the objective.

Test results, a reviewed scenario, an acceptance decision

An agent’s “done” often means executed, not verified. Keeping the states apart extends the traceability chain our implementation guide describes, from business need to acceptance decision.

Verify outcomes and prepare intervention

Turn the evidence of completion from your brief into tests before the agent starts. Tests written after the work can check what the agent built instead of what you decided. For code, prepare automated tests the agent can run as it works. For work that needs human judgment, such as a text, a design or a process change, write the checks a person will make by hand.

When the agent finishes, run every test and check to decide whether the work meets the outcome you set.

Before a long or unattended run, decide how you would intervene:

  • Stop: know how to interrupt the agent, and set limits such as a maximum duration or number of attempts.

  • Revoke: give the agent credentials of its own, such as a separate account or access token for a test environment, so you can withdraw them without affecting yours.

  • Restore: keep code and configuration in version control and deploy from it, so you can revert a change and deploy again.

Some consequences cannot be restored. An email sent to customers, a data update that triggered an integration and data deleted without a backup stay done. For these, put the control before the action: a test environment first, a checkpoint, or no permission at all.

Successful autonomy means the agent executes within boundaries you understand, leaves evidence you can check and gives you real opportunities to intervene before consequences become permanent.

Start with one recurring task. Write down its delegation, set its permissions and checkpoints, and confirm you could explain, verify and undo the result. People can delegate more work when they can understand and govern it.