Terraphim
v1.16.0
Terraphim

Guarding OpenCode with Destructive Command Guard

17 Apr 2026 4 min

AI coding assistants are fast, productive, and occasionally catastrophic. One misplaced rm -rf, one accidental git reset --hard, and hours of uncommitted work vanish.

Jeffrey Emanuel (@Dicklesworthstone) built Destructive Command Guard (dcg): a Rust binary with SIMD-accelerated pattern matching, 49+ security packs, and a fail-open design. It is one of the best tools to come out of the AI agent safety space, and it solved a problem we had been fighting with regex hacks.

This post shows how we integrated dcg with OpenCode using its plugin hook system, so destructive commands are intercepted before they run.

Read More
Technical