tinyhumansai/openhuman · error · Error
RPC ${method} timed out after ${timeoutMs}ms
Error message
RPC ${method} timed out after ${timeoutMs}ms What it means
rpc() in harness-cache-audit.mjs aborts any JSON-RPC POST exceeding its per-call timeout (default 600000 ms, tunable via --rpc-timeout-ms; the internal core.ping probe uses 10 s) and translates the resulting AbortError into this message naming the method and limit. Each audit turn is a full openhuman.agent_chat delegation, so the timeout primarily bounds model inference plus tool execution time.
Source
Thrown at scripts/debug/harness-cache-audit.mjs:216
let res;
try {
res = await fetch(coreUrl, {
method: "POST",
signal: controller.signal,
headers: {
"content-type": "application/json",
authorization: `Bearer ${token}`,
},
body: JSON.stringify({
jsonrpc: "2.0",
id: `audit-${Date.now()}-${Math.random().toString(16).slice(2)}`,
method,
params,
}),
});
} catch (err) {
if (err?.name === "AbortError") {
throw new Error(`RPC ${method} timed out after ${timeoutMs}ms`);
}
throw err;
} finally {
clearTimeout(timeout);
}
const bodyText = await res.text();
let body;
try {
body = JSON.parse(bodyText);
} catch {
throw new Error(`RPC ${method} returned non-JSON HTTP ${res.status}`);
}
if (!res.ok) {
throw new Error(`RPC ${method} HTTP ${res.status}`);
}
if (body.error) {
throw new Error(`RPC ${method} error`);
}View on GitHub (pinned to a221052e0d)
Solutions
- Raise the limit: `--rpc-timeout-ms 1200000`
- Retry — transient provider stalls often clear
- Reduce work: fewer `--turns`, cheaper `--model`, shorter `--prompt`
- Check whether the core is alive/responsive (GET /health) to distinguish hung core from slow turn
- Rerun with --verbose to see per-turn response characters and where it stalls
Example fix
# before node scripts/debug/harness-cache-audit.mjs --turns 4 --rpc-timeout-ms 120000 # Error: RPC openhuman.agent_chat timed out after 120000ms # after node scripts/debug/harness-cache-audit.mjs --turns 4 --rpc-timeout-ms 900000
Defensive patterns
Strategy: retry
Validate before calling
// pre-flight ping with a short budget to fail fast on connectivity problems
// before burning a 10-minute per-turn timeout
try {
await rpc(coreUrl, token, "core.ping", {}, 5_000);
} catch {
console.error("core not answering within 5s — resolve connectivity before the audit");
process.exit(2);
} Type guard
const isRpcTimeout = (err) => /RPC .* timed out after \d+ms/.test(err?.message || "");
Try / catch
let attempt = 0;
while (true) {
try {
return await rpc(coreUrl, token, "openhuman.agent_chat", params, opts.rpcTimeoutMs);
} catch (err) {
attempt += 1;
if (isRpcTimeout(err) && attempt < 2) {
await new Promise((r) => setTimeout(r, 5_000)); // one retry: provider stalls are often transient
continue;
}
throw err;
}
} Prevention
- Set --rpc-timeout-ms from the slowest expected turn, not the fastest
- Keep audits off cores that simultaneously serve interactive desktop traffic
- Disable system sleep for long audit runs — a suspended laptop surfaces as this exact timeout
When it happens
Trigger: An agent_chat turn with tool loops (file reads, skills, subagents) exceeding --rpc-timeout-ms; a wedged core; provider rate-limit backoff; lowering --rpc-timeout-ms for a smoke run and forgetting to restore it before a 3+ turn audit; system sleep suspending the process mid-request.
Common situations: Slow model or long cache-audit prompts pushing past 10 minutes; core also serving desktop traffic; laptop suspend during a run; CI network throttling to the inference provider.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- RPC ${method} timed out after ${timeoutMs}ms
- RPC ${method} timed out after ${timeoutMs}ms
- Request timed out. Please try again.
- Core RPC ${payload.method} timed out after ${effectiveTimeou
- [transport:cloud] ${method} timed out after ${this.timeoutMs
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/25719e32a103afc6.
Report an issue: GitHub.