astrid-runtime/astrid · error

MCP gateway is starting but has not published readiness…

Error message

MCP gateway is starting but has not published readiness within {} seconds

What it means

Fired by wait_for_gateway when the gateway is in a starting state (lease exists) but no ready record is published within the overall deadline. Distinguishes the still-starting case from a fully absent gateway.

Solutions

  1. Wait longer or investigate why readiness is not published
  2. Inspect gateway logs; the startup likely failed after the lease was taken
  3. Stop the half-started gateway and spawn again
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/astrid-cli/src/commands/mcp/lifecycle.rs:477 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09). Data as JSON: /api/errors/17fe4e8a7dbcf226. Report an issue: GitHub.

Appendix: source

Thrown at crates/astrid-cli/src/commands/mcp/lifecycle.rs:477

            }
            if let Some(lease) = read_gateway_startup_lease()?
                && crate::commands::daemon_control::is_process_alive(lease.supervisor_pid)
            {
                drop(supervisor);
                if Instant::now() >= deadline {
                    anyhow::bail!(
                        "MCP gateway PID {} is still starting within {} seconds",
                        lease.supervisor_pid,
                        SPAWNED_READY_TIMEOUT.as_secs()
                    );
                }
                tokio::time::sleep(READY_POLL).await;
                continue;
            }
            let Some(lifecycle) = try_acquire_gateway_lifecycle()? else {
                drop(supervisor);
                if Instant::now() >= deadline {
                    anyhow::bail!(
                        "MCP gateway is starting but has not published readiness within {} seconds",
                        SPAWNED_READY_TIMEOUT.as_secs()
                    );
                }
                tokio::time::sleep(READY_POLL).await;
                continue;
            };
            clean_unowned_gateway_startup(&lifecycle)
                .await
                .context("shutdown stage gateway.startup_cleanup")?;
            spawn_gateway(principal)?;
            drop(lifecycle);
            drop(supervisor);
            spawned = true;
        }
        if Instant::now() >= deadline {
            anyhow::bail!(
                "MCP gateway did not become ready within {} seconds",

View on GitHub (pinned to affd8760f4)