Troubleshooting
Error messages you may see, what they mean, and the fix.
Messages you may see, what they mean, and the fix. Quoted text is what QQ
prints; … stands for a path or name specific to your machine.
First stop for anything: qq doctor. It runs every local readiness check and
puts the fix next to whatever failed. Its header reports the build and
compatibility versions, also available from qq version:
qq <version> (<commit> <build date>) · protocol 46 · capabilities 1 · descriptor 17 · store schema 67ok configuration 2 sources; qq config sources lists themok project trust nothing pendingok model anthropic/claude-sonnet-5fail credential anthropic: none found run `qq auth login anthropic` or set ANTHROPIC_API_KEYok credential store 0 stored (keyring)ok mcp none declaredok server none running; qq starts one on demandok workspace /home/you/repo (AGENTS.md)ok environment on the host: commands run as you, with this machine's network and credentialsok snapshots on: `qq undo` restores the workspace as it was before each runok data /home/you/.local/share/qq (no sessions yet)
1 check failedExit status 0 means nothing failed. Then qq config check, qq config sources, qq auth list for the detail behind any one line
(CLI › qq doctor).
Diagnostic tracing
Section titled “Diagnostic tracing”QQ_LOG=info is currently supported on Unix platforms only. On other platforms,
explicit activation fails without creating files; unset it to run normally.
QQ_LOG=info combined with --tui-qa-root is explicitly refused before file
creation; unset QQ_LOG for that isolated fixture.
Run QQ_LOG=info qq run "your task" (or start qq serve with the variable)
for JSON-line boundary timings. Logging is off by default; QQ_LOG=off or an
empty value also disables it. Other values are errors. Logs are separate from
stdout and stderr under the QQ state directory’s logs/qq-N.jsonl (on Linux,
${XDG_STATE_HOME:-$HOME/.local/state}/qq/logs). Platforms without a separate
state directory use the platform local-data directory.
With QQ_HOME set, logs instead go to <QQ_HOME>/data/logs.
Run, admission, turn, provider, retry-wait, tool, store, publish, render and
command startup spans record numeric ordinals, run/command IDs, fixed outcome
labels and timing, not prompts, model output, arguments/results, paths,
credentials or arbitrary provider errors. On normal exit the last line is a
summary with per-stage counts and times and dropped_records; see the
stage dictionary. Dependency tracing is excluded. This is a lossy diagnostic,
not an audit: queue pressure drops whole records, each file stops at 8 MiB,
and abrupt termination can lose queued records. Sixteen exclusive files cap
retention at 128 MiB. When all slots exist, remove old diagnostic files from
stopped processes before enabling logging again. Initialization and writer
failures produce a nonzero exit. For remote use enable it on the server, not
just the attached client.
Starting
Section titled “Starting”no model is configured. Choose one with any of: …
Section titled “no model is configured. Choose one with any of: …”QQ found no model: in any configuration layer and no --model /
QQ_MODEL. The message lists every way to set one and names your global
config path. qq init --model PROVIDER/MODEL writes that file; pick a
route from Providers;
Quickstart § 2 shows the
one-time setup. Only qq ask and qq run stop here; bare qq opens the
TUI and asks with /models instead.
project configuration needs your trust before it is used: …
Section titled “project configuration needs your trust before it is used: …”A file under this repository declares something sensitive (a model,
providers, MCP servers, profiles). Strict inspection commands such as
qq config check print this. qq, qq ask, qq run, and qq serve do
not stop: they start with that file’s sensitive settings switched off, and
qq config sources and qq doctor list it as pending trust. Read the
listed file(s), then run qq trust in that directory. Editing a trusted
file’s sensitive sections, including through git pull, switches them off
again until you trust it again. Trust is a decision about files on the host
that runs the server, so for a remote server run qq trust there.
Permissions › Project trust.
model route must use provider/model syntax: "…"
Section titled “model route must use provider/model syntax: "…"”The value must look like openai/gpt-5.6: one slash, both halves
non-empty.
model route selects an unknown or disabled provider: …
Section titled “model route selects an unknown or disabled provider: …”The half before the slash is not a built-in id and not declared under
providers, or policy.allowed_providers / denied_providers excludes it.
Built-ins: openai, anthropic, google, xai, openai-codex,
bedrock, bedrock-mantle.
model "…" is not in provider "…"'s authenticated model list; available routes: …
Section titled “model "…" is not in provider "…"'s authenticated model list; available routes: …”The provider is fine but the model is not in QQ’s catalog for it and not
declared under that provider’s models. Use one of the listed routes or
declare the model (Configuration › models).
failed to parse configuration source …: …
Section titled “failed to parse configuration source …: …”RON syntax. Common causes: a missing comma after the last field before ),
" vs ', a key QQ does not know (the message names it; unknown keys are
errors), a bare word where a string was expected (model: openai/gpt-5.6
needs quotes). Compare with Configuration.
configuration source … has unsupported version …; expected 1
Section titled “configuration source … has unsupported version …; expected 1”Every document needs version: 1,.
configuration file was discovered more than once: …
Section titled “configuration file was discovered more than once: …”Two layers resolve to the same file, usually a symlink into config.d/.
Remove one.
symbolic links are not accepted as configuration sources: …
Section titled “symbolic links are not accepted as configuration sources: …”Project files must be regular files. The global config.ron may be a
symlink to a regular file (for dotfile managers); nothing under .qq/ may.
configuration containing literal secrets is not private: …
Section titled “configuration containing literal secrets is not private: …”A file with Value("…") must be readable only by you (chmod 600). Better:
use Env(...) or Stored(...) and set policy.allow_literal_secrets only
when you must.
interactive mode requires a terminal; use qq ask ""orqq run "" in a pipe
Section titled “interactive mode requires a terminal; use qq ask ""orqq run "" in a pipe”orqq run " in a pipeBare qq needs a TTY on stdin and stdout. In scripts use
qq ask or qq run.
the platform configuration directories are unavailable
Section titled “the platform configuration directories are unavailable”HOME (or XDG_CONFIG_HOME / APPDATA) is unset or unusable. Set it, or
supply everything through QQ_CONFIG_CONTENT and environment credentials.
Credentials
Section titled “Credentials”no credential for provider openai: run qq auth login openaior set the environment variableOPENAI_API_KEY“
Section titled “no credential for provider openai: run qq auth login openaior set the environment variableOPENAI_API_KEY“”The model’s provider has no stored credential and no environment variable.
Do either. Check what is stored with qq auth list. The same shape appears
for anthropic / ANTHROPIC_API_KEY and for google, whose message ends
`GEMINI_API_KEY` (or `GOOGLE_API_KEY`): either variable works, and
GEMINI_API_KEY wins when both are set.
environment variable NAME is not set
Section titled “environment variable NAME is not set”Configuration references Env("NAME") explicitly and the variable is unset
in this shell.
provider response failed: no credential for provider xai: run qq auth login xai —oauthorqq auth login xaior set the environment variableXAI_API_KEY“
Section titled “provider response failed: no credential for provider xai: run qq auth login xai —oauthorqq auth login xaior set the environment variableXAI_API_KEY“”Same cause for providers that resolve credentials at request time (xai,
openai-codex), so it surfaces when the first request is sent rather than at
startup: nothing stored under PROVIDER/default and, for xAI, no
XAI_API_KEY. Run one of the commands named. openai-codex reads no
environment variable, so its message offers only qq auth login openai-codex.
With a configured profile the message names it instead: credential `xai/work` is not registered: run `qq auth login xai --oauth --profile work` or `qq auth login xai --profile work` …. If the entry exists but the
keyring lost its secret: credential `xai/work` is registered, but its secret is missing: run `qq auth logout xai/work`, then ….
credential … is not registered
Section titled “credential … is not registered”Configuration references Stored("name") and no such entry exists in
this machine’s credential store. qq auth set name (or qq auth login PROVIDER when the name is PROVIDER/default). If the reference came from a
repository’s committed config, that config should use Env(...) or live in a
local, uncommitted fragment (MCP › Where to declare it).
For a provider this fails the run. For an MCP server’s bearer it only
degrades that server: the run proceeds and the catalog reports
MCP servers need authorization: NAME (credential …is not registered; runqq
auth set …) (see below); qq doctor warns about it under mcp.
credential … is registered in OS keyring, but its secret is missing
Section titled “credential … is registered in OS keyring, but its secret is missing”The index knows the name but the keyring entry is gone (a keyring reset, a
different login session). qq auth logout name, then store it again.
credential … is bound to a different endpoint
Section titled “credential … is bound to a different endpoint”The stored secret was created with --endpoint for one host and the
provider’s base_url is another. Store a separate credential for the new
endpoint or re-store without the binding.
the OS keyring is unavailable while attempting to … credential …“
Section titled “the OS keyring is unavailable while attempting to … credential …“”Linux: no Secret Service on the session bus (a container, SSH without a
desktop session, or the keyring daemon not started). Start one (gnome-keyring -d, KeePassXC with Secret Service enabled), or use --allow-file to store a
user-only file, or use environment variables.
provider "…" is not authenticated; connect it before spawning on it
Section titled “provider "…" is not authenticated; connect it before spawning on it”A sub-agent’s route (from delegation.roster or /models) points at a
provider with no credential. Store one or remove the route.
"…" is not a built-in provider; qq auth login accepts openai, anthropic, google, xai, openai-codex
Section titled “"…" is not a built-in provider; qq auth login accepts openai, anthropic, google, xai, openai-codex”auth login binds the credential to a built-in endpoint, so it only takes
those ids (check the spelling). For a gateway or MCP bearer use qq auth set NAME and reference Stored("NAME").
Nothing in /models, or every row says needs credential
Section titled “Nothing in /models, or every row says needs credential”No built-in provider has a resolvable credential. Each needs credential
row names the fix: qq auth login PROVIDER or the environment variable.
qq auth list shows what is stored. Custom providers appear once their
auth reference resolves. Credentials are checked when qq starts, so
start it again after adding one.
Running
Section titled “Running”qq run denied everything
Section titled “qq run denied everything”--approval read-only denies every edit, shell, MCP, and network call.
--approval ask denies every non-read call because no human is present to
approve it. The default --approval auto runs edits and commands without
asking; under Auto, a denial means a fixed stop or a managed deny applied,
and the denial text says which.
Headless › Approval without a human.
The agent says a command hit a fixed_stop
Section titled “The agent says a command hit a fixed_stop”The command matched one of the fixed stops: a force-push, sudo, rm -r of
/ or your home directory, a disk or power command, or a credential file.
Every mode except Full denies these without running them, and the agent gets
a tool error asking it to find another way. Run the command yourself, or
switch to Full if you mean it. See Fixed stops.
could not start the command: …
Section titled “could not start the command: …”The model receives this as a tool error when /bin/sh (cmd on Windows)
or the program named in exec could not be started; the rest of the message
is the operating system’s reason. The run continues with other tools.
unavailable MCP servers: …
Section titled “unavailable MCP servers: …”The named server did not start, connect, or list its tools; the reason
follows its name in parentheses. The run continues without it, and calls to
its tools return an unavailable error to the model. For a stdio server check
the command is on PATH; for HTTP check the url. qq mcp status prints
the state and reason for every server. eager: true surfaces a connection
failure at startup instead of first use.
MCP servers need authorization: …
Section titled “MCP servers need authorization: …”The named server’s credential is the problem, not the network. Either its
bearer reference does not resolve on this machine (credential linear/defaultis not registered; runqq auth set linear/default“, or an
unset Env(...) variable), or the server answered HTTP 401 or 403 with a
WWW-Authenticate challenge because
the token expired, was revoked, or lacks a scope. Run the command the reason
names, or store a fresh token from the server’s login flow with qq auth set NAME --endpoint URL. The next run picks it up without a restart. qq doctor
reports unresolved references under mcp.
… changed its declaration after this run was admitted; the run keeps the contract it was admitted with, so the call was not sent. Start a new run to use the new declaration
Section titled “… changed its declaration after this run was admitted; the run keeps the contract it was admitted with, so the call was not sent. Start a new run to use the new declaration”An MCP server changed or removed a tool while a run was using it. The run
keeps the declaration it started with, so QQ refused the call and did not
send it. Start a new run to use the new declaration. If the server is pinned,
the new run reports it as quarantined until you review it with
qq mcp inspect NAME and update the pin.
provider returned HTTP 400: Invalid JSON payload received. Unknown name "additionalProperties"…
Section titled “provider returned HTTP 400: Invalid JSON payload received. Unknown name "additionalProperties"…”A google/* model rejected a tool declaration. Gemini accepts only a subset
of JSON Schema; QQ now strips the unsupported keywords from every tool schema
(built-in and MCP) before declaring it, so this no longer happens on a
current build. If you still see it, qq version and the Unknown name in
the message identify the keyword to report.
configuration working directory is invalid: …
Section titled “configuration working directory is invalid: …”The workspace path does not exist or is not a directory. qq run --workspace
needs an existing directory.
Exit code 2 from qq run
Section titled “Exit code 2 from qq run”Invalid configuration: the message above the exit explains which. Exit code meanings: Headless › Exit codes.
Exit code 5 from qq run
Section titled “Exit code 5 from qq run”The agent asked a question and no one was there. The question is in the
JSONL stream (tool_approval_requested); answer it interactively with
qq --session ID.
openai needs a credential: run qq auth login openai or set OPENAI_API_KEY
Section titled “openai needs a credential: run qq auth login openai or set OPENAI_API_KEY”The configured model’s provider has no credential, so QQ did not create a
session (a session needs a usable model). Do what the line says in another
terminal, then start qq again; Alt-N before that repeats the same line.
The provider and variable name follow your configuration (anthropic /
ANTHROPIC_API_KEY, google / GEMINI_API_KEY, xai / XAI_API_KEY;
openai-codex has only qq auth login openai-codex).
Top row says no model; the rule says choose a model with /models
Section titled “Top row says no model; the rule says choose a model with /models”No model is configured anywhere and none was given with --model or
QQ_MODEL. Open /models, pick one, Enter creates the session. To make it
permanent, put model: "PROVIDER/MODEL" in your global or project
config.ron (Quickstart § 2).
choose a model with /models before creating a session
Section titled “choose a model with /models before creating a session”You pressed Alt-N (or /new) with no model chosen and no session focused
to inherit one from. /models, pick one, Ctrl-N to create a session with
it.
Keys do nothing / wrong characters appear
Section titled “Keys do nothing / wrong characters appear”Your terminal may not send Alt or Ctrl chords QQ expects. /help shows
the bindings; rebind in tui.ron. Shift-Enter
needs a terminal with the kitty keyboard protocol; Alt-Enter inserts a
newline everywhere.
Colors look wrong
Section titled “Colors look wrong”Set COLORTERM=truecolor if your terminal supports it (most do) so the
ink theme is chosen; otherwise the ANSI terminal theme follows your
palette. /theme previews every theme.
TUI client stopped: …
Section titled “TUI client stopped: …”The TUI lost its server and could not reconnect; the reason follows. If a
qq serve was running, check it is still up; otherwise rerun qq.
Server and sessions
Section titled “Server and sessions”qq server already running at …
Section titled “qq server already running at …”Only one user-scoped server runs per machine, and every qq TUI attaches
to it — including a server another open qq started. Stop it (qq daemon stop, Ctrl-C in its terminal, or quit the qq that started it) to bind
another address; that cancels its queued and running runs. qq daemon run
reports the same case as qq daemon already running at ….
session store is owned by another running qq process
Section titled “session store is owned by another running qq process”qq run exits 4 with this when another process owns the session store: a
qq TUI, qq serve, or another qq run still working. Only one process may
own the store (an advisory lock protects it), and qq run does not connect
to a running server. Close the TUI or stop qq serve, send the prompt from
the TUI instead, or run jobs one after another. Concurrent CI jobs on one
machine each need their own data directory (XDG_DATA_HOME on Linux). Two
machines must not share one data directory.
Getting more detail
Section titled “Getting more detail”qq doctor --json— the same checks as a JSON object, for scripts and bug reports.qq config sources— every path consulted and whether it applied.qq config explain FIELD— which layer set a value.qq run --format jsonl— every event of a run.qq version— protocol and schema versions, for bug reports.
If none of this helps, open an issue with qq doctor and qq version output
and the exact message: bug report.