xai-org/grok-build · error

git serialize_changes is unavailable in this build

Error message

git serialize_changes is unavailable in this build

What it means

The extension dispatcher handles x.ai/git/serialize_changes as a stub: it ignores the request and always returns an error response saying the feature is unavailable in this build. This is a deliberate compile-time/build-time feature gap, not a runtime failure of the caller.

Source

Thrown at crates/codegen/xai-grok-shell/src/extensions/git.rs:312

            )
            .await
            .unwrap_or(xai_grok_workspace::session::git::VcsKind::Git);
        if vcs_kind.is_jj()
            && let Some(result) =
                super::jj::try_handle(args.method.as_ref(), &git_root, &args.params).await
        {
            return result;
        }
    }
    match args.method.as_ref() {
        "x.ai/git/git_repo_root" => {
            let req: git::GitRepoRequest = parse_params(args)?;
            let response = git::is_git_repo(&req).await?;
            super::to_raw_response(&response)
        }
        "x.ai/git/serialize_changes" => {
            let _ = (args, ops);
            to_ext_response::<()>(Err(anyhow::anyhow!(
                "git serialize_changes is unavailable in this build"
            )))
        }
        "x.ai/git/status" => {
            let req = parse_params::<GitStatusRequest>(args)?;
            let include_untracked = req.include_untracked.unwrap_or(false);
            let include_stats = req.include_stats.unwrap_or(false);
            let ignore_submodules = req.ignore_submodules.unwrap_or(true);
            let include_patches = req.include_patches.unwrap_or(false);
            let git_root = resolve_git_root(agent, ops, req.git_root, req.session_id.as_ref())
                .await
                .ok();
            let op = GitStatusExtReq {
                git_root,
                include_untracked,
                include_stats,
                ignore_submodules,
                include_patches,

View on GitHub (pinned to bc7f02eddd)

Solutions

  1. Install/switch to a full build of xai-grok-shell that includes git serialize_changes
  2. Have the caller handle this method's error and fall back to computing the diff locally (e.g. git diff + serialization in the client)
  3. Stop calling x.ai/git/serialize_changes when capability discovery indicates it is unavailable

Example fix

// before
const resp = await ext("x.ai/git/serialize_changes", req);
// after
if (supportsGitSerialize) {
  const resp = await ext("x.ai/git/serialize_changes", req);
} else {
  const diff = await runGitDiffLocally();
}
Defensive patterns

Strategy: fallback

Validate before calling

// check capability support before invoking
if !supported_methods.contains("x.ai/git/serialize_changes") {
    return Err("serialize_changes unsupported in this build".into());
}

Try / catch

match ext("x.ai/git/serialize_changes", req).await {
    Ok(resp) => resp,
    Err(e) if e.to_string().contains("unavailable in this build") => {
        compute_diff_locally().await?
    }
    Err(e) => return Err(e.into()),
}

Prevention

When it happens

Trigger: Any client invokes the x.ai/git/serialize_changes extension method on a build compiled without git serialize_changes support.

Common situations: Running a slim/minimal build of the shell that excludes full git tooling; a plugin or UI feature that calls serialize_changes unconditionally; stale client expecting an older full-featured binary.

Related errors


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