xai-org/grok-build · error

Session does not exist: {}

Error message

Session does not exist: {}

What it means

Thrown during remote session restore when the remote store has no session matching the given id/title and a title-resolution hint is available. This is the 'not found, with hint' variant of the remote miss plan: the argument was not found remotely, and `session_title_resolve::title_miss_hint(session_id)` suggests why the title lookup failed (e.g. no similar titles exist).

Source

Thrown at crates/codegen/xai-grok-pager/src/app/session_startup.rs:1017

                id: session_id.to_string(),
                original_cwd: None,
                title: None,
                deferred_local_miss,
                suppress_code_restore: !ctx.restore_code,
            })
        }
        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)
                )
            })

View on GitHub (pinned to bc7f02eddd)

Solutions

  1. Copy the session id again from `grok --resume` (list view) or the original session output.
  2. Check you are authenticated to the same remote account/machine where the session was created.
  3. If the session was deleted, start a new session instead of resuming.

Example fix

// before
grok --resume my-sesion-typo
// after
grok --resume        # list sessions, copy exact id
grok --resume 9c1d4e2a-1234-5678-9abc-def012345678
Defensive patterns

Strategy: validation

Validate before calling

// Confirm the id exists before resuming
let listed = grok_list_sessions()?; // or run `grok --resume` interactively
if !listed.iter().any(|s| s.id == requested_id) {
    eprintln!("Session {requested_id} not found on this backend");
}

Try / catch

if let Err(e) = grok_resume(id) {
    let msg = e.to_string();
    if msg.starts_with("Session does not exist") {
        eprintln!("{msg}\nList sessions with `grok --resume` and copy a valid id.");
    } else { return Err(e); }
}

Prevention

When it happens

Trigger: `grok --resume <arg>` where the remote backend returns no match for the session id/title AND `title_miss_hint` is true (argument was treated as a title with no fuzzy/local match), producing `Session does not exist: <arg> <hint>`.

Common situations: Typo in a session id; resuming a session that was deleted or expired on the remote; referencing a session from another machine/account; stale shell history pointing at a purged session.

Related errors


AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31). Data as JSON: /api/errors/4f5dcb962a3d33c1. Report an issue: GitHub.