xai-org/grok-build · error
Session does not exist
Error message
Session does not exist
What it means
The plain 'Session does not exist' bail is the no-hint branch of the same remote-miss handling: the remote store has no session matching the requested id/title and no title hint applies (the argument looked like an id/uuid rather than a fuzzy title). Startup cannot proceed because there is nothing to restore.
Source
Thrown at crates/codegen/xai-grok-pager/src/app/session_startup.rs:1022
})
}
RemoteMissPlan::RejectInPlaceCodeRestore { title_miss_hint } => {
if title_miss_hint {
anyhow::bail!(
"{REMOTE_RESTORE_NEEDS_WORKTREE}; {}",
super::session_title_resolve::title_miss_hint(session_id)
);
}
anyhow::bail!("{REMOTE_RESTORE_NEEDS_WORKTREE}")
}
RemoteMissPlan::NotFound { title_miss_hint } => {
if title_miss_hint {
anyhow::bail!(
"Session does not exist: {}",
super::session_title_resolve::title_miss_hint(session_id)
);
}
anyhow::bail!("Session does not exist")
}
RemoteMissPlan::RestoreConversation => {
let restored =
restore_session_from_remote(session_id, cwd, ctx.restore_progress_on_stdout).await;
if arg_is_uuid {
return restored;
}
restored.map_err(|e| {
anyhow::anyhow!(
"{e:#}; {}",
super::session_title_resolve::title_miss_hint(session_id)
)
})
}
}
}
/// Policy after local id/title resolution misses.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]View on GitHub (pinned to bc7f02eddd)
Solutions
- Verify the session id is correct and from the same remote backend/account.
- Run `grok --resume` with no argument to list existing sessions.
- Check remote backend configuration (endpoint/credentials) matches where the session lives.
- Start a new session if the original no longer exists remotely.
Example fix
// before grok --resume 00000000-0000-0000-0000-000000000000 // after grok --resume # pick a valid session id from the list
Defensive patterns
Strategy: try-catch
Validate before calling
let listed = grok_list_sessions()?;
let exists = listed.iter().any(|s| s.id == requested_id);
if !exists { eprintln!("id not present remotely; pick from the list"); } Try / catch
match grok_resume(id) {
Err(e) if e.to_string() == "Session does not exist" => {
eprintln!("Unknown session id — run `grok --resume` to list valid ids.");
}
other => other?,
} Prevention
- Treat session ids as machine-local; don't share them across backends
- Check remote backend/endpoint config before resuming old ids
- Start new sessions rather than resuming ids older than the retention window
When it happens
Trigger: `grok --resume <arg>` with `RemoteMissPlan::NotFound { title_miss_hint: false }` — the argument is not found remotely and does not look like a title needing a hint (e.g. it is a well-formed id/uuid that simply does not exist).
Common situations: Pasting a session id from another machine or another user; resuming after the remote session TTL expired; wrong remote backend configured (different endpoint) so the id is unknown there.
Related errors
- Session does not exist: {}
- session '{name}' not found
- Plugin "{name}" not found. Run `grok plugin list` to see ins
- Marketplace source "{filter}" not found.
- worktree not found: {id_or_path}
AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31).
Data as JSON: /api/errors/7a7a677e27f96b88.
Report an issue: GitHub.