Troubleshooting
Diagnose common image, mount, terminal, SSH, browser, clipboard, and host-service problems.
View source MarkdownStart here:
ags doctorMost issues are visible in doctor output.
error: required mount source missing#
A required mount path in config does not exist.
Fix#
- Create the path on host, or
- mark mount as
optional = true, or - set
create = true(for paths safe to auto-create)
Container image missing or outdated#
Symptoms:
- image-not-found errors
- old runtime dependencies
Fix#
ags update-imageThen if needed:
ags update-agentsbr / dcg missing inside container#
If bundled sandbox commands are missing or stale.
Fix#
ags update-image
ags --agent shell -- -lc 'br --version && dcg --version'ags update-image refreshes from upstream releases:
beads_rust(br): https://github.com/Dicklesworthstone/beads_rust/releasesdestructive_command_guard(dcg): https://github.com/Dicklesworthstone/destructive_command_guard/releases
For each tool, AGS selects the newest stable release containing both the required archive and its checksum for the image architecture. If a newer release only publishes assets for other platforms, AGS warns and uses the newest compatible release instead.
Startup warning: dcg is missing and Pi/Claude guards will fail open#
Symptoms:
ags doctorreports bundleddcgmissing inside the sandbox imageags --agent piorags --agent claudeprints a startup warning aboutdcg- Pi also shows an in-session warning that Bash classification will fail open
Fix#
ags update-image
ags doctor
ags --agent shell -- -lc 'dcg --version'If you intentionally want to bypass AGS guard layers for a single Pi/Claude run, use:
ags --agent pi --yolo
ags --agent claude --yolopsql missing inside container#
If psql is not found in sandbox shell.
Fix#
ags update-image
ags --agent shell -- -lc 'psql --version'tmux missing when using --tmux#
Symptoms:
ags --agent <name> --tmuxfails withtmux: not found- or AGS prints a message telling you to rebuild the sandbox image
Cause:
- your existing sandbox image was built before tmux support was added
Fix#
ags update-image
ags --agent shell -- -lc 'tmux -V && test -f ~/.tmux.conf'Glimpse falls back to Chromium / Chrome detection#
Symptoms:
- logs mention
No Chromium or Chrome installation found - sandboxed
glimpseuicode behaves like ordinary Chromium fallback mode instead of opening a host-owned window
Cause:
- AGS host UI is disabled or misconfigured
- your
agsbinary is stale - your sandbox image is stale
- you are still using an old AGS session
Fix#
Verify your config has a real [host_ui] setup, then rebuild and restart:
cargo build --release -p ags
ags update-image
ags doctorStart a fresh session, then verify the runtime wiring:
ags --agent shell -- -lc 'echo "$AGS_HOST_UI_SOCK"; echo "$GLIMPSE_BINARY_PATH"; ls -l /opt/ags/glimpse-shim'Expected:
AGS_HOST_UI_SOCK=/run/ags-host-ui/host-ui.sockGLIMPSE_BINARY_PATH=/opt/ags/glimpse-shim/opt/ags/glimpse-shimexists
For a user-facing overview, see docs/GLIMPSE.md.
Pi Ctrl-V image paste or /copy clipboard actions fail#
Symptoms:
- Pi Ctrl-V image paste reports no clipboard data or
wl-pasteerrors /copyreports clipboard failures from inside the sandboxecho "$AGS_CLIPBOARD_SOCK"is empty
Cause:
[clipboard].enabledis false ormode = "off"- the AGS binary/session predates the clipboard bridge
- host
wl-paste/wl-copyis unavailable or cannot access your host clipboard - payload exceeded
[clipboard].max_bytes - clipboard approval was denied or no dialog renderer was available
Fix#
Verify bridge wiring in a fresh session:
ags --agent shell -- -lc 'echo "$AGS_CLIPBOARD_SOCK"; echo "$AGS_CLIPBOARD_MODE"; echo "$XDG_SESSION_TYPE"; command -v wl-paste; command -v wl-copy'Expected:
AGS_CLIPBOARD_SOCK=/run/ags-clipboard/clipboard.sockAGS_CLIPBOARD_MODE=readorreadwriteXDG_SESSION_TYPE=waylandwl-paste/wl-copyresolve to/home/dev/.local/bin/...
If the bridge is intentionally disabled, enable it in config:
[clipboard]
enabled = true
mode = "readwrite"
approval_required = true
approval_seconds = 300Clipboard reads prompt on the host by default. Enable [host_ui] for the branded dark/light-aware dialog, or install zenity/kdialog for the fallback. If you intentionally want the old session-wide bridge behavior, set approval_required = false.
For raw GUI clients, do not rely on clipboard settings; use the explicit --wayland-compositor-passthrough flag only when you intentionally want broad desktop access.
SELinux alerts mentioning pasta and your source tree#
Symptoms:
- host notifications or logs mention SELinux blocking
pasta - messages refer to a directory like
codeor your repo path
Cause:
- a previously relabeled bind mount left the wrong SELinux context on part of your worktree
Fix#
Restore labels on the affected tree:
restorecon -RFv /home/$USER/code/agent-sandboxIf your repos live elsewhere, run restorecon on the appropriate parent path instead.
missing or unsuitable terminal: xterm-kitty in tmux#
Symptoms:
- running
tmuxinside the sandbox fails withmissing or unsuitable terminal: xterm-kitty
Cause:
- your host terminal exports
TERM=xterm-kitty - the sandbox image needs kitty terminfo entries available for tmux to start cleanly
Fix#
Rebuild the image so the sandbox includes kitty-terminfo:
ags update-image
ags --agent shell -- -lc 'echo "$TERM" && tmux -V'Temporary workaround if you need it before rebuilding:
TERM=xterm-256color ags --agent shellCannot reach host service from agent (localhost confusion)#
Symptoms:
- Service works on host but fails from inside agent/shell
curl http://localhost:<port>fails in sandbox
Cause:
- Agent runs inside container, so
localhostpoints to container itself.
Fix#
Use host gateway name instead:
curl http://host.containers.internal:<port>Example:
ags --agent shell -- -lc 'curl http://host.containers.internal:3000/health'You can verify runtime hint env vars too:
ags --agent shell -- -lc 'echo "$AGS_HOST_SERVICES_HOST" && echo "$AGS_HOST_SERVICES_HINT"'Agent CLI missing inside container#
If command like pi, codex, gemini, opencode, or claude is missing/old.
Fix#
ags update-agentspnpm reports ERR_PNPM_UNEXPECTED_STORE, MODULE_NOT_FOUND under /usr/local/pnpm, or Pi loads from .npm-global#
Cause:
- a pnpm self-update or install script wrote pnpm's own shims into the persistent agent runtime volume
- old npm-global agent installs can shadow the pnpm-managed AGS agent shims
- those shims can disagree with the store used by the globally installed agent CLIs
Fix#
ags update-image
ags update-agentsAGS keeps agent CLIs in /usr/local/pnpm, but runtime pnpm should come from the sandbox image (/usr/local/bin/pnpm) so stale persistent shims do not shadow it. update-agents also removes old npm-global pi/codex/gemini/opencode shims from the sandbox cache.
SSH problems (git auth/signing)#
Symptoms:
- cannot push
- signing fails
- keys not loaded
Fix#
- Re-run setup:
ags setup - Confirm public keys are added in GitHub:
- auth key as SSH key
- signing key as SSH signing key
- Re-run:
ags doctor
If keys are passphrase protected, ssh-add may prompt interactively.
Secret not available inside container#
Symptoms:
- tool auth failures
- missing token env vars
Check#
- Is
[[secret]]/[[tool.secret]]configured correctly? - Is source env var actually set and non-empty?
- If using
secret_store, doessecret-tool lookup ...return a value? - If using
command, is the executable present and executable on the host? - Does the helper finish within five seconds, exit
0, and print exactly one non-empty UTF-8 value (optionally followed by one\nor\r\n)? - Is the command declared in the user/global config? Repo-local
.ags/config.tomlcommand sources are rejected. - Run
ags doctor; it checks command availability and lookup success without printing the resolved value or helper stderr/stdout.
Fix#
- Re-run
ags setupto re-enter secrets (if using interactive keyring flow) - Export env vars before launching
ags - Run the configured helper directly on the host to diagnose native credential-store access. Avoid sharing its output in logs or bug reports.
Command helpers receive only PATH, HOME, USER, LOGNAME, DBUS_SESSION_BUS_ADDRESS, and XDG_RUNTIME_DIR when those variables exist. If a helper depends on other ambient host variables, wrap it in a narrowly scoped adapter that establishes only the required context. Resolved values are delivered as ordinary container environment variables and can be inspected by sandboxed processes.
Browser mode fails#
Symptoms:
--browserexits early- debug endpoint not reachable
Check#
[browser].enabled = true[browser].commandexists and executable[browser].profile_diris valid[browser].debug_portis non-zero and free
Fix#
ags doctor
ags --agent pi --browserIf needed, try a different debug port.
Auth proxy: URL opens are auto-denied#
Symptoms:
- Agent tries to open a URL (e.g. OAuth login) but nothing happens
- Shim logs show
prompt denied
Cause:
- No AGS dialog renderer is available, so the proxy cannot show the allow/deny dialog and defaults to deny.
Fix#
Enable the branded Glimpse-backed host UI dialog via [host_ui], or install a fallback dialog tool:
# Debian/Ubuntu (GNOME)
sudo apt install zenity
# Fedora (GNOME)
sudo dnf install zenity
# KDE
sudo apt install kdialog # or: sudo dnf install kdialogAuth proxy: socket connection failures#
Symptoms:
- Shim prints
failed to connect to auth proxy socketor times out - OAuth flows hang
Cause:
- The per-run runtime directory or socket was not created (e.g.
$XDG_RUNTIME_DIRis missing or not writable).
Fix#
Verify your runtime dir:
echo "$XDG_RUNTIME_DIR"
ls -la "$XDG_RUNTIME_DIR"If unset/missing, set it before running ags:
export XDG_RUNTIME_DIR="/run/user/$(id -u)"MCP server re-authenticates every session#
Symptoms:
- MCP servers (e.g. Linear) ask to re-authenticate on every
agsrun - OAuth tokens are not persisted
Cause:
- MCP auth tokens are stored in
~/.mcp-authinside the container, which is ephemeral by default.
Fix#
Mount the token directory from your host:
[[mount]]
host = "$HOME/.mcp-auth"
container = "/home/dev/.mcp-auth"
mode = "rw"
kind = "dir"
create = trueTo also skip the allow/deny dialog for known providers:
[auth_proxy]
auto_allow_domains = ["mcp.linear.app"]Auth proxy: OAuth callback not received#
Symptoms:
- Browser opens the OAuth provider page and redirects to
localhost:<port>/callback - But the agent inside the container never receives the auth code
Cause:
- The callback port was already in use on the host when the proxy tried to bind it.
- Or the OAuth provider uses a non-standard callback parameter name that the shim does not detect.
Fix#
- Retry the flow — the proxy binds the callback port dynamically per session.
- If persistent, check for port conflicts:
ss -tlnp | grep <port>. - The shim detects
redirect_uri,callback_url,return_url, andredirect_urlquery parameters. Other parameter names are not recognized and will fall back to a simple (non-callback) URL open.
Config parse/validation errors#
Symptoms:
- startup fails with validation message
Fix#
- Compare your file with
config/config.example.toml - Verify enums are valid:
- mount mode:
ro|rw - mount kind:
dir|file - mount when:
always|browser
- mount mode:
- Verify required strings are non-empty
ags command not found#
If installed from source but not in PATH.
Fix options#
Run via cargo:
cargo run -p ags -- --agent piOr self-link:
cargo run -p ags -- install --link-selfEnsure ~/.local/bin is in PATH.
Alias/wrapper commands not found#
If you ran ags create-aliases but short names are missing.
Check#
- Wrappers mode writes to
~/.local/bin - Aliases mode updates shell rc and requires shell reload
Fix#
ags create-aliases --mode both
exec $SHELLPodman runtime issues#
Symptoms:
podmancommand failures- permission/network oddities
Check#
- Podman installed and working rootless
- user session has required Podman setup
Run a quick check:
podman infoThen rerun:
ags doctorImprove this page where the source lives.