Troubleshooting
This page is organized around what you are likely to see as a user, not around internal components.
Focused troubleshooting pages:
grok run Or grok exec Says No xAI Credentials Were Found
What it means:
- Grok Code cannot find a usable xAI API key
What to do:
- run
grok whoami - if you are not connected, use
grok loginor/connect - if you rely on env vars, confirm
XAI_API_KEYis really set in the shell you launched
/connect Opens In Repair Mode
What it means:
- the stored or provided key is invalid, stale, or otherwise not usable
What to do:
- press Enter in the repair step
- paste a fresh xAI API key
- finish the flow and verify with
grok whoami
Auth Looks Fine, But Grok Code Says You Are Rate-Limited
Use:
grok waitWhat to expect:
- if Grok Code has recorded rate-limit state before, it shows blocked accounts and wait time
- if a ready backup account exists, the provider can stay usable
- if no blocked state was recorded yet,
grok waithas nothing to inspect
A Lane Or Feature Looks Empty
This is often normal.
Examples:
Gateis empty until a run stages an artifactRecallis sparse until you have saved work/checkpoint restorehas nothing to show until a checkpoint exists- harness report and diff need previous harness runs
- bench needs a scorecard
- memory and notepads need content before the inspectors become interesting
If you are unsure whether the emptiness is expected, ask:
- have I created the underlying session, artifact, run, or file yet?
export, share, Or replay Cannot Find An Active Branch
What it means:
- there is no active graph-backed branch to operate on
What to do:
- resume a saved run first
- or specify a session directly
- for CLI export and replay, use
session@branchwhen you need a specific branch
Session Or Branch Queries Are Ambiguous
What it means:
- more than one saved session or branch matched what you typed
What to do:
- use a longer id prefix
- use the exact title or branch id
- list sessions first with
grok sessions
Checkpoints Do Not Work
Common causes:
- you are not inside a git repository
- there are no changed files to snapshot
- you are trying to restore a checkpoint that does not exist
Useful commands:
/checkpoint/checkpoint save demo/checkpoint restore latest
Worktrees Do Not Work
Common causes:
- the project is not a git repository
- the named worktree does not exist
- the worktree has local modifications and removal is refusing to continue
Remember:
- Grok Code creates worktrees under
.grok/worktrees/ - each one gets a
worktree-branch
MCP Looks Broken
Start with:
grok mcp listgrok mcp remote list/mcp
The most common confusion is scope:
- global config lives in
~/.grok/config.toml - project config lives in
.grok/config.toml
If a server is missing, make sure you added it to the scope you expected.
Exa Is Configured But Search Still Looks Missing
What to check:
- did
/enable_exafinish successfully? - did you restart Grok Code afterward?
- does
/mcpshow theexaserver as available?
Grok Code saves the Exa config first, then the current session usually needs a restart for full activation.
Docs Cache Looks Stale Or Incomplete
What to know:
- docs cache entries expire after 7 days by default
- long entries can show up as shortened previews
- expired entries can disappear from normal lookup
Useful commands:
/docs/docs get/docs clear/docs gc
Updates Or Rollbacks Feel Risky
What to know:
grok updatekeeps local backupsgrok update --list-backupsshows themgrok update --rollback latestrestores the newest backup
If an update fails, Grok Code usually prints the backup path you can use for rollback.
Uninstall Removes More Than The Binary
grok uninstall removes:
- the binary and backups
- config and runtime state under
~/.grok - saved sessions and local data
- keyring entries
- shell PATH entries it knows how to clean up
Use it only when you really want a clean removal.
The Docs In This Repo Used To Point At Missing Pages
If you saw old broken links before this rebuild, that was a real mismatch in the repo, not user error.
Use the rebuilt user guide starting at Docs Home.