Skip to content

Agent Hooks

This page records what was retired and preserves published heading anchors. It is not a hook installation or recovery guide. The site’s generated product metadata has a separate older source pin and may still describe historical hooks.

Historically, a PreToolUse hook evaluated a tool call before execution and could deny it. SubagentStop ran an advisory output check. Those APEX checks no longer run after the directory’s deletion. Native tool restrictions are not automatically equivalent to the old regex guard. Verify native permissions before relying on them.

This is a historical inventory, not a list of installed or required hooks.

Retired directoryFormer eventFormer purposeFormer timeout
tool-guardian/PreToolUseBlock dangerous terminal commands10s
subagent-validation/SubagentStopValidate subagent output quality (advisory)15s

Earlier secrets-scanner, session-telemetry, and tool-audit hooks had already been removed. The first duplicated gitleaks; the latter two only wrote logs that nothing consumed. This history does not authorize restoring any of them.

Do not register the deleted APEX hooks in .vscode/settings.json, the dev container, or agent frontmatter. Stale caller and validation references belong to the source retirement change. This docs update does not verify their removal.

Moving a deleted hook into .agent.md frontmatter would reintroduce it. The owner did not authorize that workaround. Native roles and tool allowlists must be checked on their own; they do not by themselves isolate credentials or Azure authority.

The underlying Azure security, live governance, SKU, AVM, cost-provenance, and approval requirements survive runtime-hook retirement. Real-Azure deployment and E2E are authorized in principle only. The exact tenant, subscription, resource boundary, budget, and action scope remain unestablished. No cloud action may proceed until that scope is established. Cleanup is not authorized.

Native Autopilot cannot supply genuine owner signoff. An unavailable owner answer does not approve anything. Neither hook deletion nor passing documentation checks accepts the pilot, approval boundary, or full migration.

The deleted PreToolUse guard checked file-edit paths under .github/hooks/, including resolved symlinks and traversal. That hook-based self-modification protection is gone. Do not describe it as active.

Command precision (low false-positive rate)

Section titled “Command precision (low false-positive rate)”

The retired guard used anchored regex patterns for selected destructive commands. Those pattern checks no longer run. Native tool restrictions have not been shown to reproduce their command-level coverage, and this guide makes no equivalent protection claim.

The former hooks declared timeouts. Their absence is not a passing timeout or safety check. No replacement timeout mechanism is established here.

The deleted guard used a rotating JSONL audit log. That hook audit trail no longer exists for new calls. Optional native session telemetry is a separate measurement source, not a replacement enforcement mechanism or proof of human approval.

Secret scanning (handled by gitleaks, not a hook)

Section titled “Secret scanning (handled by gitleaks, not a hook)”

Gitleaks at the Git pre-commit layer is unrelated to the retired APEX runtime hooks. Preserve that tooling and inspect its actual installed configuration. The documented product scan soft-skips locally when gitleaks is missing and is not run in CI. A commit made outside its configured execution path is not proof of a scan. Do not bypass Git hooks to work around runtime-hook retirement.

The historical .github/hooks/{name}/ directories held an event-binding hooks.json and a shell script. The owner deleted the runtime-hook directory; this layout is not a setup requirement.

The former .github/hooks/lib/common.sh supplied shared JSON, logging, timestamp, and allowlist helpers. It is retired with the directory.

Historical hooks.json files bound lifecycle events to shell commands and timeouts. No APEX runtime-hook configuration is currently provided in the migration checkout.

The removed shell scripts read JSON from stdin and returned JSON decisions. Their historical conventions do not require replacement scripts.

validate:hooks and test:hooks were product commands for the old implementation. Do not recreate deleted files to satisfy them. Product maintainers own retirement of stale callers, settings, and tests; this documentation does not certify that source phase as complete. Preserve unrelated validators and Git checks.

This heading remains for existing links. Adding a runtime hook is not part of the authorized migration. The former creation instructions have been retired.

Do not recreate .github/hooks/ or a substitute directory.

Do not introduce replacement event bindings.

Do not register deleted paths to match older examples or generated metadata.

Keep retirement tests and unrelated quality checks separate. A source validator passing does not prove native permission or pilot acceptance.

Record lost protection honestly. Do not hide it behind a tool allowlist, an Autopilot response, or a source-check result.

In the migration checkout, the owner deleted these hooks intentionally. Their absence is not a discovery error to repair by restoring files. Diagnose stale callers in the product retirement change without disabling unrelated tooling.

An old timeout or success log is historical evidence only. It does not establish protection for a current tool call.

Do not reconstruct or exercise a deleted hook as a migration prerequisite. Native permission checks require their own bounded, authorized evidence.

MechanismCurrent migration statusCoverage limit
APEX .github/hooks/ runtime hooksIntentionally deleted; no replacementsFormer tool-call checks and hook logging are gone.
Git hooks through lefthook.ymlNot retired by this decisionOnly configured commit and push operations are checked.
Gitleaks and CINot retired by this decisionVerify installed tools and actual job scope.
azd hooks in azure.yamlSeparate application lifecycle mechanismReview against the approved Azure action scope; runtime-hook deletion grants no cloud permission.