--dangerously-skip-permissions cannot be used with root/sudo privileges | A Claude Code guardrail: permission-bypass mode refuses to run as root | Create a non-root user in the box and pass user="agent" to exec |
npm install -g fails with ENOSPC: no space left on device | The default box disk is too small for a global Node install | SimpleBox(..., disk_size_gb=20) |
claude -p hangs, or reports no stdin data | The CLI is waiting for piped input | Append < /dev/null to the command |
| The CLI returns a 401 or an authentication error | The endpoint variables never reached the CLI, or the endpoint is not Anthropic-compatible | Inject ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN (plus ANTHROPIC_API_KEY for the official API) through exec(env=...) |
ValueError: OAuth token required. Set CLAUDE_CODE_OAUTH_TOKEN env var or pass oauth_token parameter. | Entering SkillBox with neither the env var set nor oauth_token passed | export CLAUDE_CODE_OAUTH_TOKEN=... or SkillBox(oauth_token="...") |
| Virtualization-related error on box startup / the process stays alive but the box cannot start | The current machine has no hardware virtualization (Linux without KVM, or /dev/kvm not passed through inside a container) | Use Linux+KVM or macOS; WSL2 needs KVM enabled and the user in the kvm group. This is an environment constraint; catch it with try/except RuntimeError |
RuntimeError (image pull failure / network blip) | Failure pulling ghcr.io/boxlite-ai/boxlite-skillbox or the base image | Check network/registry reachability and retry. Note: a pull failure raises a standard RuntimeError (not a BoxliteError subclass) |
exec("claude", ...) returns exit_code != 0 but does not raise | BoxLite’s exec does not raise on a non-zero exit; it returns the result | After the call, check result.exit_code, then inspect result.stderr. This is intended behavior |
Missing command (e.g. calling claude before installing it) raises a plain Error / RuntimeError, with instanceof BoxliteError === false | A missing executable is a low-level spawn failure | Install first and verify with claude --version; catch the generic RuntimeError/Error, not only BoxliteError |
The first call() takes a long time | The first call runs apt-get inside the box and installs the Claude CLI/git/python | This is expected; set auto_remove=False + a fixed name to reuse the box and skip installation on the second start |
Context lost across SkillBox multi-turn calls | Sessions are not persisted across different async with sessions | Multi-turn requires consecutive call()s on the same box instance; across sessions only dependencies are reused, not conversation context |
Writing the security option as SkillBox(security=...) raises an error | There is no top-level security= keyword | Security options go through advanced: BoxOptions(advanced=AdvancedBoxOptions(security=SecurityOptions.maximum())), with from boxlite.boxlite import AdvancedBoxOptions (it is not exported at the top level) |