Hooks15
Hooks
Shared policy checks composed by runtime lifecycle adapters. Native activation and enforcement are qualified separately.
session SessionStart SessionStart hook: report harness drift, per-session HARNESS_* overrides, and the handoff, and check declared framework integrations without modifying repository… brief-guard PreToolUse PreToolUse on `Agent`: append a return bound, and the posture's soft budget, to a brief that states neither. filter-output PreToolUse PreToolUse hook: pipe verbose test, build and type-check runs through `filter-lines.py`, so only failures, the summary and the tail of a run enter the transcript. grade-bash PreToolUse PreToolUse hook: grade every Bash command 0-3 and gate the grades the autonomy stance forbids. intent-overlap PreToolUse PreToolUse policy: stop an edit to a path a live sibling session has claimed. plan-webfetch PreToolUse PreToolUse hook: approve WebFetch while in plan mode, so gathering context for a plan does not prompt for every documentation or reference URL. readonly-bash PreToolUse PreToolUse hook: approve read-only Bash commands that Claude Code's built-in read-only set misses, so plan mode and Manual mode stop prompting for them. session-caps PreToolUse Hold a session to its fan-out cap and its web-search cap: count both, warn near, deny at. stage-files PreToolUse PreToolUse hook: copy each file `SendUserFile` names from outside the session's working directory into it, so a Remote Control client can open the file. steer-polling PreToolUse PreToolUse on Bash: steer a foreground wait to a background command or Monitor. tier-spawns PreToolUse PreToolUse hook: apply the delegation stance to every subagent spawn, whoever wrote the brief. neutralize PostToolUse PostToolUse scanner: flag instruction-shaped text arriving in tool output. plan-card PostToolUse PostToolUse validator: enforce the Review Card contract on plan files. stop-gate Stop Stop hook: run the repository's own gate and refuse to finish while it is red. usage-log SessionEnd SessionEnd hook: record a session's token usage in ~/.local/state/agent-harness/usage.jsonl.