Coco

Uninstalling

Removing the hook, removing the gate, and why the ledger is kept by default.

Uninstalling

This is the npx road. On the SDK road there is nothing installed to remove, so stopping means taking the check out of your harness, or pointing the gate's mode back at observe so it records and stops nothing.

npx @trustcoco/guardrails uninstall

That removes the PreToolUse hook from ~/.claude/settings.json and leaves every hook it did not write exactly as it was. Restart Claude Code afterwards.

The gate, the contracts and the ledger stay on disk, so reinstalling picks up the contracts you had rather than the ones that shipped.

Removing the files too

npx @trustcoco/guardrails uninstall --purge
npx @trustcoco/guardrails uninstall --purge --purge-ledger

--purge removes the gate and the contracts under ~/.coco. The ledger survives it, and --purge-ledger is a second flag because deleting it is a second decision.

The ledger is kept by default. It is the record of what happened while the gate was running, and deleting the evidence on uninstall is the wrong default for the customer who most needs it.

If the record has to outlive the machine, take it before any purge. The ledger is one SQLite file at ~/.coco/ledger.db, so copying that file whole preserves the chain and everything coco verify checks, and coco ledger --json exports the rows for anything downstream.

Turning enforcement off without uninstalling

Usually the right move. Set the mode back to observe in ~/.coco/config.json and restart.

{ "mode": "observe" }

Nothing is lost, decisions keep recording, and the ledger keeps telling you what enforce would have done. A contract that blocked something legitimate is a drafting problem, and Modes covers how to find it without turning the gate off.

On this page