garrytan/gstack · error
Design daemon failed to start within ${MAX_START_WAIT_MS}ms.
Error message
Design daemon failed to start within ${MAX_START_WAIT_MS}ms.
Startup log (${logPath}):
${tail || "(empty)"} What it means
Error "Design daemon failed to start within ${MAX_START_WAIT_MS}ms. Startup log (${logPath}): ${tail || "(empty)"}" thrown in garrytan/gstack.
Source
Thrown at design/src/daemon-client.ts:309
const deadline = Date.now() + MAX_START_WAIT_MS;
while (Date.now() < deadline) {
const fresh = readStateFile(opts.stateFile);
if (fresh) {
const h = await healthCheck(fresh.port);
if (h) return fresh.port;
}
await delay(POLL_INTERVAL_MS);
}
// Timed out — surface the startup log so the user sees the actual error
// instead of "daemon failed silently."
let tail = "";
try {
tail = fs.readFileSync(logPath, "utf-8").trim();
} catch {
// log file may not exist
}
throw new Error(
`Design daemon failed to start within ${MAX_START_WAIT_MS}ms.\n` +
`Startup log (${logPath}):\n${tail || "(empty)"}`,
);
}
async function gracefulShutdownExistingDaemon(port: number): Promise<void> {
try {
await fetch(`http://127.0.0.1:${port}/shutdown`, {
method: "POST",
signal: AbortSignal.timeout(2000),
});
} catch {
// Daemon may have already exited or be unresponsive — fall through
// to the SIGTERM path with identity verification.
}
}
/**View on GitHub (pinned to 94993f7401)
When it happens
Trigger: Thrown at design/src/daemon-client.ts:309 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/7d5fb34227924bf9.
Report an issue: GitHub.