Classify every tool your agent can call by risk, run low-risk actions automatically, and require a human approval before any high or critical action (sending messages, deleting data, running built shell commands, pushing to production). The table below makes that decision once, so you can reuse it each time you add a tool.
Which actions need a human approval?
Anything you cannot undo needs one. Classify each tool in this table before you add it to the agent. If a tool's blast radius is unclear, treat it as Critical until you understand the downstream effects.
| Tool / action | Reversible? | Blast radius | Risk level | Approval required |
|---|---|---|---|---|
| Read a file or directory listing | Yes | None | Low | No, run automatically |
| Fetch data from a read-only API | Yes | None | Low | No, run automatically |
| Write or update a local file | Partial (if backed up) | Single file | Medium | Soft confirm (log and continue unless --dry-run) |
| Create or update a database record | Partial (if snapshotted) | Single record | Medium | Soft confirm |
| Send an email or Slack message | No, the message is delivered | Recipient inbox | High | Human approval required |
| Delete a file or database record | No (without backup) | Single item | High | Human approval required |
| Execute a shell command built from agent output | No | Arbitrary | Critical | Human approval, command displayed before execution |
| Push code to a production branch | No | Production system | Critical | Human approval required |
| Call an external API that bills per request | Partial (request sent; can refund) | Billing, side effects | High | Soft confirm with per-job budget guard |
| Revoke or rotate a credential | Partial (re-issue) | All services using it | Critical | Human approval required |
Which Figment Mac plan runs an approval-gated agent?
The Intel Mac VM ($25 a month, $2 a day, $0.15 an hour) is enough for an orchestration agent that calls external APIs, manages files and triggers CI. It has 4 shared vCPUs, 4GB of RAM and an 80GB SSD, runs macOS Sequoia, and makes outbound connections to any approval channel. You reach it over SSH, encrypted remote desktop or the browser, with administrator access to your own VM. Run the agent from a terminal session, or register an outbound GitHub Actions self-hosted runner that the agent job targets.
Pick a different plan when the work changes:
- Apple Silicon Mac VM ($39 a month, $6 a day): the agent calls arm64-only binaries or macOS tools that need Apple silicon. It has 4 shared vCPUs and 4GB of RAM.
- Dedicated M4 Pro 48 GB ($349 a month, or $299 a month on a 12-month term): the actions are heavy, or you want the whole Mac to yourself (M4 Pro, 48GB RAM, 512GB SSD) so an agent with real credentials shares no hardware.
Figment runs the Mac and network layer. Your agent code, approval scripts, CI and third-party accounts are yours to manage.
How do I gate a GitHub Actions job behind an approval?
Use a protected environment with required reviewers on the job that performs the high-risk phase. This is documented in GitHub's managing environments guide. If the job runs on a self-hosted runner on your Mac, also follow GitHub's hardening guidance for self-hosted runners: self-hosted runners are not ephemeral by default and should only run trusted code.
# .github/workflows/agent-with-approval.yml
jobs:
plan:
runs-on: [self-hosted, macOS]
outputs:
action_plan: ${{ steps.plan.outputs.plan }}
steps:
- id: plan
run: python3 agent_planner.py --output plan.json
- run: cat plan.json # Reviewers see the planned actions
execute:
needs: plan
runs-on: [self-hosted, macOS]
environment: production-approval # requires a named reviewer to approve
steps:
- run: python3 agent_executor.py --plan plan.json
Configure production-approval in Settings → Environments: add required reviewers (up to six), optionally prevent self-approval, and set a wait timer that suits your team. Environment-specific secrets (API keys, deploy tokens) are injected only after approval. When execute is reached, GitHub pauses the workflow and notifies reviewers, who see the plan.json output from the previous step before approving. GitHub's UI option names change, so check the linked guide against what you see.
How do I gate an agent that launchd starts directly on the Mac?
Put an approval gate script in front of each high-risk action. The script prints what needs approval, then waits for an approve or deny signal file until a timeout expires.
#!/bin/bash
# approval_gate.sh
# Usage: ./approval_gate.sh "ACTION_DESCRIPTION" TIMEOUT_SECONDS
set -euo pipefail
DESCRIPTION="${1:-Approve action}"
TIMEOUT="${2:-300}"
GATE_DIR="/Users/agent/approvals"
LOG="/Users/agent/logs/approvals.log"
mkdir -p "$GATE_DIR" "$(dirname "$LOG")"
TOKEN="$(date +%s)_$$_$RANDOM"
APPROVE_FILE="$GATE_DIR/approve_${TOKEN}"
DENY_FILE="$GATE_DIR/deny_${TOKEN}"
echo "$(date -u +%FT%TZ) APPROVAL REQUIRED: $DESCRIPTION" | tee -a "$LOG"
echo " -> touch '$APPROVE_FILE' to approve"
echo " -> touch '$DENY_FILE' to deny"
# Notify the operator via a Shortcut you have pre-built in Shortcuts.app.
shortcuts run "Alert: Approval Required" 2>/dev/null || true
elapsed=0
while [ "$elapsed" -lt "$TIMEOUT" ]; do
if [ -f "$APPROVE_FILE" ]; then
echo "$(date -u +%FT%TZ) APPROVED: $DESCRIPTION" >> "$LOG"
rm -f "$APPROVE_FILE" "$DENY_FILE"
exit 0
fi
if [ -f "$DENY_FILE" ]; then
echo "$(date -u +%FT%TZ) DENIED: $DESCRIPTION" >> "$LOG"
rm -f "$APPROVE_FILE" "$DENY_FILE"
exit 1
fi
sleep 5
elapsed=$((elapsed + 5))
done
echo "$(date -u +%FT%TZ) TIMEOUT: $DESCRIPTION" >> "$LOG"
exit 1
The macOS Shortcuts command line runs a Shortcut you build once in Shortcuts.app. shortcuts run "Alert: Approval Required" sends a notification, and the operator responds by touching the approve or deny file from any terminal session on the Mac. Call the gate from the agent loop for every High and Critical action:
import subprocess
def require_approval(description: str, timeout: int = 300) -> None:
result = subprocess.run(
["/Users/agent/scripts/approval_gate.sh", description, str(timeout)],
check=False,
)
if result.returncode != 0:
raise RuntimeError(f"Action denied or timed out: {description}")
What happens when nobody answers?
The action does not run. A denial and a timeout both exit with code 1, and each is logged.
| Outcome | Agent behaviour | Logged |
|---|---|---|
| Approved within timeout | Execution continues | Yes, APPROVED with timestamp |
| Denied by operator | RuntimeError raised, exit 1 | Yes, DENIED with timestamp |
| Timeout expires | Exit 1; launchd retries on next interval | Yes, TIMEOUT with description |
| Operator unreachable | Timeout fires after configured seconds | Yes, treated as timeout |
Do not set timeouts longer than your acceptable blast-radius window. A "delete database records" action with a 24-hour approval window defers damage, it does not prevent it.
What should the audit trail contain?
Every approval decision must be durable:
- Write every APPROVED, DENIED and TIMEOUT line to a log outside the agent's working directory, so a failing job cannot truncate its own evidence.
- Include the action description verbatim, the UTC timestamp and the approver identifier. For GitHub Actions, the reviewer's login appears on the workflow run.
- Rotate
approvals.logmonthly and retain at least 90 days. - Scan the log weekly for TIMEOUT lines. Repeated timeouts mean the notification path is broken or the window is too short.
- Keep a copy of the log off the Mac. Figment does not back up your Mac, so your own copy is the audit store.
Where do I start?
Start with the GitHub Actions environment gate if your agent already has a CI workflow, and use the local gate script for launchd-scheduled agents. Both run on the Intel Mac VM. Compare the Mac hosting plans and move to an Apple silicon plan only when the actions need it.
Related reading