> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xenoci.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Exit codes

> What each box exit code means and what to do next

Every `box` command ends with one of these codes, so an agent or a script can tell what to do next without reading the text

| code | meaning | what to do |
| - | - | - |
| 0 | Done | Carry on |
| 1 | The build or the tests failed | Read the errors (`file:line:col` with your local paths, and `.box/out/<job>/why.txt`), change the code, run again |
| 2 | Wrong usage or a problem on your machine | Fix the command or the local setup. Nothing was sent or billed |
| 3 | The account or box itself: not signed in, no balance, not invited, our outage, a Mac problem | Read the message and show it to the person. Don’t retry it in a loop |
| 130 | The job was cancelled with `box cancel` | Nothing to fix |

## What each looks like

Exit 2, a value the option does not take. It stops before anything is uploaded

```text theme={"system"}
$ box build --platform windows
error: invalid value 'windows' for '--platform <PLATFORM>'
  [possible values: ios, android]

For more information, try '--help'.
```

Exit 2, a command the platform does not have

```text theme={"system"}
$ box debug --platform android --break x
box: debug is only available for ios; an Android build returns app-debug.apk
```

Exit 3, not signed in

```text theme={"system"}
$ box status
box: You are not signed in. Run `box login`.
```

Exit 1, a test failed. The last lines of a real `box test` run

```text theme={"system"}
$ box test
box: tests 1 passed, 1 failed
  FAIL BoxDemoTests/testCountStartsAtOne(): XCTAssertEqual failed: ("0") is not equal to ("1") - the counter should start at 1
box: bj_aDxtZUJUe0bpuoFx failed, 180s billed, $0.15
box: why: FAIL BoxDemoTests/testCountStartsAtOne(): XCTAssertEqual failed: ("0") is not equal to ("1") - the counter should start at 1
box: details: .box/out/bj_aDxtZUJUe0bpuoFx/why.txt
```

With `--json`, the last line is a `result` event that has the same outcome and `billed_seconds`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.