xai-org/grok-build · error

Failed to create agent config: {}

Error message

Failed to create agent config: {}

What it means

Error "Failed to create agent config: {}" thrown in xai-org/grok-build.

Source

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

    let raw_config = xai_grok_shell::config::load_effective_config()
        .map_err(|e| anyhow::anyhow!("Failed to load config: {}", e))?;
    if let Some((false, source)) =
        xai_grok_shell::util::config::session_registry_local_override_sourced(Some(&raw_config))
    {
        anyhow::bail!(
            "Session does not exist locally (session registry is disabled by {})",
            source.label()
        );
    }
    emit_pre_tui_restore_line(
        progress_on_stdout,
        &format!(
            "Session {:?} not found locally, restoring conversation from remote...",
            session_id
        ),
    );
    let agent_config = xai_grok_shell::agent::config::Config::new_from_toml_cfg(&raw_config)
        .map_err(|e| anyhow::anyhow!("Failed to create agent config: {}", e))?;
    use xai_grok_shell::agent::session_registry_client::SessionRegistryClient;
    use xai_grok_shell::auth::{AuthManager, ensure_authenticated_or_noninteractive};
    use xai_grok_shell::session::restore::{RestoreSessionOpts, restore_session_with_storage};
    use xai_grok_shell::util::grok_home::grok_home;
    let deployment_key = agent_config.endpoints.deployment_key.clone();
    ensure_authenticated_or_noninteractive(
        &agent_config.grok_com_config,
        deployment_key.is_some(),
        None,
    )
    .await
    .map_err(|e| anyhow::anyhow!("Failed to authenticate for session restore: {}", e))?;
    let auth_manager = std::sync::Arc::new(AuthManager::new(
        &grok_home(),
        agent_config.grok_com_config.clone(),
    ));
    let registry_client =
        SessionRegistryClient::new(agent_config.endpoints.proxy_url(), String::new())

View on GitHub (pinned to bc7f02eddd)

When it happens

Trigger: Thrown at crates/codegen/xai-grok-pager/src/app/session_startup.rs:1116 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/dc5cf00dc9cca1e0. Report an issue: GitHub.