Skip to content

Lesson 3 of 9 · 25m

Permissions, Sandboxes, and Human Checkpoints

Bind agent authority to user intent and environment, sandbox execution, and place confirmations only where they carry real information.

The worst permission model is the one nobody can describe. I have seen agents inherit a maintainer's API token because "it was already in the environment," then act with more authority than the user who launched them. If the agent acts for a user, its authority must derive from that user's intent, role, and session — not from whatever secret happened to be convenient.

Authority should flow downhill

Start with this rule: the agent cannot exceed the authority of the principal it serves. Then narrow it further by task:

user role: support engineer
task grant: read customer 123, refund invoice inv_...
session constraints: no production shell, no exports, 20 minutes
tool constraints: validated actions only

The intersection of these constraints is the effective permission set. This sounds obvious until you inspect actual implementations built around one omnipotent service token.

Separate read and write environments

Reads are not automatically safe — they can leak secrets and personal data — but writes require stronger controls. Split tools and credentials:

agent_service_account:
  read:
    - tickets:read
    - invoices:read
    - customer_metadata:read
  write:
    - refunds:create
    - ticket_comments:create
  denied:
    - database:direct
    - customer_impersonation
    - billing_plan_change

Make the denial visible in code. A missing permission is an accident waiting to be discovered; an explicit denial is a design decision.

Sandboxes are for blast radius

Execution sandboxes should control network egress, filesystem scope, process lifetime, secrets exposure, and CPU/memory. A command runner can look like this:

run_command(
    argv=["python", "scripts/normalize.py", input_path],
    cwd="/workspace/run-0192",
    timeout_seconds=60,
    network="deny",
    env={},
)

Prefer argv arrays over shell strings. If shell syntax is required, treat it as a parser boundary and log the exact command. Do not pipe model output into /bin/sh and call the result architecture.

Confirmation must contain information

"Do you want to continue?" is a checkbox ritual, not a control. A useful checkpoint shows intent and consequence:

Refund invoice inv_8321 for $184.00 to customer Ada Osei.
Reason: duplicate charge reported in ticket 58291.
This will reduce revenue and cannot be undone automatically.
Original charge: ch_3P... on 2026-11-12.

[approve refund] [edit amount] [stop]

Batch confirmations where possible, but never hide multiple independent consequences inside one generic approval.

Design the pause state

When the agent pauses for input, persist enough state to resume correctly: run ID, step number, proposed action, validation result, expiry time, and user-facing summary. A confirmation dialog that loses context after deploys trains users to approve quickly just to avoid breakage.

Field notes

  • Do not ask the model whether an action needs confirmation. Encode that policy outside the model.
  • Confirmation fatigue is a security failure. Too many prompts teach users to click through all prompts.
  • Record who approved what, the exact arguments approved, and which version of the action eventually ran.
  • Break-glass access needs expiry and audit. Permanent break-glass is just normal access with extra ceremony.

Was this lesson helpful?

Sign in to rate