When an AI coding agent does something it shouldn't
The short answer
When an agent takes a harmful action (a bad push, a deleted file, a leaked secret), respond in five steps: contain it, find out exactly what happened from the signed record, assess the impact, remediate and add a rule so it can't happen again. The step that makes the rest possible is having a signed record before the incident; you cannot investigate what was never recorded.
The checklist
- Contain. Switch the rule to Block, or disconnect the computer in your workspace. Then rotate any exposed keys.
- Find out what happened. Read the signed records in your workspace's Activity to see the exact actions, decisions and timing.
- Assess impact. Which systems, which data, which branches. The record's action detail shows how far it reached.
- Remediate. Revert the change, rotate leaked secrets, restore from backup as needed.
- Prevent a repeat. Add or tighten a rule and switch it to Block, so the action is stopped before it runs next time.
Good to know
What this does not do
Scopebond helps you contain (Block and disconnect), investigate (a record you can check) and prevent (a rule); it does not undo an action that already happened or replace your backup and key-rotation steps. A signed record shows decisions, not the real-world fix.
Alternatives
- Reconstructing from ad-hoc logs — editable logs are a claim; a signed record is evidence you can check.
- Manual review after the fact — catches nothing in real time; a rule blocks the action before it runs.
Questions
Can Scopebond undo what the agent did?
No. It helps you contain, records what happened for the investigation and lets you add a rule to prevent a repeat; reverting and restoring are your normal procedures.
What if we had no record?
Then the investigation is guesswork. Install Scopebond now so the next incident has a record to work from.