Sandbox troubleshooting on managed computers
Fix managed OpenShell sandboxes on Linux and macOS: symptoms and fixes, why a sandbox is unavailable, registration alerts, status codes and relay refusals.
Start with the symptom. The reason codes and messages are in the tables below. To set sandboxes up, see Sandboxes on managed computers.
Symptoms
Why a sandbox is unavailable
When a sandbox can't run for a person, the refusal says why in words and the record carries a short reason code: the reason of log.sandbox.host_run_unavailable and log.sandbox.host_run_refused. The Windows refusal asks the person to quote it.
| Reason code | What it means | What to do |
|---|---|---|
required_for | Not a failure. The person's profile lists this agent in required_for and the agent started on the host. | The person runs defenseclaw sandbox run. |
os_unsupported | Windows, WSL2, an unsupported operating system, or an Intel Mac | Give the people on it a profile without required_for, or alert in the floor and the profile |
sandboxes_off | openshell.enabled is off on this computer | Turn it on and run ensure |
root_account | The account is root | Run as a standard user |
account_unverified | DefenseClaw could not verify the account behind the call | enterprise <os> profile-explain --user NAME; check the identity source |
no_docker | Docker is not running (Docker driver) | Start Docker for the person |
no_docker_access, no_docker_group | The Docker socket isn't read-write for the account, or the account is not in the group that can use it | Add the person to the group the message names (docker) |
no_kvm_group, no_kvm_access | driver_fallback: none and the account can't open /dev/kvm | Add the person to the group the message names (kvm), or allow the Docker fallback |
no_kvm | driver_fallback: none and the CPU shows no virtualization or /dev/kvm is missing | Enable hardware (nested) virtualization, or allow the Docker fallback |
driver_unsupported | The organization's driver isn't one this computer can run | Set a driver the OS supports |
prerequisite_missing | OpenShell or Docker is missing or not set up, or the installed OpenShell runs no sandbox. The sentence names the piece, for example sandboxes are unavailable: OpenShell 0.1.5 runs no DefenseClaw sandbox: OpenShell 0.1.6 or later is required; ask your administrator to upgrade OpenShell | status and verify print the fix line (openshell_prerequisite_missing) |
account_busy | Another account holds the sandbox ports | Clears when that account has no sandbox running |
sandbox_port_busy | An ordinary process holds the configured sandbox ingress or egress port | Free that port, or set a different openshell.ingress_port or openshell.egress_port in the admin config |
Registration alert reasons
The managed gateway watches each registration for a guest sighting, from five minutes after bind. The record changes no decision.
| Reason code | Record | Meaning |
|---|---|---|
relay_without_guest, running_without_guest | log.sandbox.registration_without_guest | A watched registration was used on an admitted relay call, or reported running, without an accepted guest record since bind. The record names the account, connector, registration and sandbox. |
running_after_stop | log.sandbox.registration_without_guest | A running report for a registration whose sandbox was reported stopped was refused; the registration stays stopped. The daemon registers a sandbox it sees running again under a new id, so one record can also follow a sandbox started outside defenseclaw sandbox start. At most one record per registration an hour. |
What ensure, status and verify report
These codes appear in the warnings and failed rows an administrator sees, in text and in --json. None is raised for a person.
| Code | Meaning | What to do |
|---|---|---|
config_invalid | The candidate config does not load, with the setting and the profile named. The previous config stays in force | /opt/defenseclaw/bin/defenseclaw-gateway config validate FILE, then fix the setting named |
openshell_prerequisite_missing | A version, binary, driver, e2fsprogs, Docker or KVM that the mode and driver need is missing | Read the fix line |
openshell_driver_fallback | A MicroVM prerequisite is missing but the Docker fallback is ready, so people still get sandboxes | Fix the prerequisite if you want MicroVMs, or set driver: docker |
openshell_pin_raised | enterprise.openshell.version pins a release below 0.1.6, so the effective requirement is higher | Set the pin to the release the warning names |
openshell_downgrade | A setup pin is below a release an account already ran (with allow_downgrade), or allow_downgrade is set with install: prerequisite, where it is ignored | Read the accounts it names; remove the key where it does not apply |
openshell_launcher_conflict | The launcher path holds a file that is not DefenseClaw's link, a Python install for example | Move that file aside, then run ensure |
sandbox_user_groups | People who need docker or kvm are not in it. ensure never adds anyone | Add them |
docker_group_members | How many enrolled accounts are in the docker group (Linux), which is root-equivalent. A number, never names. With required_for set, it also says a member can run a required agent outside its sandbox policy | Keep the group to the accounts that run sandboxes |
sandbox_pending_restart | A user's daemon is outdated, or (macOS) a LaunchAgent reload waits for that user's sandboxes to stop | None: the user's next idle defenseclaw sandbox command restarts the daemon. If a macOS reload fails, the start names sudo /opt/cisco/defenseclaw/bin/defenseclaw-gateway enterprise macos repair |
sandbox_user_state | A per-user change could not be applied or removed (units, a file that changed after DefenseClaw wrote it, a teardown) | Read the message; the next run tries again |
sandbox_default_profile_looser | default_profile is looser than an assigned profile for a field | Make default_profile repeat the stricter setting |
sandbox_policy_advisory | A floor that works but probably isn't what you meant: an empty request_access, a pack without a digest, a required_for agent with no machine-owned hook, or packs read from an old data-directory folder | Read the message; move packs to <policy_dir>/sandbox |
sandbox_packs_dir_untrusted | Other accounts can read the packs folder, or its owner or mode is not as required. ensure refuses it and verify fails | Make it root:defenseclaw (macOS root:_defenseclaw), mode 0750 |
openshell_failed | A sandbox step of the lifecycle failed (for example removing a link, or install: setup without an exact pin) | Read the message |
Relay refusals
The sandbox routes answer with an HTTP status and a sandbox_* reason. The user sees the sentence; the code appears in the audit record, in --json output and in the daemon log.
| Reason (status) | Meaning | What to do |
|---|---|---|
sandbox_registration_unknown (404), sandbox_registration_revoked, sandbox_registration_expired (410) | The registration is gone, revoked, or the 30-minute pending window passed (a registration that was never bound to a sandbox) | Start the sandbox again |
sandbox_registration_stopped (403) | The sandbox is not running: its daemon reported it stopped, or has not reported it running for five minutes. Also the answer to a running report after a reported stop | defenseclaw sandbox start |
sandbox_subject_changed (409) | The account behind the uid was renamed or recycled | Start the sandbox again |
sandbox_relay_files_unsupported (400) | A client sent mount-mode file bytes; managed hosts are copy-only | Use copy mode |
sandbox_connector_mismatch (403) | A hook arrived for an agent other than the one the registration was made for | Run the agent only through defenseclaw sandbox run for its own sandbox |
sandbox_not_allowed (403) | The profile doesn't allow this sandbox: allowed: false, or the agent isn't in allowed_harnesses. The sentence is "your organization doesn't allow this sandbox" | Change the profile, or point the person to the request-access contact |
sandbox_decision_refused (403) | An ask, unblock or "always" past what user_approvals and allow_unblock allow | The notice carries the quote to send; change the profile if the person should be allowed |
sandbox_unavailable (503) | Sandboxes aren't available for the account right now; the reason is one of the reason codes | Fix the reason |
sandbox_policy_unloadable (503) | The organization's sandbox policy can't be loaded on this computer. The person is told only that | Run config validate and verify; check the packs folder |
enterprise_managed_rate_limited (429) | Relayed hooks went over a budget (Rate budgets) | The hook fails closed for that call; check the agent for a loop. A CLI command refused this way says so and changes nothing: run it again in a few seconds |
enterprise_managed_root_denied (403) | root called a sandbox route | Run sandboxes as the user |
Rate budgets
A flood of relayed hooks hits the per-user budget (100 per second, burst 200 for all of the user's sandboxes together: the rate the managed gateway answers inside the hook's 3.5 second window). The refusal is immediate and its message names the budget, so the hook tells the user the call was over a budget, not that DefenseClaw is down.
| Budget | Rate |
|---|---|
| Relayed hooks, per user, all sandboxes together | 100 per second, burst 200 |
| Each sandbox, at the user's daemon | 25 per second, burst 100 |
| Policy writes (registrations, decisions) | 10 per second, burst 20 |
Each sandbox also has its own budget at the user's daemon (25 per second, burst 100). The receipt that confirms an allowed call counts apart, so a tool call counts once against each budget.
Messages a person can get
The text column quotes stable fragments; the complete notice adds the sandbox name, phase, affected setting or request-access contact when applicable.
| Case | Text |
|---|---|
| Foreign sandbox stopped | "was stopped: it wasn't started with" |
| Foreign sandbox removed | "was removed: it wasn't started with" |
| Foreign sandbox outlives its delete | "is being removed: it wasn't started with" |
| Foreign sandbox still present after three reconciles | "DefenseClaw couldn't remove sandbox"; use the openshell sandbox delete command in the notice |
Foreign sandbox reported under foreign_sandboxes: alert | "wasn't started with" and "your organization was told." |
Settings drift (not for a changed rendered gateway.toml alone, which is reported without a pause) | "Sandboxes are paused: your OpenShell settings differ from your organization's" and "Ask IT to repair them." |
| Policy can't load | "Your organization's sandbox policy can't be loaded on this computer." |
| Another account holds the ports | "Sandboxes aren't available for your account on this computer right now: another account is using them" and "Try again when that account has no sandbox running." |
| Your organization turned sandboxes off | "turned off by your organization" in sandbox status, sandbox run and sandbox doctor |
| Your profile doesn't allow sandboxes | "your organization doesn't allow sandboxes for your account" in sandbox status (the Sandboxes row is off and names the profile; the OpenShell row is left out), sandbox run and the sandbox doctor rows |
| OpenShell isn't installed, or its release runs no sandbox | sandbox status and sandbox doctor say so: the OpenShell row names the reason and the Sandbox runtime row says how to get help |
| Directory lookup is provisional and no assignment needs the missing fact | "Your organization's directory couldn't be reached, so its default policy applies for now. Try again in a moment." |
| An assignment needs an unconfirmed identity fact | The request is refused, and the message names the missing fact. |
| Account can't be looked up on the computer (a new run) | "Your account can't be looked up on this computer right now. Try again in a moment." and "This isn't your organization's sandbox policy." |
| Registration ended by the organization (a new connection) | "your organization's policy no longer covers this sandbox; delete it and start it again with defenseclaw sandbox run" |
| Access request exceeds the profile | "You can't approve this."; the notice gives the request-access contact and the caller's profile, rule, host and sandbox to quote |
When several reasons apply, the person gets the first in this order: the organization turned sandboxes off, the profile doesn't allow them, OpenShell isn't installed or runs no sandbox, another account holds the ports.
What users see in managed sandboxes
See what a person on managed Linux or macOS sees when they run an agent in a sandbox: the run banner, asks and blocks, policy explain, and admin telemetry.
Identity and authentication
See which directory identities DefenseClaw attributes agent activity to on Linux, Windows and macOS, check what it knows about a user, and turn it off.