Should you add it to your coding agent?
Add dcg when a command-pattern check would help protect valuable working files and you can verify its behavior in the client you use. Keep recoverable copies and restrict the credentials available to the agent. The reason is concrete: the README documents a bypass that disables protection for one invocation, plus allowlists and hook removal.
Destructive Command Guard is a Rust safety hook for AI coding agents that blocks destructive shell, Git, and filesystem commands. That describes its documented purpose; our sandbox run did not independently measure how reliably it detects destructive commands.
What our recorded sandbox run establishes
Our run on October 4, 2026 tested commit 2259375 in our sandbox. Install completed in 45 seconds, build in 527 seconds, and cargo test in 608 seconds. All three commands returned exit code 0 without timing out. The harness stores command status, exit code, elapsed time, timeout status, and parsed test summaries separately, so command completion and parser totals answer different questions.
The attached stored parser summaries report 6,760 passed, 0 failed, and 6,760 total. These are historical parser aggregates, not verified unique or exhaustive test counts: the retained output repeats Cargo summaries before and after a replay marker, so suites may have been counted more than once. We have preserved the stored figures rather than recalculating them from the excerpt.
The retained doctest footer also records ignored cases. Those cases were not failures, and the attached aggregate skipped-test field is unknown. The successful command does not establish that every available test or optional integration ran.
This was an existing recorded execution, not a new run for this correction. The supplied sandbox had 3 CPUs, 12 GB of memory, and image lab-rust:1. We did not establish live agent enforcement, production detection accuracy, runtime latency, cloud or database workload behavior, or native Windows compatibility. No dependency audit result or scanned-package coverage is recorded, so this run supplies no security clearance.
The MrKeyoor testing methodology explains how command outcomes and parsed counts reach a review. That page provides provenance context; its current procedure does not establish which methodology version governed this older run.
Installation does not enable every protection
The README at the measured commit distinguishes no-config defaults from a generated starter configuration. Ordinary Unix defaults include core filesystem, core Git, and system disk packs. Database and container packs are opt-in. Running the documented initializer creates a starter configuration with examples, which is a different state from having no configuration file.
That distinction should guide setup: identify the resources your agent can affect, then enable and check the relevant packs. A list of available cloud or database rules does not mean those rules are active in your installation.
The current README also describes behavior beyond the measured checkout, including automatic Windows-pack activation for recognized Cmd or PowerShell requests on other hosts. Those current documentation claims should not be read as results from our October 4 run.
Check the effective decision and client protocol
The measured-commit README says core packs always participate in evaluation, but their matched rules can still be relaxed through policy. Broad policy settings and individual critical-rule settings behave differently. Inspect the resolved decision before relying on a configuration change; a pack being present does not by itself establish that every match will be denied.
Client coverage also needs qualification. The README lists Codex CLI 0.125.0+ as a hook target, Aider as limited to Git hooks, and Continue as detection-only. For Codex, it documents a denial returned as minimal JSON on stdout while the hook process itself exits successfully. A zero exit status therefore needs to be interpreted within the protocol, rather than treated as an allow decision.
Before using dcg on important work, verify both an allowed command and an expected denial in a disposable workspace through the actual agent client. Check the returned decision and whether execution stops. This is a recommended next step, not a validation completed by our recorded run.
Choose alternatives by where you need protection
Shellfirm challenges risky commands in an interactive shell and provides separate agent hooks. Its README describes confirmation challenges for terminal users and denial behavior for risky agent commands. Consider it as a replacement candidate when interactive shell protection and shared shell-and-agent policy are your main requirements. It also documents detection limits and explicitly describes itself as protection against mistakes rather than a sandbox; we have not compared its accuracy with dcg.
Harden-Runner provides security monitoring tailored for CI/CD runners. Its documentation describes network, file, and process events associated with workflow steps. Consider it a complement when your concern includes CI activity beyond destructive command strings. It serves a different role from a local coding-agent hook. Its free Community tier applies to public repositories on GitHub-hosted runners; private repositories and self-hosted runners require Enterprise under the supplied documentation.
Codex CLI is the coding agent itself. The supplied Codex README establishes that role but does not substantiate the earlier page's detailed comparison of sandbox and approval controls. It therefore does not support recommending Codex as a replacement command guard here.
How to read the ratings
These are editorial ratings, not measured accuracy or security scores. The scale is 1 for a documented obstacle that prevents ordinary use, 2 for substantial friction, 3 for workable use with material limits, 4 for strong supporting evidence with remaining checks, and 5 for unusually complete evidence within the stated dimension. A dimension without enough evidence would remain unassessed.
Setup ease remains 4: our source setup succeeded, and installers are documented, but client enforcement and pack policy still need checking. Documentation remains 5 for its explicit treatment of defaults, policy exceptions, bypasses, and client protocols; that rating does not validate every documented feature. Community remains 4 for visible repository attention and recent maintenance signals. The supplied GitHub snapshot reports 6,234 stars and a last push on October 30, 2026, which establishes attention and activity rather than adoption or support quality. Maturity remains 4 for the successful recorded build and test command plus documented integration detail, with detection accuracy and live deployment behavior still unverified.
The supplied GitHub metadata reports the license as NOASSERTION. Read the actual license terms before deciding whether distribution or organizational use meets your requirements.

