Skip to content

Hook Gates

These gate IDs appear in terminal output as BLOCKED [H-xx]: <message> (a blocking hook, exit 2) or REMINDER [H-xx]: <message> (an advisory hook, exit 0). This page is generated at build time directly from the block()/remind() call sites in plugins/ca/hooks/*.py, so it can never drift from what a hook actually prints.

A `{placeholder}` shown in a message is an f-string interpolation — the hook fills it in with a run-time value (a file path, a branch name, a count) when it actually fires.

Blocking

Event(s): PreToolUse (Bash|PowerShell), PreToolUse (Edit|MultiEdit|NotebookEdit), PreToolUse (Write)

pre-bash guard crashed while scanning this command — failing closed (ORCHESTRATOR §2) rather than silently allowing an unscanned command. See the traceback above; retry, or report it.

— pre-bash.py:68

pre-edit guard crashed while scanning this Edit — failing closed (ORCHESTRATOR §2) rather than silently allowing an unscanned edit. See the traceback above; retry, or report it.

— pre-edit.py:287

pre-write guard crashed while scanning this Write — failing closed (ORCHESTRATOR §2) rather than silently allowing an unscanned write. See the traceback above; retry, or report it.

— pre-write.py:210


Blocking

Event(s): PreToolUse (Bash|PowerShell), git backstop

branch state could not be determined (git unavailable or timed out) — failing closed (ORCHESTRATOR §2). Retry, or verify you are not on main/master before committing/pushing.

— _bashguardlib.py:2157

HEAD’s protected-branch-tip state could not be determined (git unavailable or timed out) — failing closed (ORCHESTRATOR §2). Retry, or verify HEAD before committing.

— _bashguardlib.py:2168

Direct commit to {target} is prohibited (ORCHESTRATOR §3). Create a feature branch.

— _bashguardlib.py:2198

‘git push —all’ / ‘—mirror’ publish every local ref (including main) (ORCHESTRATOR §3) — main moves only via a merged PR. Push an explicit feature refspec.

— _bashguardlib.py:2227

Pushing to a protected branch (‘{tok}’) is prohibited (ORCHESTRATOR §3) — main moves only via a merged PR.

— _bashguardlib.py:2239

Bare git push from main/master publishes the protected branch (ORCHESTRATOR §3) — main moves only via a merged PR.

— _bashguardlib.py:2245

‘git -C {cwd}’ does not resolve to an existing directory — failing closed (ORCHESTRATOR §2). Verify the -C target exists before committing/pushing.

— _bashguardlib.py:3026

branch state could not be determined (git unavailable or timed out) — failing closed (ORCHESTRATOR §2, #161 git backstop).

— git-enforce.py:250

HEAD’s protected-branch-tip state could not be determined (git unavailable or timed out) — failing closed (ORCHESTRATOR §2, #161 git backstop).

— git-enforce.py:257

Direct commit to {target} is prohibited (ORCHESTRATOR §3) — this is the git-level backstop (#161). Create a feature branch.

— git-enforce.py:262

Pushing to a protected branch (‘{rref}’) is prohibited (ORCHESTRATOR §3, #161 git backstop) — main moves only via a merged PR.

— git-enforce.py:373


Blocking

Event(s): PreToolUse (Bash|PowerShell), git backstop

Force-push is prohibited (ORCHESTRATOR §3).

— _bashguardlib.py:2222

Force-push / non-fast-forward update is prohibited (ORCHESTRATOR §3, #161 git backstop).

— git-enforce.py:382


Blocking

Event(s): PreToolUse (Bash|PowerShell)

‘git add -A’ / ‘git add .’ / ‘git add —all’ / ‘git add -u’ are prohibited. Stage files explicitly (commit-gate skill).

— _bashguardlib.py:2259

Wildcard staging is prohibited — {why} stages a non-explicit file set. Stage files explicitly, one path per file (commit-gate skill).

— _bashguardlib.py:2263


Blocking

Event(s): PreToolUse (Bash|PowerShell), PreToolUse (Edit|MultiEdit|NotebookEdit), PreToolUse (Write)

The .codearbiter audit logs (overrides.log, triage.log, sprint-log.md, gate-events.log, decisions/decision-log.md) are append-only (ORCHESTRATOR §7). Truncating, overwriting, or deleting the audit trail is prohibited. Use one tail-anchored Edit, or a shell-native UTF-8 no-BOM append: PowerShell 5.1 [IO.File]::AppendAllText(, , (New-Object Text.UTF8Encoding($false))); PowerShell 7 Add-Content -LiteralPath -Value -Encoding utf8NoBOM; Git Bash printf ‘%s
’ >> .

— _bashguardlib.py:2389

MultiEdit cannot guarantee a pure append to an append-only .codearbiter audit log (overrides.log, triage.log, sprint-log.md, decisions/decision-log.md) (ORCHESTRATOR §7).

— pre-edit.py:178

An Edit with replace_all=true on an append-only .codearbiter audit log (overrides.log, triage.log, sprint-log.md, decisions/decision-log.md) cannot be a verifiable pure append (ORCHESTRATOR §7) — replace_all rewrites every matching occurrence, not just the file’s tail.

— pre-edit.py:189

An Edit with an empty old_string on an append-only .codearbiter audit log (overrides.log, triage.log, sprint-log.md, decisions/decision-log.md) cannot be a verifiable pure append (ORCHESTRATOR §7) — every string starts with the empty string.

— pre-edit.py:202

The .codearbiter audit logs (overrides.log, triage.log, sprint-log.md) are append-only (ORCHESTRATOR §7). This Edit alters existing audit lines; only pure appends are permitted (new text must extend the old text).

— pre-edit.py:207

The .codearbiter audit logs (overrides.log, triage.log, sprint-log.md) are append-only (ORCHESTRATOR §7). This Edit’s old_string is not the file’s current TRAILING content — a mid-file insertion reorders the audit record even though new_string extends old_string.

— pre-edit.py:219

The .codearbiter audit logs (overrides.log, triage.log, sprint-log.md, decisions/decision-log.md) are append-only (ORCHESTRATOR §7); Write would replace history.

— pre-write.py:113

The .codearbiter audit logs (overrides.log, triage.log, sprint-log.md, decisions/decision-log.md) are append-only (ORCHESTRATOR §7). This patch cannot prove a pure append.

— pre-write.py:119


Advisory

Event(s): PostToolUse (Write|Edit)

Dependency manifest changed. Dispatch dependency-reviewer before committing (ORCHESTRATOR §5).

— post-write-edit.py:149


Advisory

Event(s): PostToolUse (Write|Edit)

Crypto/TLS pattern detected. Run the crypto-compliance check + dispatch auth-crypto-reviewer (no MD5/SHA1/DES/3DES/RC2/RC4/Blowfish; do not disable TLS verification). The commit will block until the gate records a pass.

— post-write-edit.py:178


Blocking

Event(s): PreToolUse (Bash|PowerShell), git backstop

the diff for the crypto/secret security scan could not be decoded or read — failing closed (ORCHESTRATOR §2). Repair the reported cause and retry the same scan; a reviewer PASS cannot substitute for an unreadable candidate.

— _bashguardlib.py:2616

the candidate repository root could not be resolved from the Git operation directory; repair Git readability and retry.

— _bashguardlib.py:2623

— _bashguardlib.py:2629

This commit form can absorb unstaged binary content that the standalone override producer cannot bind.

— _bashguardlib.py:2631

No audited binary override is recorded for this exact staged candidate.

— _bashguardlib.py:2644

No security-gate PASS is recorded for this staged candidate.

— _bashguardlib.py:2661

The security-gate marker is unreadable or malformed; repair its filesystem access, then perform the independent review and PASS-only recording again. A PASS cannot override unreadable evidence.

— _bashguardlib.py:2666

The recorded security-gate PASS belongs to a different or legacy worktree, so it cannot cover this commit.

— _bashguardlib.py:2671

This commit form can absorb unstaged content that the standalone producer cannot review.

— _bashguardlib.py:2674

The staged candidate differs from the exact diff independently reviewed and recorded.

— _bashguardlib.py:2677

the staged diff for the crypto/secret scan could not be decoded or read — failing closed (ORCHESTRATOR §2). Repair the reported cause and retry; a reviewer PASS cannot substitute for an unreadable diff.

— git-enforce.py:270

— git-enforce.py:276

No audited binary override is recorded for this exact staged candidate.

— git-enforce.py:282

No security-gate PASS is recorded for this staged candidate (#161 git backstop).

— git-enforce.py:298

The security-gate PASS is unreadable, legacy, or bound to a different worktree (#161 git backstop).

— git-enforce.py:302

The staged candidate differs from the exact diff independently reviewed and recorded (#161 git backstop).

— git-enforce.py:305

{len(uncovered)} sensitive binding(s) changed or were omitted after review (#161 git backstop).

— git-enforce.py:312


Advisory

Event(s): PostToolUse (Write|Edit)

Possible hardcoded secret. Run the secret-handling check before committing. The commit will block until the gate records a pass.

— post-write-edit.py:184


Blocking

Event(s): PreToolUse (Bash|PowerShell), git backstop

No security-gate PASS is recorded for this staged candidate.

— _bashguardlib.py:2661

The security-gate marker is unreadable or malformed; repair its filesystem access, then perform the independent review and PASS-only recording again. A PASS cannot override unreadable evidence.

— _bashguardlib.py:2666

The recorded security-gate PASS belongs to a different or legacy worktree, so it cannot cover this commit.

— _bashguardlib.py:2671

This commit form can absorb unstaged content that the standalone producer cannot review.

— _bashguardlib.py:2674

The staged candidate differs from the exact diff independently reviewed and recorded.

— _bashguardlib.py:2677

No security-gate PASS is recorded for this staged candidate (#161 git backstop).

— git-enforce.py:298

The security-gate PASS is unreadable, legacy, or bound to a different worktree (#161 git backstop).

— git-enforce.py:302

The staged candidate differs from the exact diff independently reviewed and recorded (#161 git backstop).

— git-enforce.py:305

{len(uncovered)} sensitive binding(s) changed or were omitted after review (#161 git backstop).

— git-enforce.py:312


Blocking

Event(s): PreToolUse (Bash|PowerShell), PreToolUse (Edit|MultiEdit|NotebookEdit), PreToolUse (Write)

ADR files under .codearbiter/decisions/ are authored only via /adr and are immutable history (ORCHESTRATOR §6) — shell writes, edits, and deletions there are prohibited.

— _bashguardlib.py:2422

ADR files are edited only via /adr (ORCHESTRATOR §3) — user attribution required.

— pre-edit.py:231

ADR authoring marker is stale (>{MARKER_FRESHNESS_MINUTES} min). Re-run /adr.

— pre-edit.py:234

ADR files under .codearbiter/decisions/ are immutable history (ORCHESTRATOR §6) — deleting one is prohibited, marker or not.

— pre-write.py:128

ADR files are authored only via /adr (ORCHESTRATOR §3) — user attribution required. Subagent-authored ADRs are prohibited.

— pre-write.py:132

ADR authoring marker is stale (>{MARKER_FRESHNESS_MINUTES} min). Re-run /adr.

— pre-write.py:135


Advisory

Event(s): PostToolUse (Write|Edit)

{rel} is governed by ADR-{entry['adr']} ({entry['title']}). If this change contradicts it, route to {get_host().cmd_ref('reconcile')} or {get_host().cmd_ref('adr')} — do not drift silently.

— post-write-edit.py:141


Advisory

Event(s): PostToolUse (Write|Edit)

{rel}: em/en dash used as a prose separator on line(s) {shown}``{more} (anti-slop-design §3.A). Restructure the prose and run the §3.A/§3.B copy self-audit before committing.

— post-write-edit.py:196


Blocking

Event(s): PreToolUse (Bash|PowerShell), git backstop

the file list for the migration scan could not be read (git unavailable or timed out) — failing closed (ORCHESTRATOR §2). Repair the reported Git read failure and retry; a migration-review PASS cannot substitute for an unreadable candidate.

— _bashguardlib.py:2729

the candidate repository root could not be resolved from the Git operation directory; repair Git readability and retry.

— _bashguardlib.py:2736

This commit form can absorb unstaged migrations that the standalone producer cannot review.

— _bashguardlib.py:2752

The migration PASS is missing, unreadable, legacy, or bound to a different worktree.

— _bashguardlib.py:2755

{len(uncovered)} staged migration file(s) changed or were omitted after review.

— _bashguardlib.py:2769

The staged migration set differs from the complete candidate independently reviewed and recorded.

— _bashguardlib.py:2775

the staged file list for the migration scan could not be read — failing closed (ORCHESTRATOR §2). Repair Git readability and retry; a reviewer PASS cannot substitute for an unreadable candidate.

— git-enforce.py:320

The migration PASS is missing, unreadable, legacy, or bound to a different worktree (#161 git backstop).

— git-enforce.py:328

{len(uncovered)} staged migration file(s) changed or were omitted after review (#161 git backstop).

— git-enforce.py:344

The staged migration set differs from the complete candidate independently reviewed and recorded (#161 git backstop).

— git-enforce.py:349


Advisory

Event(s): PostToolUse (Write|Edit)

CI/CD workflow changed. Dispatch security-reviewer before merging (it reviews workflow/secrets/permissions exposure). Advisory — not a commit block.

— post-write-edit.py:156


Advisory

Event(s): PostToolUse (Write|Edit)

Deployment/IaC manifest changed. Dispatch security-reviewer before merging (it reviews exposed ports, public ACLs, disabled encryption, privilege). Advisory — not a commit block.

— post-write-edit.py:163


Advisory

Event(s): PostToolUse (Write|Edit)

Auth/authorization logic detected. Dispatch security-reviewer before merging (authn on every protected route; authz at the right layer). Advisory — not a commit block.

— post-write-edit.py:171


Blocking

Event(s): PreToolUse (Bash|PowerShell), PreToolUse (Edit|MultiEdit|NotebookEdit), PreToolUse (Write)

.codearbiter/CONTEXT.md is the activation switch every enforcement hook reads (#159) — shell rewrites, edits, or deletions that could flip arbiter: enabled off or corrupt its frontmatter are prohibited. This repository is {'initialized' if initialized else 'not initialized'}; continue through {continuation}.

— _bashguardlib.py:2449

This Edit would remove or alter the arbiter: enabled frontmatter in .codearbiter/CONTEXT.md (#159) — the activation switch every enforcement hook reads. Disabling it from inside the repo would make every gate dormant. Keep arbiter: enabled in a well-formed frontmatter block.

— pre-edit.py:162

This Write would remove or alter the arbiter: enabled frontmatter in .codearbiter/CONTEXT.md (#159) — the activation switch every enforcement hook reads. Disabling it from inside the repo would make every gate dormant. Keep arbiter: enabled in a well-formed frontmatter block.

— pre-write.py:92

This patch operation edits or deletes .codearbiter/CONTEXT.md (#159) — the activation switch every enforcement hook reads — and its resulting frontmatter cannot be verified from patch hunks. Failing closed. {recovery}

— pre-write.py:105


Blocking

Event(s): PreToolUse (Bash|PowerShell), PreToolUse (Edit|MultiEdit|NotebookEdit), PreToolUse (Write)

The .codearbiter/.markers/ security-gate-passed / migration-gate-passed tokens are recorded only by the sanctioned gate producers (#160) — a shell redirect, write verb, or interpreter invocation (python/node/perl/ruby/sh) naming a gate marker forges a security/migration gate pass and is prohibited. {guidance}

— _bashguardlib.py:2479

The .codearbiter/.markers/ gate tokens are not editable via the Edit tools (#160) — editing one forges or tampers with a security/migration/ADR gate pass. {guidance}

— pre-edit.py:150

The .codearbiter/.markers/ gate tokens are not writable via the Write tool (#160) — a hand-written marker forges a security/migration/ADR gate pass. {guidance}

— pre-write.py:79


Blocking

Event(s): PreToolUse (Bash|PowerShell)

‘—no-verify’ / ‘-n’ on git commit skips the .git/hooks git-enforce backstop entirely (appsec-002) — every commit-time gate (H-01/H-02/H-09b/H-10b/H-14) would go unenforced for this commit. Remove the flag; use /override for a sanctioned bypass.

— _bashguardlib.py:2184

‘—no-verify’ on git push skips the .git/hooks git-enforce backstop entirely (appsec-002) — every push-time gate would go unenforced for this push. Remove the flag; use /override for a sanctioned bypass.

— _bashguardlib.py:2215


Blocking

Event(s): PreToolUse (Edit|MultiEdit|NotebookEdit), PreToolUse (Write)

The active host adapter failed to load, so this edit’s targets cannot be guarded. Failing closed. Reinstall or repair the plugin’s hooks/_host.py, then retry the same edit; splitting it cannot recover a broken adapter.

— pre-edit.py:116

This edit could not be decomposed into per-file operations, so its targets cannot be guarded. Failing closed. Split it into separate single-file Edit calls; report it if that is not possible.

— pre-edit.py:120

This patch envelope could not be decomposed into per-file operations, so its targets cannot be guarded. Failing closed. Re-issue the change as a plain patch in the documented apply_patch grammar (or split it into smaller single-file patches).

— pre-write.py:65


Blocking

Event(s): PreToolUse (Bash|PowerShell), PreToolUse (Edit|MultiEdit|NotebookEdit), PreToolUse (Write)

‘{rel_path}’ is protected project state (policy={policy.value}) — direct shell replacement is prohibited. {recovery}

— _bashguardlib.py:2532

‘{rel_path}’ is marker-gated protected project state (#564) — a shell redirect or write/delete verb naming it is admitted only under a fresh authoring marker. {recovery}

— _bashguardlib.py:2548

‘{rel_path}’ is protected project state (#564, policy={policy.value}) — shell redirects and write/delete verbs naming it are prohibited outright; there is no marker path for this policy. {recovery}

— _bashguardlib.py:2556

‘{rel_path}’ is protected context state — direct shell replacement is prohibited. {recovery}

— _bashguardlib.py:2570

‘{rel}’ is marker-gated protected project state (#564) — an Edit is admitted only under a fresh authoring marker. {recovery}

— pre-edit.py:254

‘{rel}’ is protected project state (#564) — the Edit tools may never target it; there is no marker path for this policy. {recovery}

— pre-edit.py:262

‘{rel}’ is protected project state (#564) — deleting it is never admitted, including under a fresh authoring marker. An authoring lane writes rows; it does not remove the file. if this is deliberate.

— pre-write.py:157

‘{rel}’ is marker-gated protected project state (#564) — a Write is admitted only under a fresh authoring marker. {recovery}

— pre-write.py:167

‘{rel}’ is protected project state (#564) — the Write tool may never target it; there is no marker path for this policy. {recovery}

— pre-write.py:175