3. Open <http://localhost:8504> (EOSdash) or <http://localhost:8503/docs> (EOS REST API) in the
browser on the host.
(ai-sandbox-github)=
### GitHub access
The recommended way is to push and open pull requests from the host, after your review. The
sandbox then needs no GitHub credentials.
If the agent shall push or create pull requests itself, log in to GitHub in the sandbox:
```bash
gh auth login
gh auth setup-git
```
`gh auth setup-git` lets `git push` use the `gh` login. Later sandbox starts set this up
automatically. Prefer a
[fine-grained personal access token](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens)
restricted to your fork over a full login.
(ai-sandbox-persistence)=
### Persistent data
Everything in the sandbox is temporary, except
- `/workspace`: the repository on your machine,
- `/home/dev`: the Docker volume `akkudoktor-ai-home`. It holds the logins of the agents and of
`gh`, the agents' settings, memory and session transcripts, the `uv` cache and the virtual
environment. The shell startup files (`~/.bashrc`, `~/.profile`) are reset on every start, so
changes to them do not persist.
To log out of everything and start over, remove the volume while no sandbox is running:
```bash
docker volume rm akkudoktor-ai-home
```
### Security model
The sandbox reduces what a misled agent can do on your machine. It does not make the agent's output
trustworthy, and it does not protect the repository: the agent can write any change into it. Your
review of every change is the main control.
The container
- sees only the repository and its own home volume, no other host directories and no Docker
socket,
- mounts `ai/` (the sandbox definition and the launchers) read-only, so the agent cannot change
the next sandbox start,
- runs as your user id, not as root, with all Linux capabilities dropped, `no-new-privileges` and
no `sudo`, so the agent cannot gain privileges,
- has a read-only root file system. `/tmp`, `/run` and `/var/tmp` are in-memory and do not allow
running programs,
- is limited to 2 CPUs, 4 GB of memory and 512 processes,
- has network access to the internet, which the agents and `uv` need,
- publishes no ports, unless started with `AI_SANDBOX_PORTS=1`, and then only on the host's
loopback interface.
The launchers check `ai/compose.yaml` for the main controls before they start the sandbox. This is
a sanity check against accidental edits, not a complete validation. Review changes to `ai/` like
any other change.
Keep in mind what the agent can still reach:
- **The repository, read and write.** Everything outside `ai/`. Many files in it are run on the
host: `Makefile`, `.pre-commit-config.yaml` (local hooks run on your next commit),
`pyproject.toml`, tests and `conftest.py`, scripts, the CI workflows.
- **`.git`, read and write.** The agent commits through it, and can create commits that change
`ai/`. It can also plant git configuration that runs commands on the host, e.g. a
`core.fsmonitor` that runs on the next `git status`, or hooks that run on the next commit. It
does not need to touch `.git/config` or `.git/hooks` for that: git also reads configuration and
hooks from the directory named in `.git/commondir`. Read-only mounts of single files in `.git`
cannot prevent this, so the sandbox does not pretend to. Check `.git` before you run any git
command on the host (see [](#ai-review-checklist)).
- **The home volume.** It persists between sessions, so a misled session can leave state behind
that takes effect later: agent settings and hooks in `~/.claude`, `~/.gitconfig`, the virtual
environment in `~/.cache`. If a session may have been misled, remove the volume
(`docker volume rm akkudoktor-ai-home`) and log in again.
- **The internet.** The agent can download code and send data. Do not put secrets into the
repository directory.
- **The logins in the home volume.** A GitHub login in the sandbox lets the agent push to every
repository the login can write to. That's why pushing from the host is recommended.
- **The skills, if enabled.** With `AI_SANDBOX_SKILLS_RW=1` the agent can change the rules that
later sessions follow.
(ai-review-checklist)=
### Check the changes before you push
Do this on the host, before you run the agent's changes there and before you open or update a pull
request. Start with `.git`, before you run any git command, because a planted configuration
runs on the first one, even on `git status` or `git diff`:
- Look at `.git` with plain file tools: `ls -la .git`. There must be no `commondir` file and no
unexpected files or directories (a normal `.git` holds `HEAD`, `config`, `description`, `index`,
`hooks/`, `info/`, `logs/`, `objects/`, `refs/` and some `*_HEAD`, `COMMIT_EDITMSG`,
`packed-refs`, `modules/` or `worktrees/`). Read `.git/config` with a text viewer and look for
`core.hooksPath`, `core.fsmonitor`, `core.sshCommand`, `filter.*` and `include*` entries you did
not add. List the active hooks: `ls .git/hooks` (anything not ending in `.sample`). If anything
looks wrong, do not run git; remove the planted files first.
- Review the full diff against the target branch, including every commit:
`git diff main...HEAD` and `git log -p main..HEAD`. The agent may have committed changes that
are no longer visible in the working tree.
- Check `git status` for unexpected modified and untracked files, and `git status --ignored` for
unexpected ignored ones.
- Look closely at changes to files the host runs: `Makefile`, `.pre-commit-config.yaml`,
`pyproject.toml`, `conftest.py` and tests, `scripts/`, `.github/`, `ai/` and `ai/skills/`.
- Cross-check the effective local git configuration: `git config --local --list --show-origin`.
Every entry must come from `.git/config`.
- If you suspect that a session was misled, discard its changes and reset the home volume.