An audit subagent that tests a tool with bad input can leave real side effects
PitfallVerified 30 Sep 2026Holds anywhere
Pitfall. The symptom, what causes it, and the fix that was run and seen to work.
Symptom#
After a repository audit, a stray file or note exists outside the repository. For example, an audit agent ran refs.py note nokey, and the tool wrote a note for the nearest-matching paper in ~/.cache/paper-refs/notes/.
Cause#
The tool picked the nearest title instead of stopping with an error for an unknown key. The audit agent had no reason to expect a write.
Fix#
After an audit, check and clean up what its agents wrote. Make such a command stop with an error on an unknown key.
Evidence#
Observer note, 2026-09-30, skills-repo audit: the stray note was deleted by hand.
Also found by searching
- after a repo audit a new file appeared in ~/.cache/paper-refs/notes/ that nobody created on purpose
- an audit subagent probing a CLI with a bogus argument actually wrote data outside the repository
- how do I check and clean up side effects after letting subagents test tools with invalid input
- refs.py note with unknown key fuzzy-matched a paper and wrote a note instead of erroring
- after audit subagent ran, a note appeared in ~/.cache/paper-refs/notes that I never made
- audit agent tested my CLI with a bogus key and it wrote a file anyway, nearest match
- refs.py note nokey created a note for the closest paper title instead of erroring