EnterpriseVerify and monitor

Operations reference

Look up every field of the enterprise lifecycle result, how coverage_complete and security_complete are computed, the policy digest and guardian repairs.

This page is the reference for Verify and monitor. Start there for the commands and what to alert on.

Health fields

With --json, every lifecycle action prints one result document, defined by packaging/mdm/contract/lifecycle-result.schema.json. The MDM wrapper scripts print the same document.

FieldMeaning
oktrue only when errors is empty
exit_codeThe process exit code
installed, installed_versionWhether a deployment is recorded, and its version
transaction_pendingAn earlier run was interrupted. The next ensure or repair recovers it first by rolling back to the last committed deployment; to apply the config the interrupted run was applying, run ensure --config <file> again. On Linux and macOS, status and verify name the interrupted action, its start time and phase. On Windows, see Recover a pending transaction
services[]Each managed service or unit, with its state
readinessgateway, guardian, enumerator, sensor_helper: each true when that component is ready
coverage_completeThe core services are ready (per OS below)
security_completeEverything coverage_complete needs, plus the extra conditions below
machine_policy.<connector>ownership, lock, effective_lock, owned_entries, foreign_entries, and any higher_precedence sources or conflicts
enrollmenttargets, pending, failed, exempt (see Enrollment counts); on Windows standalone also accounts: each enrolled account (account, sid) with each connector's state from the guardian's last reconcile
inspectionlocal and ai_defense (see below)
policyThe effective policy the host runs: effective_digest and config_generation say which config, applied says whether the running gateway reports it. Omitted when the lifecycle cannot compute it. See Policy digest detail
routingEach routing.route_only connector with its readiness, and a cause when it is not ready
errors[], warnings[]Each has a stable code and a human message. See Error codes
api_port_holders[]Windows, with error api_port_held: each process other than the gateway that listens where the gateway API binds, with its address and pid, and its image and account when the caller can identify it
destinations[]status only: each observability destination the installed config compiles to, with name, kind, enabled, preset, signals and redaction_profiles (the same compiler as defenseclaw observability plan)

A healthy status from a Linux host, trimmed to two of its services entries and two of its machine_policy connectors. With Claude Code enabled, security_complete is false and the hook_process_fail_open warning names the residual risk of a hook process the user stops or kills:

enterprise linux status --json (healthy, trimmed)
{
  "schema_version": 2,
  "ok": true,
  "action": "status",
  "profile": "standalone",
  "platform": "linux",
  "installed_version": "1.0.11",
  "installed": true,
  "transaction_pending": false,
  "services": [
    { "name": "defenseclaw-gateway.service", "kind": "gateway", "state": "active/running", "start_mode": "enabled", "pid": 422027, "required": true },
    { "name": "defenseclaw-hook-guardian.service", "kind": "guardian", "state": "active/running", "start_mode": "enabled", "pid": 422080, "required": true }
  ],
  "readiness": { "gateway": true, "guardian": true, "enumerator": true, "sensor_helper": true },
  "inspection": { "local": "active", "ai_defense": "disabled" },
  "machine_policy": {
    "claudecode": { "ownership": "merge", "lock": "enforce", "effective_lock": "enforce", "owned_entries": 28, "foreign_entries": 0 },
    "copilot": { "ownership": "merge", "owned_entries": 14, "foreign_entries": 0 }
  },
  "enrollment": { "targets": 16, "pending": 0, "failed": 0, "exempt": 0 },
  "coverage_complete": true,
  "security_complete": false,
  "warnings": [
    { "code": "hook_process_fail_open", "message": "claudecode: a killed PreToolUse hook or PreToolUse timeout is non-blocking; ..." }
  ],
  "errors": [],
  "policy": {
    "effective_digest": "sha256:7b38f1df3862914135b0f9e70f9e679793a35e53018b115784002d9c55b8fce2",
    "config_generation": 3,
    "applied": true,
    "gateway_reported_digest": "sha256:7b38f1df3862914135b0f9e70f9e679793a35e53018b115784002d9c55b8fce2"
  },
  "exit_code": 0
}

A failed run sets ok to false and names each problem in errors[]. This verify ran without root, so it checked nothing and exited 1. A not_root result leaves out every field that reports the deployment, because a standard user cannot read the deployment record and those fields would read as "not installed":

enterprise linux verify --json (failed, trimmed)
{
  "ok": false,
  "action": "verify",
  "coverage_complete": false,
  "security_complete": false,
  "errors": [
    { "code": "not_root", "message": "run this command as root (sudo or the MDM agent)" }
  ],
  "exit_code": 1
}

Coverage and security complete

The two summary fields are computed differently on each OS:

FieldLinux and macOSWindows
coverage_completeThe gateway answers its health check on the hook socket and reports its API listener on 127.0.0.1:18970 up, the guardian is active with a fresh authorization ledger, the enumerator is active, the config you supplied was not rejected (config_rejected), and no agent is reported as hook_contract_unverified or opencode_v1_unprotectedThe deployment is installed, the guardian is ready, no transaction is pending, and no agent is reported as hook_contract_unverified or opencode_v1_unprotected
security_completecoverage_complete, the sensor helper is active, the run had no errors, the gateway reports the installed policy as applied, no machine_policy_incomplete or audit_write_failed, no agent is agent_unprotected or hook_contract_unverified, no user target is guardian_target_failed, the config enables at least one agent when there are eligible users (otherwise no_connectors_enabled), and no enabled agent is hook_process_fail_open (Codex, Claude Code, Copilot, Devin, Hermes, Kiro or Antigravity)The deployment is installed and healthy, the target manifest has at least one enabled Codex, Claude Code or Cursor row, no agent is agent_unprotected or hook_contract_unverified, no enabled agent is hook_process_fail_open (Codex, Claude Code), and, when a Claude Code row is enabled, the Claude Code attestation is recorded

Other warnings can also set a field to false (an incomplete agent install scan sets both); each names itself in warnings[].

  • Enrollment counts. Linux and macOS read the counts from the guardian's authorization ledger, and exempt is always 0 there: accounts that exclude_users or exempt_users keep out of enrollment have no target, and enterprise policy show --user <name> names the rule for one account. Windows counts the rows of the target manifest: pending is deferred rows, exempt is disabled rows, and failed is always 0.
  • Inspection. On Windows, inspection.ai_defense is ok when AI Defense is enabled in the config and the gateway is ready; it does not test the key or the network. inspection.local is active when the gateway is ready, unknown while it is not, and disabled when no deployment is installed. On Linux and macOS the lifecycle reads both fields from the gateway's /health: local is active, disabled or unknown, and ai_defense is disabled, ok, unavailable:<code> or unknown. The gateway's /health guardrail detail carries ai_defense_available and, when it is not available, ai_defense_error. To check AI Defense, see AI Defense is not used.
  • Users. On Linux and macOS, neither summary field depends on whether any user is enrolled. Check enrollment for that.

Claude Code attestation

With Claude Code enabled, Windows reports security_complete: false until an administrator confirms, with a real Claude Code session on that host, that Claude Code runs DefenseClaw's managed hooks. After that check, run repair with --attest-claude-effective-policy. A later change to the Claude Code policy or the hook binary makes the attestation stale, and security_complete returns to false.

Policy digest detail

Two numbers identify the policy a host runs:

  • The config generation counts the writes to config.yaml. The single config writer bumps it and records the write in config.generation.json next to the config: generation, config_sha256, actor, reason and written_at. On a managed host only the lifecycle (actor lifecycle) and a migration (actor migration) write.
  • The effective policy digest is sha256: and the hash of the canonical config and the policy assets it names (rule packs, Rego modules, signature packs, scanner policies). Secret values and the ai_discovery.home_dirs list the enumerator fills in are left out, and a path under data_dir is written as ${data_dir}. The gateway stamps it on /status, on the administrator's /health (policy.effective_digest), and on its decision events.

Every lifecycle result carries both in the policy object, on every OS:

FieldMeaning
effective_digestThe digest the installed config computes to, from the installed gateway binary's policy digest run with the service environment
config_generationThe generation recorded in config.generation.json. 0 means none recorded
appliedtrue when the running gateway reports the same digest on /health and has no policy.last_reload_error
gateway_reported_digestThe digest /health reported. Omitted when the gateway did not answer
last_reload_errorWhy the gateway rejected its last reload. Omitted when there is none
config_unrecordedtrue when config.yaml was changed outside the lifecycle: config.generation.json does not record it and the running gateway may already enforce it. Omitted otherwise

The human output of status and verify prints the readiness line, the inspection line and the services, not the digest. Use --json and read the policy object as root; a standard account gets not_root and no policy. The schema is #/$defs/policyState in lifecycle-result.schema.json.

What the lifecycle does with it:

ActionBehavior
status, verifyapplied: false means the gateway runs another policy than the config on disk computes to, or rejected its last reload. status reports the cause and sets security_complete: false. verify reports policy_not_applied or policy_reload_rejected as an error and exits nonzero until the intended policy applies. The gateway clears a reload error when a later reload succeeds
install, upgrade, repair, ensureWhen the gateway is ready, a different gateway digest adds the warning policy_not_applied. When the digests match without a reload error, the lifecycle writes policy-state.json (effective_digest, config_generation, applied_at, root-only) next to deployment.json: /var/lib/defenseclaw-enterprise on Linux, /opt/cisco/defenseclaw/lifecycle on macOS, and C:\ProgramData\Cisco\DefenseClaw\install on Windows
Every actionpolicy_reload_rejected: the gateway rejected the last policy change (a rule pack edited away from its pinned digest, for example) and keeps enforcing an earlier one. policy_not_buildable: the installed config and its assets no longer build into a policy. config_edited_outside_lifecycle: config.yaml was changed by hand; run ensure with the intended config to put the managed config back. On Windows that ensure keeps the edited file as rejected-config.yaml next to config.yaml (administrators only) and warns config_reverted. None of them changes ok
WindowsThe Windows lifecycle records the generation as actor lifecycle. enterprise policy show also prints the digest, for example Effective policy sha256:7b38f1df3862, config generation 3, and adds policy to --json

The gateway reports the same digest, with its own policy generation, on /health (administrators only; see Effective policy digest for how to read it), on /status (it needs the gateway token), and on the policy: line of enterprise linux|macos|windows status. See The policy object.

/health (policy)
"policy": {
  "effective_digest": "sha256:77ef51dce35bdc753cf9417609695b6e9eee40c83f551274104d0b08e7281f6a",
  "generation": 1,
  "config_generation": 7,
  "config_generation_recorded": true,
  "built_at": "2026-10-06T18:32:07Z",
  "component_count": 6
}
FieldMeaning
generationThe policies this gateway process has built; it restarts at 1 with the process
config_generationThe counter in config.generation.json
component_countThe number of inputs the digest covers
config_generation_recordedfalse when the file was edited and no writer recorded it
last_reload_errorPresent when a change did not build; the previous generation stays in force

The same digest is available without the lifecycle, as root on the host:

Linux
sudo /opt/defenseclaw/bin/defenseclaw-gateway policy digest
macOS
sudo /opt/cisco/defenseclaw/bin/defenseclaw-gateway policy digest
Effective policy: sha256:bf9017898a4816b6199c92a10cf289d2559397bfa9f579e150a65f0e91e5d172
Config generation: 2
  builtin                          sha256:31191aec6bcc38a8d63e718a5a6cf9c3bce38229b275f0cf408239901350c6e1
  config                           sha256:9b0c6e11839fec0fcbcc337777ce4c7272e0625431d46e2336b2a1cae60ff77c
  guardrail_policy                 sha256:9586a9559a2578251671e8b3b62b0cffc39d2afacab0a389317b7dd8cebc160b
  providers                        sha256:a23435dc7a50229547fe0cecb4a3c24f5127a2ec8277a498032ef8bff4490dcb
  rego                             sha256:1394e701de498838fa07251f7d5d3c858ed6ce44dcc164536fd13dc58d2a38b3
  rule_pack:global                 sha256:46ece6be297f9c9b221524923b4baf2035c810503ddfa1b83a1024ee3c55c6e0

The component lines say which part changed when two digests differ. When config.yaml was edited and no writer recorded it, the second line reads Config generation: 3, but config.yaml changed outside the DefenseClaw writer since. On a managed host a lifecycle run records an administrator's in-place edit as the next generation, so the line clears once the apply trigger has run.

A host with another digest has another config or assets, or has not applied the change yet. Its config_generation, applied and gateway_reported_digest say which, and the component lines of policy digest on that host and on a reference host say which part differs.

What the guardian repairs in a user account

The guardian repairs, as that user and within a minute, what DefenseClaw owns in the account:

  • DefenseClaw's registration or plugin in the agent's default config.
  • The modes of a user-owned ~/.defenseclaw and its hooks folder (restored to 0700).
  • A deleted or edited hook script, and a hook runtime whose fail mode no longer matches the config.
  • A missing ~/.kiro or ~/.kiro/hooks folder.
  • Group or other write on the home folder of an enrolled user.
  • A features.hooks key in the user's ~/.codex/config.toml under Codex machine policy (it conflicts with the pinned setting, and Codex then refuses project trust writes).
  • A native OTLP exporter in the user's ~/.codex/config.toml or ~/.claude/settings.json that carries a DefenseClaw credential.

It changes nothing else, so these stay unprotected until the user or an administrator fixes them: a link or non-directory where an agent's config folder belongs, an agent config the agent cannot parse, a special file such as a named pipe at a config path, and files another account owns. Changes to machine policy files that the guardian does not repair are listed under Known limits of the guardian.

A file event starts a guardian pass at once, and the pass watches every protected target for 300 ms, so a program that rewrites an agent's hook block over and over (Hermes is an example) is repaired within seconds of its first damaged write. Faster restores can still undo the repair. On macOS the guardian reads an account's launchd HERMES_HOME (set with launchctl setenv), so a Hermes home outside ~/.hermes is protected.

Golden images and VM templates detail

A host cloned from an image or VM template that already runs the managed deployment (Linux and macOS) starts with a copy of that host's machine state:

StateEffect on clones
The gateway's device key (/var/lib/defenseclaw/device.key on Linux, /opt/cisco/defenseclaw/runtime/device.key on macOS)Every clone reports the same device
The per-machine key the guardian derives each user's credentials fromUsers' credentials are the same on every clone
redaction-correlation.key and the sandbox registration store, if an account on the template kept sandboxesThe key is per-machine and a clone must not share it
The machine ID, unless the imaging tool resets itEvery agent's agt- ID is the same on every clone

A plain uninstall keeps the sandbox store and redaction-correlation.key when an account kept sandboxes, so use --purge for a clean image. Reinstalling on a clone gives it a new device key, a new per-machine key and a new redaction-correlation.key. To keep the deployment on a clone instead, run enterprise linux rotate-credentials --json (macOS: enterprise macos rotate-credentials --json): the users' credentials then differ per clone, but the device key stays shared.

Windows event log check

Only SYSTEM and Administrators can write the files in %WINDIR%\Logs\DefenseClaw, and only Administrators and members of Event Log Readers can read them, because each result names the accounts it found, their SIDs and guardrail profiles. Each lifecycle run sets these permissions again.

enterprise windows events treats an event log entry as DefenseClaw's only when all of these hold:

  • Its message ends with record <id>.
  • The lifecycle log holds that record with the same event ID and the SHA-256 of the exact message.
  • It was written within two minutes of that lifecycle line.
  • No earlier entry carried the same record.

Entries older than the lifecycle log's first record are listed as unverifiable. The command exits 1 when an entry was not written by DefenseClaw (a forged entry) or when the newest lifecycle record written to the checked log has no entry there (a missing record).