Toolbox

Troubleshooting

Symptoms, causes, and fixes for the failure modes users actually hit. Bridge-specific issues live in bridge troubleshooting.

Config or port edits don't take effect

Symptom: you edited .toolbox.yaml (mounts, env, proximo) or re-ran toolbox shell -p <port> / -B, but the running container behaves as before.

Cause: mounts, port bindings, and env vars are fixed at ContainerCreate — Docker accepts no post-hoc changes, and toolbox shell reattaches to an existing container instead of recreating it.

Fix: toolbox stop, then re-run toolbox shell …. The container is disposable; all persistent state lives on the ~/.toolbox/ binds, so nothing is lost.

A shell stays in toolbox list after every terminal closed

Symptom: toolbox list shows a container whose status ends in (detached), and it keeps running with no terminal open.

Cause: it is a Detached Shell: created without a terminal, it outlives every terminal attached to it, by design (ADR 0022).

Fix: toolbox stop <name>, with the name toolbox list prints, or toolbox stop --all.

"exists and is not detached: run toolbox stop … first"

Symptom: starting a detached shell fails with container <name> exists and is not detached: run toolbox stop <name> first.

Cause: an ordinary shell already holds the container name. The detached label is fixed when a container is created, so that shell cannot become detached, and handing it back would leave it to die with its last terminal.

Fix: close what runs in that shell, toolbox stop <name>, then start the detached shell again.

Port already in use on the host

Symptom: toolbox shell -p <port> fails at container start with a Docker "address already in use" error.

Cause: another host process (or another toolbox container) already binds that host port.

Fix: find and stop the listener (lsof -i :<port> on macOS/Linux) or publish a different host port (-p <other>:<port>). If the conflict is another workspace's toolbox container, toolbox stop <name|dir> it first.

"unknown mount name" at startup

Symptom: toolbox shell fails immediately with an error about a mounts: entry referencing an unknown name.

Cause: a patch entry (no target:) names a mount that isn't a default and isn't a user entry — usually a typo. Failing loud at Plan() is deliberate, so typos surface immediately instead of silently appending a broken mount.

Fix: check the spelling against the default names in mounts (toolbox mounts list shows the effective set; the CLI suggests close matches). To add a genuinely new mount, set target: too (append form).

npx reports ECOMPROMISED or Lock compromised

Symptom: an npx invocation that spends long enough installing a package aborts with ECOMPROMISED / Lock compromised, commonly on Docker Desktop.

Cause: the container predates the container-local _npx mount, or an explicit mount still places /home/toolbox/.npm/_npx on a host filesystem whose inode identity is unstable. npm checks that identity while holding its install lock and treats a change as compromise.

Fix: run toolbox stop --all and reopen the shell so its fixed-at-create mount set includes the _npx tmpfs. If you explicitly mount _npx, remove that entry or point it at storage with stable inode identity. The old default cache data is safe to remove while no sessions are running:

$ rm -rf ~/.toolbox/npm-cache/_npx

This removes only regenerable npx installation trees; npm's reusable _cacache remains persistent.

Nerd Font placeholders in the prompt

Symptom: the starship prompt shows ? / ▢ replacement glyphs instead of icons (git branch, kubernetes, language logos).

Cause: the host terminal has no Nerd Font configured — glyphs are rendered by the host terminal, not the container.

Fix: install a Nerd Font on the host and select it in your terminal profile, e.g. brew install --cask font-jetbrains-mono-nerd-font. (Background on why the bundled prompt pins specific glyphs: shell-start internals.)

xdg-open, code, or OAuth login does nothing

See bridge troubleshooting — the usual causes are the bridge daemon not installed (toolbox bridge install), not running (toolbox bridge status), or a version-skewed host CLI. For OAuth callbacks that never reach the in-container CLI, see the loopback bridge.

herdr plays no sound when an agent finishes

Symptom: herdr's agent-state chimes never sound, with nothing on screen to say why. ~/.config/herdr/herdr-client.log carries sound playback failed … no mp3-capable audio player available, naming all five players it tried.

Cause: the container has no audio backend and none of the five players herdr spawns, no /dev/snd and no sound-server socket. The playback is handed to the host instead, over the bridge.

Fix: install the bridge (toolbox bridge install on the host — toolbox bridge status if it is already installed), and make sure the host CLI is new enough to serve /sound: an older daemon answers 404 and the shim fails through exactly as if no player existed. Then check the herdr side, ui.sound.enabled and the optional ui.toast.delivery banner — agent sounds documents both, and a running herdr server needs herdr server reload-config before it sees a config edit.

Sounds still only sometimes? Two rules drop a chime, and the daemon log says which one did. herdr's own predicate is the first, and it is not the bridge's: Request (an agent waiting on a human) always fires, while Done fires only when the pane's tab is inactive or the terminal window is unfocused. Panes in the same tab share that state, so a single-tab split layout stays quiet on Done while you are looking at it. The bridge adds the second: a chime that arrives while a player is still running is dropped — sound: skipped — because a chime lasts seconds and two players on one output device replay the same MP3 out of phase, heard as one garbled chime rather than as two.

A chime that garbles or cuts is the third case, and the reaping goroutine's line is where it is read: sound: player done after 1.9s next to a two-second MP3 puts the truncation past the player, in the host's output device, while sound: player failed after 12ms with the player's own stderr quoted after it puts it in the payload or the device the player opened. sound: ok alone only says the request arrived.

herdr opens in /home/toolbox instead of the workspace

Symptom: the toolbox shell lands in the mounted workspace, but herdr launched from there opens on a workspace labelled ~ sitting in /home/toolbox. Relaunching from the right directory changes nothing.

Cause: the launch cwd only ever creates herdr's first workspace. ~/.config/herdr/sessions/$HERDR_SESSION/session.json persists the workspace list with absolute cwds, and on restore herdr logs restored session already has workspaces; ignoring startup cwd — the directory you launched from is discarded. A persisted cwd this container does not mount then draws saved pane cwd does not exist, falling back to HOME: that workspace reopens on /home/toolbox, labelled ~. herdr saves the fallback, and /home/toolbox exists, so the warning never fires again — the stray workspace is restored on every start, and any launch that focuses it starts you there.

Fix: herdr workspace list to find the one labelled ~, then herdr workspace close <workspace-id>. The next save drops it and the workspace you care about is the only one left to restore.

Check before closing. herdr api snapshot prints every pane's live cwd, so you can tell the stray workspace from a real one that merely looks idle. Both log lines above live in that session's own server log, ~/.config/herdr/sessions/$HERDR_SESSION/herdr-server.log. If the whole list is disposable, herdr server stop and delete that session's session.json — with nothing to restore, the next launch honours the launch cwd again.

This is not the cross-project variant. ~/.config/herdr is one host-global bind shared by every toolbox container, which is why sessionplan names each herdr session after the workspace (HERDR_SESSION, internal/sessionplan/plan.go) — unnamed, every container reopened whatever another project saved last, a path it does not mount, and landed on /home/toolbox by the same fallback. That keeps other projects out of your session; it does nothing about a path inside your own session that stopped existing — a deleted clone, a pruned worktree, a renamed directory.

Stale local branches pile up after merges

Symptom: git branch lists many local branches whose PRs were already merged — squash-merged branches (the local copy isn't recognised as merged) and leftover worktree-agent-* branches from agent worktrees.

Cause: a squash merge rewrites history, so git branch -d refuses the branch as "not fully merged"; the remote branch is gone but the local tracking branch lingers. Agent worktrees leave throwaway branches behind once their worktree is removed.

Fix: after the merge, git switch <default-branch> && git pull --ff-only && git fetch --prune && wt step prune. Worktrunk deletes a branch, and removes its worktree, only when the branch adds nothing to the default branch, squash merges included (wt remove --help lists the checks). wt step prune --dry-run lists what it would take and why. The image's prune post-start hook runs wt step prune whenever wt switch -c creates a worktree (what the image configures).

The proof is the content, not the forge. A squash-merged PR and one closed without merging leave the same local state, upstream gone and commits unreachable from the default branch, so a gone upstream proves nothing. Worktrunk asks whether deleting the branch would lose any change; a branch with commits made after the merge, or one whose work was never merged, is kept. It needs no forge, login or network.

What it keeps that you may want gone. Branches and worktrees younger than Worktrunk's --min-age are skipped, so a worktree just created from the default branch, which looks merged, survives; a branch merged soon after it was created goes at the first prune once it is past that age. A squash merge followed by more default-branch commits than Worktrunk's history walk covers stays as well: delete it with wt remove -D <branch> once you have checked it is merged. Worktrees with uncommitted changes, locked ones, ones holding another worktree and the main worktree are never removed, and a candidate whose remove hooks include an unapproved project command is skipped as approval required until you approve it (wt config approvals add) or pass --yes.

git push is refused for a change under .github/workflows/

Symptom: pushing a branch that touches a workflow fails with refusing to allow an OAuth App to create or update workflow … without 'workflow' scope.

Cause: github.com is still on the git credential bridge — no gh login in the container, or inherit_host_auth: [gh] with a token only in the host keychain — so git pushes with the host keychain's credential, an older OAuth App token without the workflow scope. A container gh login makes gh the Credential Owner from the next start, and this entry no longer applies.

Fix, once, in the container: give gh the scope (gh auth refresh -h github.com -s workflow), then push through it for this one command:

git -c credential.helper= -c 'credential.helper=!gh auth git-credential' push -u origin <branch>

The empty credential.helper= clears the bridge for this invocation only.

Fix, durable, on the host: replace the stored credential with one that carries the scope. On the host, gh auth refresh -h github.com -s workflow, then drop the stale keychain entry (printf 'protocol=https\nhost=github.com\n\n' | git credential reject, or delete it in Keychain Access). The next push prompts in the container: answer with your GitHub username and, as password, the output of gh auth token on the host; the bridge stores it in the keychain for every later push. Prefer this over gh auth setup-git on the host: that writes a github.com-specific helper into ~/.gitconfig, which the container mounts too, and its empty reset line takes the bridge out of the container's lookup for github.com.

An agent command is blocked by the agent guardrails

Symptom: Claude Code, Codex or pi reports a Bash command Blocked: before it runs.

Cause: the image's agent guardrails refuse these commands by design:

Fix: do what the reason says: put the files under the workspace and mount their host path (a path under $TOOLBOX_HOST_WORKSPACE as it is, one under /workspace with that prefix swapped for $TOOLBOX_HOST_WORKSPACE), git add <path> before committing, git stash push -- <path>, git stash list then git stash pop stash@{n}, git reset --keep <target>, the files named after -- for checkout, restore and clean (git clean -n to review first). For a command you mean as written, run it yourself from the agent's prompt with !; there is no switch to turn the guardrails off.

A repo's graphify, codegraph or playwright-cli setup is out of date

Symptom: after an image update, the /graphify or playwright-cli skill, the graphify hooks or codegraph's MCP config in a repo still match the version you opted in with.

Cause: these installs live in the repo, and nothing refreshes them at container start: a toolbox is usually opened on a parent folder, and an image update must not rewrite tracked files on its own (Repo Install Refresh).

Fix: run toolbox-refresh from anywhere inside the repo (toolbox-refresh graphify for one tool). It re-runs the installers of the tools the repo opted in to and re-syncs the global agent skills; a repo that never ran graphify-init, codegraph-init or pwcli-init is left alone.

A commit made from the host fails with "pre-commit not found"

Symptom: in a repo where you ran pre-commit install inside the toolbox, a commit made on the host (terminal or a git GUI) stops with `pre-commit` not found. Did you forget to activate your virtualenv?.

Cause: the hook lives in the repo's .git/hooks, which a repo under a host path shares with the host. It runs the Python it recorded at install time (/opt/pre-commit/bin/python3, inside the image), then falls back to pre-commit on PATH; on the host the first does not exist, so without the second the hook exits 1.

Fix: install pre-commit on the host (brew install pre-commit, pipx install pre-commit, …). A git GUI needs it on the PATH it launches with, which may not be your shell's. It keeps its hook environments in the host's own ~/.cache/pre-commit, apart from the container's pre-commit-cache mount, so the first host commit builds them once. To drop the hook instead: pre-commit uninstall in the repo.

A new .test app is unreachable from the container

Symptom: https://<name>.test works in the host browser but fails to resolve/connect inside a shell that was already open.

Cause: a current shell normally follows proximo's Effective Route Inventory automatically. If it does not, the initial best-effort sync failed, the container predates the inventory mount, proximo's stack has not been re-materialized since gaining the inventory, or proximo-hosts --watch stopped; its log is ~/.toolbox-state/proximo-hosts.log.

Fix: run proximo up on the host to materialize the inventory, then toolbox stop and reopen the shell once to add its read-only mount. Later route changes need no recreate. Details: proximo runtime host sync.

"manifest unknown" with a registry mirror

Symptom: with registry_mirror configured, the first toolbox shell on a machine warns about a failed pull (manifest unknown / not found from the mirror), then aborts with image "<mirror>/filippolmt/toolbox:latest" not available locally and pull failed — check registry access.

Cause: a pull-through cache (Harbor proxy project, ECR pull-through, Artifactory/Nexus remote repo) only copies an image from GHCR when something asks for it — and some return manifest unknown on the very first request while they ingest the upstream copy asynchronously; replication-based mirrors serve nothing until a replication run completes. The registry refresh is best-effort, but on a first shell there is no local copy to fall back to, so imageplan.Ensure fails loud instead of starting a container without an image. Only successful pulls stamp the refresh TTL cache, so the failed attempt doesn't poison later ones — a retry asks the mirror again.

Fix: warm the cache before the first shell — docker pull <mirror-host>/filippolmt/toolbox:latest (re-run once if the mirror 404s while it ingests). Once the mirror serves the manifest, toolbox shell works with the default pull: auto. Alternatively take the registry out of the startup path entirely: pull manually from the mirror as above, then set toolbox config set --pull never --where global — the local copy becomes authoritative and no round-trip happens at shell start. Note the presence check is by exact ref: an image pulled from GHCR directly needs a retag first (docker tag ghcr.io/filippolmt/toolbox:latest <mirror-host>/filippolmt/toolbox:latest). Mechanism and precedence: image selection.

herdr reopens in the wrong directory

Symptom: herdr, launched from a project directory, opens its pane somewhere else — usually /home/toolbox, where a plain ls lists only go because everything else in the home is a dotfile.

Cause: herdr restores its persisted session and discards the launch directory — its own ~/.config/herdr/herdr-server.log says so verbatim: restored session already has workspaces; ignoring startup cwd. The session lives in ~/.config/herdr/session.json, bind-mounted to ~/.toolbox/herdr/config on the host, so the directory recorded at the first launch outlives every toolbox stop and container recreate. That persistence is deliberate — without the bind, every detachable session, plugin, and config setting would wipe on toolbox stop, which is herdr's whole value (toolbox mounts list shows the herdr and herdr-state entries).

Fix: herdr has no supported reset for the default session (herdr session delete default refuses), so delete the file with the server stopped:

$ herdr server stop
$ rm ~/.toolbox/herdr/config/session.json   # host path; ~/.config/herdr/session.json inside the container

The next launch records the directory it started from. Note that this clears a stale pin, it does not change the behaviour: a restored session always wins over the launch directory. For more than one project, give each its own session — herdr --session <name> — instead of resetting between them.

A herdr agent integration disappears or goes stale

Symptom: herdr integration status reports an integration you had installed as not installed after a toolbox stop, or as outdated against the herdr the image now ships.

Cause: herdr installs its integrations into each agent's own config directory, not under ~/.config/herdr — so the herdr and herdr-state binds do not cover them, and survival depends entirely on whether that agent's directory is itself a mount. claude (~/.claude/hooks/), codex (~/.codex/) and pi (~/.pi/agent/extensions/) are bundled tools with a row in internal/catalog, so they land on the ~/.toolbox/.claude, ~/.toolbox/.codex and ~/.toolbox/.pi binds and persist. A user-installed agent does not: opencode, for instance, is an npm global whose binary survives through ~/.npm-global, while the integration herdr drops into ~/.config/opencode/plugins/ — like everything else it writes outside the mounts — is gone after toolbox stop. Persistence cuts both ways, and that is precisely why the bundled case is automated: because those registrations outlive a recreate, they would otherwise stay pinned to the herdr that installed them. internal/build/assets/init.d/61-herdr.sh rewrites the claude and pi ones on every container start, so the binary in the container is always the authority for its own hook. codex is the exception: its hook ships in the image's /etc/codex/hooks.json, built from the same herdr, where Codex runs it with no trust prompt — so herdr integration status, which looks in ~/.codex/, reports it not installed while it works.

Fix: for a bundled agent, toolbox stop and open a new shell — the recreate re-runs the install against the herdr the new image ships. A stale registration that survives that is a real failure, and the script says so on stderr at boot; ~/.toolbox/state/init/61-herdr.log has the detail, and herdr integration install <name> re-runs it by hand. For a user-installed agent there is nothing to automate against — re-run the install after every recreate, or, better, move its config directory onto a mount so it stops vanishing: see persisting a user-installed tool's state. herdr integration status lists the state of all of them.

The Orca server does not start

Symptom: toolbox orca fails with orca: no server started: <reason>; read <log>, and the Orca Shell is gone from toolbox list.

Cause: the installer in the Orca Shell gave up before any server ran and wrote a toolbox: orca: fatal: <reason> line to serve.log. The usual reasons: the download failed while nothing was cached (offline, or GitHub unreachable), or the archive did not match the release's checksum. toolbox removes the Orca Shell so no container runs without a server.

Fix: read the fatal: line in the log the error names (~/.toolbox/toolbox/state/orca/serve.log without a profile). Offline with an empty cache: connect and run toolbox orca again. A checksum mismatch: retry once; if it persists, the release asset is not the one its checksum file describes, so pin another version with --version. See Orca: offline and port and log.

The Orca server stops with EINVAL on a socket

Symptom: toolbox orca fails with orca: the server stopped (...), and serve.log ends with orcad: failed to start: EINVAL ... chmod .../o-<pid>-<x>.sock, followed by toolbox: orca: server stopped with status 1.

Cause: the Orca Shell was created by a toolbox that kept Orca's data directory on the state mount. Orca creates its sockets there, and Docker Desktop's host file sharing refuses to chmod a socket.

Fix: toolbox orca stop, then toolbox orca: the new Orca Shell keeps its data on the toolbox-orca-data volume. The desktop app pairs again: nothing is migrated, so the old pairing identity stays behind. The old ~/.toolbox/toolbox/state/orca (under ~/.toolbox/profiles/<name>/ with a profile, or your mounts_root) may still hold that identity and Orca's unencrypted credentials besides server/; with the Orca Shell stopped, it is safe to delete whole. See port and log and what Orca changes in your toolbox config.

hc-host refuses or cannot reach the host

See Host terminals.

herdr-core cannot start: Permission denied

Symptom: toolbox herdr fails with herdr-core could not register the machine toolbox: hc machine add: … cannot start core: Permission denied (os error 13).

Cause: herdr-core cannot write its state directory, ~/.toolbox/herdr-core (under ~/.toolbox/profiles/<name>/ with a profile, or your mounts_root), because it belongs to another user. Toolbox creates it as you, so this follows a copy or a sudo that changed its owner. An older toolbox kept the state on a volume, toolbox-herdr-data, which an interrupted initialiser could leave root-owned; that volume is no longer used (where the state lives). The Orca data volume (toolbox-orca-data) and the peer socket volume (toolbox-cc-socks) still go through that initialiser and can be left root-owned the same way.

Fix: check the owner with ls -ld ~/.toolbox/herdr-core, then toolbox herdr stop, sudo chown -R "$(id -u):$(id -g)" ~/.toolbox/herdr-core and toolbox herdr. A volume's owner shows with docker run --rm --entrypoint stat -v toolbox-orca-data:/v ghcr.io/filippolmt/toolbox:latest -c '%a %u:%g' /v: 755 0:0 is the broken state. For Orca: toolbox orca stop, docker volume rm toolbox-orca-data, toolbox orca, which pairs again. For toolbox-cc-socks, a silent failure (Claude Code falls back to a private /tmp directory and sees no peer): close every toolbox shell, then docker volume rm toolbox-cc-socks.

Orca pairing is unavailable

Symptom: toolbox orca fails with orca: the server is up but pairing is unavailable (<reason>): <guidance>, or toolbox orca pair fails asking the Orca Shell for a pairing link.

Cause: the server runs but refuses to offer a pairing link; the reason and guidance are Orca's own, copied from its readiness record or its pair command.

Fix: follow Orca's guidance, then toolbox orca pair, which asks the running server for a fresh offer. The Orca Shell keeps running meanwhile; when the server itself is the problem, toolbox orca stop and start again. See Orca: pairing.