xai-org/grok-build · error
Repository root '{}' does not exist. Ensure the repo is clon
Error message
Repository root '{}' does not exist. Ensure the repo is cloned before calling rehydrate. What it means
Error "Repository root '{}' does not exist. Ensure the repo is cloned before calling rehydrate." thrown in xai-org/grok-build.
Source
Thrown at crates/codegen/xai-grok-shell/src/session/worktree.rs:463
updates_copied: fork_resp.updates_copied,
code_restored,
restore_summary,
restore_degree,
})
}
/// Orchestrate session rehydration: recreate the git worktree at the exact
/// path and restore all session state using the original session ID.
///
pub(crate) async fn rehydrate_session_in_worktree(
req: &RehydrateSessionRequest,
#[allow(unused_variables)] ops: &xai_grok_workspace::WorkspaceOps,
registry_client: Option<&crate::agent::session_registry_client::SessionRegistryClient>,
) -> Result<RehydrateSessionResponse> {
let worktree_path_str = req.worktree_path.as_deref().unwrap_or(&req.source_cwd);
let repo_root = Path::new(&req.repo_root);
let worktree_path = Path::new(worktree_path_str);
if !repo_root.exists() {
anyhow::bail!(
"Repository root '{}' does not exist. \
Ensure the repo is cloned before calling rehydrate.",
req.repo_root
);
}
let session_summary_exists = crate::util::grok_home::sessions_cwd_dir(&req.source_cwd)
.join(&req.session_id)
.join("summary.json")
.exists();
if worktree_path.exists() && session_summary_exists {
tracing::info!(
session_id = %req.session_id,
worktree_path = %worktree_path_str,
"rehydrate: worktree and session state already exist, skipping"
);
return Ok(RehydrateSessionResponse {
session_id: req.session_id.clone(),
worktree_path: worktree_path_str.to_string(),View on GitHub (pinned to bc7f02eddd)
When it happens
Trigger: Thrown at crates/codegen/xai-grok-shell/src/session/worktree.rs:463 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of xai-org/grok-build@bc7f02eddd (2026-08-31).
Data as JSON: /api/errors/d12e0749576bdf7e.
Report an issue: GitHub.