# droid with an X-API-Key header: PASS

Run date: 2026-10-12 (UTC). Endpoint: `https://api.sbx.agent-next.com/mcp/v1`. Client: `droid` 0.236.0, preinstalled in the default template, used in a fresh sandbox only. Model: GLM 5.3 through the gateway as a custom model (`customModels` in `~/.factory/settings.json`), run as `droid exec --auto high`. The key was read in-process and never printed or logged.
Setup text: the live [For agents page](https://sbx.agent-next.com/docs/agents/#client-droid), droid section: `droid mcp add ... --type http --header ... --no-oauth`, then `droid mcp list`.

## Flow

| step | result |
| --- | --- |
| `droid mcp add` from the page | PASS |
| `droid mcp list` | PASS: `sandbox http connected [user]`; all nine tools listed by `droid exec --list-tools` |
| session A: create, `echo ok; exit 3`, write and read `/tmp/hello.txt`, `ls -l /tmp`, `python3 -m http.server 8000` in the background, preview URL, no kill | PASS: exit code 3 and `ok`; file content `hi`; an external fetch of the preview URL returned HTTP 200; an independent MCP read returned `hi`; PID 1 is `tini`, 0 zombies |
| session B: `sandbox_kill` twice | PASS: `killed: true`, then `already_gone: true`; the preview URL then returned 502 |

## Residue (zero)

- The key's sandbox list was 0 at the end.
- The key sits in `~/.factory/mcp.json` while the server exists. `droid mcp remove sandbox` cleared it; a scan of the home directory, `/tmp` and `/dev/shm` found nothing except the test harness's own key file, which went away when the sandbox was destroyed afterwards.
