garrytan/gstack · error · Error

sidecar-spawn-failed

Error message

sidecar-spawn-failed

What it means

Error "sidecar-spawn-failed" thrown in garrytan/gstack.

Source

Thrown at browse/src/security-sidecar-client.ts:193

  // Probe via findSecuritySidecar without spawning. If the resolver returns
  // null (no node on PATH, no entry on disk), we're permanently unavailable
  // until a setup re-run.
  const location = findSecuritySidecar();
  if (!location) return { available: false, reason: "no-node-or-entry" };
  return { available: true };
}

export async function scanWithSidecar(text: string, opts?: { timeoutMs?: number }): Promise<{ verdict: unknown }> {
  const s = getState();
  if (s.brokenCircuit) {
    throw new Error("sidecar-circuit-broken");
  }
  if (Buffer.byteLength(text, "utf-8") > REQUEST_CAP_BYTES) {
    throw new Error("payload-too-large");
  }
  if (!s.child) {
    if (!spawnSidecar()) {
      throw new Error("sidecar-spawn-failed");
    }
  }
  const id = String(s.nextId++);
  const timeoutMs = opts?.timeoutMs ?? DEFAULT_TIMEOUT_MS;

  return new Promise((resolve, reject) => {
    const timer = setTimeout(() => {
      s.pending.delete(id);
      recordFailure();
      reject(new Error("sidecar-timeout"));
    }, timeoutMs);

    s.pending.set(id, {
      resolve: (response: unknown) => {
        const r = response as { verdict?: unknown };
        resolve({ verdict: r.verdict });
      },
      reject,

View on GitHub (pinned to 94993f7401)

When it happens

Trigger: Thrown at browse/src/security-sidecar-client.ts:193 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of garrytan/gstack@94993f7401 (2026-08-12). Data as JSON: /api/errors/73384a1c3b0987c6. Report an issue: GitHub.