Policy changes on a managed host

Learn what refuses a local policy change on a managed standalone host on Windows, Linux and macOS, what stays allowed, and how the environment is handled.

On a managed standalone host, config.yaml and the policy assets it names are the only policy. Only the lifecycle (and a migration it runs) writes the config. The model is in Configuration: one source of truth.

Change the policy

To block or allow an asset, add it to asset_policy in the admin config and apply the config (Change the config):

config.yaml (excerpt)
asset_policy:
  skill:
    denied:
      - name: acme-unapproved-skill
        reason: not approved

Thresholds go in guardrail.block_at, and every other setting in its own key of the admin config (Configuration).

What refuses a local change

PlatformWhat the user runsWhat happens
Linux, macOSThe packaged defenseclaw launcherRuns only the commands in Managed command availability; every other command prints the launcher refusal and exits 2
Windowsdefenseclaw.exe (the administrator command; no launcher)Refuses the per-user writers itself (table)
Linux, macOSA per-user Python CLI left from an earlier installFinds the host managed and refuses the writers, also for root (table)

Windows

Setup puts no DefenseClaw command on PATH. Run it by its full path: & 'C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw.exe' ... in PowerShell, or "C:\Program Files\Cisco\DefenseClaw\bin\defenseclaw.exe" ... in cmd.exe.

Attempt on managed WindowsResult
config set, config unsetExit 3: This device is managed: change config.yaml in the admin config (MDM or management plane); config set did not change it
skill, mcp, plugin or tool with block, allow or unblockExit 3, naming the asset_policy key in the admin config and saying the command did not change it
init, quickstart, guardrail, policy activateExit 2: not a command of the administrator's defenseclaw.exe

A standard account's status (and status --json) shows that account's own Claude Code and Cowork protection state and its own last Cowork event, never another account's. From an elevated prompt status names the administrator's enterprise windows status --profile standalone (Managed command availability).

A per-user CLI left on the host

These attempts are refused, also for root, and nothing is written:

AttemptResult
config set KEY VALUE, config unset KEYExit 3: error: This device is managed: change config.yaml in the admin config (MDM or management plane), not on the device
skill, mcp, plugin or tool with block, allow or unblockExit 3: This device is managed: the asset_policy block and allow lists are set in the admin config (MDM or management plane)
init, quickstart, and any command that needs a per-user configExit 3: This device is managed: DefenseClaw is configured by your administrator (MDM or management plane), so there is no per-user config to create and 'defenseclaw init' does not apply. Nothing was changed.
guardrail block-at, policy activate, the setup commands that write config, the TUI config editorRefused by the same writer. The TUI shows Config save failed: and the message
POST or DELETE on the gateway's /enforce/block, POST on /enforce/allowHTTP 403 with {"error": "managed_device", "detail": "policy changes are made in the management plane"}

How refusals are audited

The gateway records each refusal in the audit log with outcome=refused reason=managed_device. The record names the account that asked:

PlatformHow the account is knownExample
Linux, macOSThe launcher and the CLI report through the hook socket, so the kernel names the calleractor=uid:501 user=alice
Windowsdefenseclaw.exe reports on the gateway's refusal pipe, which reads the caller's Windows tokenactor=sid:S-1-5-21-... user=HOST\alice

On Linux and macOS the launcher reports refusals of config, guardrail, policy, the asset writers, setup, upgrade, rollback and uninstall (Managed command availability). On Windows a standard account's enterprise windows lifecycle command is recorded with reason=elevation_required.

Runtime actions stay allowed

Quarantine and restore, runtime disable and enable, approvals (HITL) and discovery are runtime state, not policy. They keep working on a managed host.

The environment cannot weaken the host

Every DEFENSECLAW_* variable has a managed setting in the registry:

SettingEffect on a managed standalone host
allowRead as set
ignoreRead as unset, from the process environment and from .env files
tighten_onlyCounts only when it makes the setting stricter (DEFENSECLAW_STRICT_AVAILABILITY, DEFENSECLAW_MANAGED_TRUST_STRICT_ANCESTORS)
  • A forged DEFENSECLAW_DEPLOYMENT_MODE or DEFENSECLAW_ENTERPRISE_PROFILE cannot make the host look local: the host is managed because config.yaml says so.
  • Hook fail mode comes only from installed policy; the agent environment cannot change it.
  • Managed hooks ignore DEFENSECLAW_HOOK_MAX_BODY and keep their fixed 1 MiB body cap.
  • defenseclaw doctor names ignored variables, never their values.

Local block and allow rows are ignored

The gateway decides from asset_policy, not from the actions table of audit.db. Rows there are neither imported nor deleted. Add the ones you want to asset_policy in the admin config.