---
title: "Error codes"
description: "Every stable error code abx reports, with its meaning, whether a retry can succeed, and the usual fix."
---

> Documentation Index
> Fetch the complete documentation index at: https://sandrinodm.github.io/agent-box/llms.txt
> Use this file to discover all available pages before exploring further.

# Error codes

Every failure of `abx` has a stable `code`. With `--json` among the arguments, or `ABX_JSON=1`, the last line of stderr is a [JSON error envelope](https://sandrinodm.github.io/agent-box/reference/json-output/#error-envelope) carrying `code`, `message`, `hint` and `retryable`. Match on `code`: messages and hints can name the box or command and are not stable. `abx help --json` lists the same codes under `errors`.

The codes below are grouped by topic. `Retryable` is the `retryable` field of the envelope: `true` means running the same command again may succeed. Only `lock-busy` is retryable.

The exit status of a failure is `1`, `2` for `usage`, or `125` in a one-shot `run` or `shell` launch and when Linux host policy refuses the command at entry. See [exit codes](https://sandrinodm.github.io/agent-box/reference/exit-codes/). For symptom-first help, see [troubleshooting](https://sandrinodm.github.io/agent-box/operate/troubleshooting/) and [Linux hosts](https://sandrinodm.github.io/agent-box/operate/linux-hosts/).

## Usage and terminal

| Code | Meaning | Retryable | Typical fix |
| --- | --- | --- | --- |
| `usage` | Unknown command, option or argument, or a malformed value. | no | Run `abx help <command>`. Also raised for conflicting flags such as `--create` with `--no-create`, and for `--json` on `diff` without `--stat`. Exits `2`. |
| `needs-terminal` | The command needs an interactive terminal. | no | Run it from a terminal. This covers `abx wizard`, `abx tui`, `abx auth login`, and `abx shell` without a command after `--`. For a shell, give a command after `--`, which runs one-shot. (`abx auth set` without `--from` and without a terminal fails with `internal` instead; pass `--from`.) |

## Boxes

| Code | Meaning | Retryable | Typical fix |
| --- | --- | --- | --- |
| `no-box` | The named box does not exist. | no | Boxes belong to a Git repository or to the exact scratch directory. Check `abx ls`, run from the owning directory or pass `-C DIR`, and look elsewhere with `abx ls --all` and `abx workspace ls`. `run` and `shell` report `no-box` instead of creating a box when you pass `--no-create` or set `ABX_JSON=1`; pass `--create` to create it. `rm` and `stop` succeed for a missing box with `--if-exists`. |
| `ambiguous-box` | No box was named and the workspace has more than one. | no | Pass one of the names the message lists (`Choose a box: a, b.`). |
| `box-exists` | A box with that name already exists. | no | Reported only when the TUI asks for a new box and that name is taken. Choose another name or open the existing box. Reopening a box from the command line with the same creation options succeeds. |
| `box-running` | The box is running; stop it first. | no | `abx stop <box>` first, or `abx rm <box> --force`. |
| `box-busy` | The box has active guest processes, or its login profile is in use by another box. | no | For active processes, exit what runs in the box, or use `abx stop <box> --force`; unflushed writes can be lost. For a shared guest login profile held by another box, `abx ls --all` shows the holder; stop it first. |
| `box-incomplete` | The box was never fully created. | no | Run the `abx shell <box>` command the message names to retry the creation. |
| `unlanded-commits` | The box has commits that were never landed. | no | Review with `abx diff <box>` and land with `abx land <box>`, or delete the commits with `abx rm <box> --force`. |
| `machine-missing` | The VM behind the box is gone. | no | Check `ABX_SMOLVM_STATE_DIR`, or archive the box's host state with `abx rm <box> --force`. If the box still holds a shared guest login profile, restore its smolvm state and run `abx stop <box>` first so the profile is returned. |
| `fixed-option` | A creation option differs from the value the box was created with. | no | Network policy, granted agents, credential access and account connectors are fixed at creation. Omit the option, repeat the recorded value (`abx ls <box> --json` shows it), or create a box with another name. Raised for `--net`, `--allow`, `--agents`, `--access`, `--auth-profile`, `--connectors` and `--no-connectors`. |
| `agent-not-in-image` | The base image does not contain the agent. | no | Run `abx image build` and list every agent you use. Existing boxes keep their image. |
| `policy-mismatch` | The VM does not match the network or mount policy recorded for the box. | no | `abx` will not sync or run the VM normally. `abx stop <box> --force` stops it. To change the policy, remove the box and create another. |
| `lock-busy` | Another abx process holds the lock; retry shortly. | **yes** | Locks never wait. Retry after a short pause. |

## Workspaces and home

| Code | Meaning | Retryable | Typical fix |
| --- | --- | --- | --- |
| `not-git` | The command needs a Git workspace. | no | `diff` and `land` need a Git box. Run them from the Git checkout that owns the box, without `--no-git`. Scratch boxes have no history to review. |
| `workspace-refused` | The workspace cannot be used for boxes. | no | `abx` will not use `$HOME` as a scratch workspace, a folder whose `.abx` would be `ABX_HOME`, or any folder inside `ABX_HOME`. Run it from a project folder or pass `-C DIR`. A Git checkout rooted at `$HOME` is allowed. |
| `workspace-conflict` | The workspace identity conflicts with another checkout. | no | The folder's marker, or its recorded owner, conflicts with another checkout, or `workspace link` or `workspace new` refused. Use `abx workspace new` in a copy for its own workspace, or `abx workspace link --force` to move the original's boxes there. See [workspaces](https://sandrinodm.github.io/agent-box/concepts/workspaces/). |
| `layout-mismatch` | `ABX_HOME` has an unsupported layout. | no | `abx` accepts only a layout 2 home and never migrates an older one such as `~/.agent-box`. Point `ABX_HOME` at a new or empty directory, or remove the old one. See [files](https://sandrinodm.github.io/agent-box/reference/files/). |

## Host and backend

| Code | Meaning | Retryable | Typical fix |
| --- | --- | --- | --- |
| `host-unsupported` | Host policy refuses this operation on the current platform or as root. | no | Run `abx status --json` to see the host architecture, support level and warning. Linux operations need an unprivileged account on an x86_64 or arm64 host. Root, an unknown effective UID and other Linux architectures can run only `help`, `--version`/`-V`, `--agent-mode` and `status`. Exits `125` on Linux. |
| `host-dependency-missing` | A host dependency required by this command is missing or unusable. | no | Run `abx status` for the failing dependency, its path, unsafe-path detail and an install hint. This includes a missing or wrong-version `smolvm` and an inaccessible `/dev/kvm`. `abx` checks prerequisites read-only before creating box or engine state and leaves installation to you. |
| `backend-unsupported` | The backend configuration could not be opened. | no | The smolvm state location failed its checks before smolvm ran. Check that `ABX_SMOLVM_STATE_DIR`, when set, is an absolute path. On Linux, the state root (`ABX_SMOLVM_STATE_DIR` or your home) and the smolvm database and VM cache under it must also be on local `ext4` and safe from other writers; see [Linux hosts](https://sandrinodm.github.io/agent-box/operate/linux-hosts/#local-ext4-for-state). |
| `backend-failed` | smolvm failed to carry out a request. | no | The message describes the failure. Check smolvm and `ABX_SMOLVM_STATE_DIR`, then retry. Buffered smolvm calls normally have a 5-minute host deadline, and each agent installation during an image build has a 10-minute host deadline. |

## Image

| Code | Meaning | Retryable | Typical fix |
| --- | --- | --- | --- |
| `image-missing` | No base image is installed. | no | Run `abx image build`. |
| `image-invalid` | The installed base image is damaged. | no | Run `abx image build --rebuild`. |
| `image-changed` | The installed base image changed on disk. | no | Run `abx image build --rebuild`. Also raised when a new `abx` release pins different guest artifacts or agent versions than the installed image; see [Upgrading](https://sandrinodm.github.io/agent-box/operate/upgrading/#images-after-an-upgrade). |

Boxes keep the template they were created from, so a new image affects only boxes created after it. See [images](https://sandrinodm.github.io/agent-box/concepts/images/).

## Review and landing

| Code | Meaning | Retryable | Typical fix |
| --- | --- | --- | --- |
| `review-stale` | The reviewed changes or destination moved since `abx diff`. | no | Run `abx diff` again with the same mode you will land with, then `abx land`. |
| `landing-mode-mismatch` | The review was prepared for another landing mode. | no | Run `abx diff` with the same mode you will land with (`--merge`, `--squash` or none), then `abx land`. |
| `dirty-worktree` | The destination checkout has uncommitted changes. | no | Commit or stash the tracked or staged changes, then land again. |
| `worktree-conflict` | The landed files overlap local changes in the destination. | no | A path the guest added already exists in your worktree. Move it, then land again. |
| `executable-paths-unconfirmed` | The changes touch host or CI executable paths that were not confirmed. | no | Read the listed paths, then repeat with `abx land <box> --allow-executable`. See [executable paths](https://sandrinodm.github.io/agent-box/git-workflow/executable-paths/). |

See [review and land](https://sandrinodm.github.io/agent-box/git-workflow/review-and-land/) for the full round trip.

## Authentication

| Code | Meaning | Retryable | Typical fix |
| --- | --- | --- | --- |
| `auth-unavailable` | The selected agent authentication is unavailable. | no | A masked credential is released only after `abx auth verify <agent>` passes for the active image on this host. Rebuilding the image, upgrading smolvm or moving `$ABX_HOME` to another host needs a new verification. `abx auth status <agent>` shows what is configured. |
| `invalid-access` | The `--access` value is not supported. | no | Use `masked`, `global` or `local`. `abx help auth <agent>` lists the routes each mode offers. See [access modes](https://sandrinodm.github.io/agent-box/authentication/access-modes/). |

## Other

| Code | Meaning | Retryable | Typical fix |
| --- | --- | --- | --- |
| `internal` | An unclassified failure. | no | The message is all `abx` knows. Most are one of the messages in [troubleshooting](https://sandrinodm.github.io/agent-box/operate/troubleshooting/) and [Linux hosts](https://sandrinodm.github.io/agent-box/operate/linux-hosts/). The diagnostic log in `$ABX_HOME/logs/` has a `failed` entry with the code and exit status. |

## Failures reported inside a result

When a command acts on several boxes, a failure of one box appears in the `failed` array of the result with the same `error` object (`code`, `message`, `hint`, `retryable`), `abx` exits `1`, and no envelope is printed. See [partial failures](https://sandrinodm.github.io/agent-box/reference/json-output/#partial-failures).

Source: https://sandrinodm.github.io/agent-box/reference/error-codes/index.mdx
