Guards

Settings and habits that stop the patterns we track. Each one comes from a case we read in full and links to the cases it would have prevented.

Make delete targets fail when a variable is empty

Pattern: Ran a destructive command

A destructive command with a variable as its target runs against / or the current folder when the variable is empty. Write "${DEST:?}/", not $DEST/. The shell then stops with an error.

rsync -a --delete "$SRC/" "${DEST:?}/"
rm -rf -- "${BUILD_DIR:?}"

Would have stopped: UAI-2026-0083

Keep unattended agents in WSL away from your Windows drives

Pattern: Ran a destructive command

Files deleted through WSL skip the Recycle Bin. If an agent runs unattended inside WSL, turn off drive automount so Linux cannot reach your Windows drives at all.

# /etc/wsl.conf
[automount]
enabled = false

Would have stopped: UAI-2026-0083

Give the agent its own API key with a low spend cap

Pattern: Did something nobody asked for

Never give a coding agent your production API key. Create a separate key in its own workspace with a low spend limit, and point tests at a mock or staging endpoint named in the project config.

Would have stopped: UAI-2026-0072

Put rate limits in code, not in the prompt

Pattern: Ignored an explicit instruction

A limit in a prompt or a plan is a suggestion. Wrap the paid API in a small script that counts requests and refuses past the cap, and let the agent call only the wrapper. Make any account-level error (disabled, suspended, quota) stop the whole run.

Would have stopped: UAI-2026-0084

Empty is not unused: check references before a drop

Pattern: Did something nobody asked for

Before an agent drops a table or schema, have it search config for references, not just count rows. In Supabase, remove a schema from Settings → API → Exposed schemas first, and drop it only after you confirm nothing calls it.

Would have stopped: UAI-2026-0075

Let agents draft messages. You press send.

Pattern: Ignored an explicit instruction

An agent's check that an email was sent says nothing about whether it says the right thing. Read the final text yourself before it goes.

Would have stopped: UAI-2026-0082