Console

Agent Hooks troubleshooting

Diagnose, repair, sync and uninstall Codex and Claude Code Hooks on Windows and macOS.

Identify the failure

Hook blocked or PreToolUse means the host received a blocking Hook result before the operation. It does not by itself prove a server outage. PostToolUse runs after the operation and cannot undo it.

Message or codeMeaningAction
request_timeout, network_unavailable, connection_interrupted, service_unavailableTimeout, connection failure, interruption or temporary service failureCheck the network, proxy and ShieldON address; ask the administrator to check the service. See “Continue during an outage” below.
circuit_openA short circuit-breaker interval after repeated failuresTrigger another Hook after about 30 seconds. Offline authorization and secure storage requirements still apply.
Shieldon is unavailable. No valid published authorization permits offline use., offline_authorization_missingNo valid authorization permits offline executionOnce online, reinstall the binding and complete an online check. Ask the administrator to verify the published failure policy. Retrying offline cannot create authorization.
outage_policy_closedPublished policy blocks during outagesAsk the administrator to review the failure policy.
Shieldon policy verification failed. Refresh the Hook installation.Policy authorization failed validation; this does not prove an outageUpgrade the CLI, synchronize the computer clock, verify the account and Workspace, then reinstall the binding. If it persists, ask the administrator to check server signing configuration.
policy_expired, policy_clock_ahead, clock_rollbackExpired authorization, clock skew or clock rollbackSynchronize time in Windows Settings → Time & language → Date & time, or enable automatic time in macOS System Settings → General → Date & Time, then refresh the binding online.
policy_signature, policy_key_invalid, policy_format, policy_missing, policy_claims, policy_lifetimeInvalid signature, key or authorization contentUpgrade and reinstall the binding. If it persists, ask the administrator to check signing keys and version compatibility. Do not edit authorization files.
policy_organization, policy_workspace, policy_user, policy_installation, policy_sourceAuthorization does not match the bindingVerify the account, Workspace and host, then reinstall. Do not copy bindings between users or devices.
authentication, permission, 401 / 403Invalid login or insufficient permissionSign in again with the ShieldON CLI; ask the administrator to verify Workspace access.
rate_limited, 429Rate limit reachedWait and retry; ask the administrator to check limits.
tls_verification, connection_validationCertificate or connection validation failedCheck the server URL, certificate chain and corporate proxy. Do not disable TLS verification.
Shieldon cannot securely store the audit event. Check local storage and credentials.Older generic local audit initialization or storage errorCheck directory permissions, free disk space and credential storage for the current user. Upgrade for more specific diagnostics; the message alone does not mean the disk is full.
state_directory*, state_read*, state_write*, queue_write*, queue_fullLocal directory, state or queue unavailableFree disk space or restore current-user permissions; sync a full queue. Do not delete the queue.
state_lock*, credential_lock*Another process holds a lock or the lock timed outWait for running CLI processes to finish and retry; collect the error code if it persists.
credential_store*, queue_key_*, state_decrypt, state_format, state_unsafeCredential, encryption key or state-file problemPreserve state and original credentials; ask the administrator to help recover them. Reinstalling or deleting files cannot recover a lost encryption key.
Explicit Guardrail denialThe request matched a published ruleAdjust the request or ask the administrator to review the rule. Outage continuation does not override denials.

Diagnostic detail varies by CLI version. Specific policy_* codes require a version containing those diagnostics. * denotes possible suffixes such as _permission_denied, _disk_full or _timeout.

Windows: Codex and Claude Code

Use a separate PowerShell terminal so a blocked agent does not prevent diagnosis. These commands use the default installation path; replace it for a custom installation. Replace YOUR_WORKSPACE_ID with the Workspace ID in Agent Hooks installation instructions.

Windows · Codex

$shieldonCli = "$env:LOCALAPPDATA\Shieldon\bin\shieldon.exe"
& $shieldonCli --version
& $shieldonCli hooks status codex
& $shieldonCli hooks sync codex
& $shieldonCli hooks install codex --workspace YOUR_WORKSPACE_ID

Reopen Codex, verify definitions and trust in /hooks, then try a simple operation. The default configuration directory is $env:USERPROFILE\.codex, overridden by CODEX_HOME.

Windows · Claude Code

$shieldonCli = "$env:LOCALAPPDATA\Shieldon\bin\shieldon.exe"
& $shieldonCli --version
& $shieldonCli hooks status claude
& $shieldonCli hooks sync claude
& $shieldonCli hooks install claude --workspace YOUR_WORKSPACE_ID

Restart Claude Code and inspect /hooks. The default directory is $env:USERPROFILE\.claude, overridden by CLAUDE_CONFIG_DIR.

macOS: Codex and Claude Code

Use a separate Terminal. Replace the default binary path if necessary and replace YOUR_WORKSPACE_ID with the actual Workspace ID.

macOS · Codex

shieldon_cli="$HOME/.local/bin/shieldon"
"$shieldon_cli" --version
"$shieldon_cli" hooks status codex
"$shieldon_cli" hooks sync codex
"$shieldon_cli" hooks install codex --workspace YOUR_WORKSPACE_ID

Reopen Codex and verify definitions and trust in /hooks. The default directory is ~/.codex, overridden by CODEX_HOME.

macOS · Claude Code

shieldon_cli="$HOME/.local/bin/shieldon"
"$shieldon_cli" --version
"$shieldon_cli" hooks status claude
"$shieldon_cli" hooks sync claude
"$shieldon_cli" hooks install claude --workspace YOUR_WORKSPACE_ID

Restart Claude Code and inspect /hooks. The default directory is ~/.claude, overridden by CLAUDE_CONFIG_DIR.

Custom directories and upgrades

If installation used a custom directory, use the same --codex-home or --claude-home argument for subsequent commands. A successful hooks status does not mean the host has trusted the Hook.

Upgrading the server does not upgrade installed CLIs. Reinstall to the original path using your organization's latest ShieldON CLI package or Skill installer, verify --version, and run the relevant hooks install. Changing another binary on PATH may leave the host calling an older absolute path. The installer verifies the release manifest and downloaded archive; use a trusted distribution source.

Continue during an outage

An administrator can open Guardrails → Agent Hooks → Installation and failure policy, select “Continue with deferred auditing”, save the draft, then review and publish a Release. Saving a draft alone does not activate it.

Continuation requires valid published offline authorization (at most one hour) and secure local encryption of the original event. Eligible network failures, timeouts and temporary service errors produce a notice to continue the user's task; the AI should not stop or repeat calls solely because of that notice. Host permissions and approvals still apply.

Explicit denials, identity or permission errors, invalid certificates, expired authorization and unsafe audit storage still block. Changing an error message cannot grant offline authorization.

The next successful online check attempts to upload queued events; you can also run hooks sync. There is no background sync process. Uploaded events remain “Continued without check”; historical requests are not rechecked or reclassified as passed.

Temporarily disable or uninstall ShieldON Hooks

If your organization permits disabling Hooks, sync first and uninstall the selected host binding from a separate terminal. Each uninstall command affects only that host; run only the pair you need.

Windows (set $shieldonCli as above first):

# Codex
& $shieldonCli hooks sync codex
& $shieldonCli hooks uninstall codex
# Claude Code
& $shieldonCli hooks sync claude
& $shieldonCli hooks uninstall claude

macOS (set shieldon_cli as above first):

# Codex
"$shieldon_cli" hooks sync codex
"$shieldon_cli" hooks uninstall codex
# Claude Code
"$shieldon_cli" hooks sync claude
"$shieldon_cli" hooks uninstall claude

Restart the host afterwards. These commands remove ShieldON bindings while preserving other Hooks; they do not uninstall Codex, Claude Code or the ShieldON CLI. Restore with the relevant hooks install and verify host trust. Ask the administrator to handle organization-managed configuration.

Uninstall refuses while audits await upload. Run hooks sync after service recovery and uninstall once uploading completes. Do not delete encrypted queues, state files or credentials to force removal.

Share diagnostics

Record CLI and host versions, OS, time and timezone, Hook stage, error code, whether the error repeats, and a redacted request ID. Check date/time and directory permissions; on macOS also check that the current user can access the original credential store.

Do not share full hooks status output, binding files, signed authorization, credential stores, original prompts or tool arguments. Share only necessary redacted diagnostic fields. Upgrade older clients that emit only generic messages before drawing conclusions about the underlying cause.