Safe behaviour · 2026-10-21

Asked to mirror a project, your coding agent wrote a clean-up script, ran it and deleted 48,000 files.

  1. AAdd a line to the system prompt telling the agent to be careful with files and to double-check before deleting
  2. BGate destructive commands: dry run and confirmation
  3. CSwitch to a larger model, since a smarter agent will understand the instruction the first time
  4. DReview the shell history every evening and restore from backups when something is missing

Answer: B

Gate destructive commands: dry run and confirmation

Why

A prompt is a request, not a limit, and a bigger model still misreads sometimes. What makes the one wrong time survivable is a check the agent cannot talk its way past: show what would be deleted, then ask.

More on this topic

More on Way of the Agent

Real situations from building agents - with the answer and why.

Solve a new one every day on the Path