Random thought: what about spec'ing an anti-agent that runs in parallel and drafts evil plans to break your codebase (leak secrets, delete tests, etc.)
then we check the regular agent's work against the hallucinations of the anti-agent
if any semantic overlap: we flag