xai-org/grok-build · error
Multiple sessions match title {:?}:\n{listing}\nResume by se
Error message
Multiple sessions match title {:?}:\n{listing}\nResume by session id instead: grok --resume <session-id> What it means
`select_by_title` refuses to guess when more than one stored session shares the (trimmed) resume title. It bails with a listing of every matching session id and its display title, and instructs the user to resume by session id instead, because a title-only resume would be ambiguous.
Source
Thrown at crates/codegen/xai-grok-pager/src/app/session_title_resolve.rs:72
[] => Ok(None),
[only] => Ok(Some(*only)),
_ => {
let manual: Vec<&&Summary> = matches
.iter()
.filter(|s| {
s.manual_title_opt()
.is_some_and(|t| title_key(&t) == needle)
})
.collect();
if let [only] = manual.as_slice() {
return Ok(Some(**only));
}
let listing = matches
.iter()
.map(|s| format!(" {} {:?}", s.info.id, s.display_title()))
.collect::<Vec<_>>()
.join("\n");
anyhow::bail!(
"Multiple sessions match title {:?}:\n{listing}\n\
Resume by session id instead: grok --resume <session-id>",
arg.trim()
);
}
}
}
/// Outcome of the pre-sandbox resolution of an explicit resume arg.
#[derive(Debug, PartialEq, Eq)]
pub(crate) enum PinnedResumeTarget {
/// Nothing local resolved (UUID-shaped, no cwd, junk, or ambiguous title): leave the raw arg alone.
/// Materialization owns the authoritative error / remote path.
Unresolved,
/// Resolved as a local id (possibly the restored child of a remote id).
Id(String),
/// Resolved by title to this session. The selected summary's persisted sandbox profile rides along.
/// Re-deriving the profile from the id is ambiguous when a legacy id is duplicated across cwd dirs.View on GitHub (pinned to bc7f02eddd)
Solutions
- Resume by unique id: `grok --resume <session-id>` using an id from the listing in the error.
- Rename duplicate sessions to distinct titles so title resume becomes unambiguous.
- Delete stale duplicate sessions to leave a single match for the title.
- Provide a longer, more specific title string that matches only one session.
Example fix
// before grok --resume "my-feature" // error lists: // <id-a> "my-feature" // <id-b> "my-feature" // after grok --resume <id-a>
Defensive patterns
Strategy: validation
Validate before calling
let matches = sessions.iter()
.filter(|s| s.display_title() == requested_title)
.collect::<Vec<_>>();
if matches.len() > 1 {
eprintln!("Ambiguous title; resume by id: {:?}", matches.iter().map(|s| s.info.id).collect::<Vec<_>>());
} Try / catch
if let Err(e) = select_by_title(title) {
let msg = e.to_string();
if msg.starts_with("Multiple sessions match title") {
// parse listed ids from msg and resume the intended one by id
eprintln!("{msg}");
} else { return Err(e); }
} Prevention
- Give sessions unique, specific titles instead of relying on auto-titles
- Prefer resuming by session id in scripts
- Periodically delete or rename stale duplicate sessions
When it happens
Trigger: `grok --resume <title>` where the local session store contains 2+ sessions whose display title equals the argument. Reached via `select_by_title`, exercised by callers `presandbox_resume_target`, `duplicate_auto_titles_error_lists_ids_with_escaped_titles`, and `two_manual_renames_stay_ambiguous`.
Common situations: Multiple sessions auto-titled from the same prompt/branch name (default titles collide); two sessions manually renamed to the same title; resuming by a generic title like "fix tests" that was used repeatedly.
Related errors
- no target specified
- send failed: {body}
- screen query failed: {body}
- resize failed: {body}
- wait failed: {body}
AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31).
Data as JSON: /api/errors/204a0148a266cf3d.
Report an issue: GitHub.