doctor command — it automates most diagnostics and will catch the majority of configuration problems in one pass.
Run Diagnostics First
doctor command runs a comprehensive health check of your installation:
| Check | What It Does |
|---|---|
| Hook Integration | Verifies the plugin is properly configured for each supported platform |
| Self-Test | Runs sample commands to confirm blocking is working correctly |
| Configuration | Validates custom rules in your user and project config files |
| Environment | Shows the status of mode flags (CC_SAFETY_NET_STRICT, CC_SAFETY_NET_PARANOID, etc.; legacy SAFETY_NET_* also listed when set) |
| Recent Activity | Summarizes blocked commands from the last 7 days |
| System Info | Displays versions of all relevant tools |
| Update Check | Checks whether a newer version is available |
Common Issues
Hook not firing — commands execute without being checked
Hook not firing — commands execute without being checked
If you run a command that should be blocked and it executes without any intervention, the hook is not registered correctly for your agent.Steps to resolve:
- Run
npx cc-safety-net doctor— it checks hook integration for each supported platform and will flag misconfiguration. - Claude Code: run
/plugininside Claude Code and confirm thatsafety-netappears in the installed plugins list. If it doesn’t appear, reinstall with/plugin install safety-net@cc-marketplace. - Codex: open your
~/.codex/config.tomland verify thatplugin_hooks = trueis set under[features]. Then run/hooksin the TUI, select the safety-net PreToolUse hook, and presstto mark it as trusted. Without the trust step, the hook will not fire. - After making any changes, reload your agent session.
A destructive command wasn't blocked
A destructive command wasn't blocked
If a command you expected to be blocked was allowed through, there are a few possible explanations.Steps to resolve:
- Run
npx cc-safety-net explain "<the command>"to see the full step-by-step analysis of how CC Safety Net evaluated that specific command. This will show you exactly which rules were checked and why the command was allowed. - The command may fall into an explicitly allowed category. For example,
rm -rfwithin the current working directory is allowed by default because it’s scoped to your project. See the Commands Allowed reference for the full list. - If you need the command blocked in your context, create a custom rulebook with
npx -y cc-safety-net rule initand add a rule to.cc-safety-net/rules/project-rules/rulebook.json. See Custom Rules for the schema. - If you believe the command should have been blocked by a built-in rule and wasn’t, share the output of
npx cc-safety-net doctor --jsonwhen filing a bug report.
CC Safety Net is blocking a command I need
CC Safety Net is blocking a command I need
Built-in rules are conservative by design. If a command you need is being blocked, you have several options.Steps to resolve:
- Run
npx cc-safety-net explain "<the command>"to understand exactly why it’s being blocked and which rule matched. - Consider these alternatives depending on your situation:
- Working in a linked git worktree? Set
CC_SAFETY_NET_WORKTREE=1. This relaxes local-discard rules when the command is proven to run inside a linked worktree, which is designed to be a disposable, isolated workspace. - Need a safer variant? For example,
git push --force-with-leaseis allowed and provides the same outcome as--forcewith an added safety check.git clean -n(dry-run) is allowed and lets you preview what would be removed. - Command is genuinely needed? Run it manually outside the agent. This is always an option, and CC Safety Net will tell the agent to ask you to do exactly this when a block fires.
- Working in a linked git worktree? Set
- If none of the above apply, you can add a custom allow path by structuring the situation so the agent asks you to run the command directly.
Custom rules not loading
Custom rules not loading
Rulebook-backed custom rules fail closed when configured rulebooks cannot be loaded safely. If your rulebook has any problem, commands stay blocked until it’s fixed.Steps to resolve:
- Run
npx -y cc-safety-net rule verifyto validate rulebook structure, andnpx -y cc-safety-net rule testto run every fixture. These commands surface the exact errors. - Check that you’re using the correct file locations:
- User scope:
~/.cc-safety-net/rules/rule.json(created withrule init --global) - Project scope:
.cc-safety-net/rules/rule.jsonin your project root
- User scope:
- Ensure both
rule.jsonand your rulebook JSON files are valid JSON. Common mistakes include trailing commas and unquoted keys. - Confirm that
"version": 1is present inrule.jsonand"rulebook_version": 1is present in eachrulebook.json. Both fields are required. - If you previously used the legacy inline config (
.safety-net.jsonor~/.cc-safety-net/config.json), runnpx -y cc-safety-net rule migrateto convert it to the new layout. Legacy files with rules cause commands to fail closed until migrated. - After making changes to rulebook sources, run
npx -y cc-safety-net rule syncto rebuild the lock and cache, then re-runrule verifyandrule test.
Status line not showing in Claude Code
Status line not showing in Claude Code
The status line requires an entry in
~/.claude/settings.json. If it’s not appearing, the entry is likely missing, malformed, or pointing to the wrong runtime.Steps to resolve:- Open
~/.claude/settings.jsonand verify thestatusLineentry is present. It should look like one of the following: - Changes to this file take effect immediately — you do not need to restart Claude Code.
- If you’re using the
claude xvariant, note that it is only compatible with the native version of Claude Code. If you installed Claude Code via npm, usenpxorbunxinstead. - Test the status line command directly in your terminal to confirm it produces output:
If this command fails, the status line will be blank inside Claude Code.
Getting an update
Getting an update
CC Safety Net should be kept up to date to get the latest blocking rules and bug fixes.Claude Code (plugin marketplace):Go to npm / npx:If you’re invoking CC Safety Net via If you have a local install, update it with your package manager.Check your current version:
/plugin → select Marketplaces → choose cc-marketplace → enable auto-update. Alternatively, re-run the install command to pull the latest version:npx, use the @latest tag to always run the newest version:Getting Help
If you’re unable to resolve an issue with the steps above, collect the full diagnostic output before filing a report:--json flag produces structured output that captures your environment, installed versions, hook configuration, and self-test results in a single snapshot. Include this output when opening an issue on GitHub.