Troubleshooting
Common failures and what to check first.
What to check first, in order. No guessing: verify with the command or file cited.
No key / auth errors
Symptom: chat errors inline with a /provider pointer, or provider HTTP 401.
- Check env wins over stored:
OPENCODE_ZEN_API_KEY,OPENAI_API_KEY,ANTHROPIC_API_KEY,DEEPSEEK_API_KEY,MISTRAL_API_KEY,GEMINI_API_KEY(orGOOGLE_API_KEY) - Run
/provider, repaste the key. Validated before storage in~/.atom/auth.json(0600POSIX) - Keys display masked (last4 only). If you see
(no key), nothing resolved for that provider openai-compatibleis stored-only. Confirm both stored key and stored baseURL (must be http/https)
Never print full keys, never commit them, never put them in fixtures.
Keys stay masked
Keys display as last4 only. If you see (no key), nothing resolved for that provider — repaste via /provider rather than retrying the failed call.
Model list fails
/model falls back to the curated list when the live /models call fails. That is expected offline. Check endpoint override (OPENCODE_ZEN_ENDPOINT), network, and key validity before assuming a bug.
reasoning_effort is sent only for opencode-zen supported models. Elsewhere it is stored but never sent.
Tool approval confusion
/modeprints the current mode.Tabor/yolotoggles yolo/trusttoggles session trust (+trustin status). Again revokes/ruleslists allow/deny rules. Deny wins over trust, yolo, always, and skill grants- A denial returns the standard denial result. Do not retry the same call; replan
readbeforeedit:editrefuses with a stale-read error when the file changed since the last read. Read again, then edit
See Permissions and Tools.
Session and compact issues
/resumereports missing or corrupt:~/.atom/session.jsonis absent or malformed. Caller starts fresh with a one-line notice. Only completed turns save, so a failed turn never clobbers the last good save- Compact failures suggest
/clear. Overflow retries once after dropping the oldest half of user-turns. Thrash guard disables auto-compact after 3 consecutive failures token: n/ameans no usage reported yet. Not an error- Bare
token: NKmeans the model has no verified window insrc/context-windows.ts. Not an error
See Sessions and Compaction.
Web tools blocked
websearchmay returnError: websearch blocked by DuckDuckGo bot protection (HTTP 403; best-effort search — retry later). Retry later; the endpoint is best-effortwebfetchupgrades http to https (noted), allows only http/https, caps downloads at about 1MB and output at about 64KB. Large pages spill to an overflow file with areadpointer
TUI does not start
npm startneeds a TTY. Run in an interactive terminal, not a piped script- Check Node
>=18and a cleannpm install atom --helpshould print usage without starting the TUI. If that fails, checknpm run buildandnpm run typecheckoutput first
Reporting a bug
Include: command run, provider and model from the status line, token segment text, approval mode, full error string (shortest decisive line, not a dump), and what npm test plus npm run typecheck report.