tinyhumansai/openhuman · error · Error
RPC ${method} timed out after ${timeoutMs}ms
Error message
RPC ${method} timed out after ${timeoutMs}ms What it means
The rpc() helper in scripts/debug/agent-prepare-context-audit.mjs wraps fetch with an AbortController set to the per-call timeout (default 600000 ms, overridable via --rpc-timeout-ms). When the abort fires, the fetch rejects with AbortError and is rethrown as 'RPC <method> timed out after <N>ms'. The audit drives real orchestrator/inference turns, which are the slow calls that typically hit this.
Source
Thrown at scripts/debug/agent-prepare-context-audit.mjs:267
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: `apc-${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}: ${bodyText.slice(0, 200)}`,
);
}
if (!res.ok) throw new Error(`RPC ${method} HTTP ${res.status}`);
if (body.error)
throw new Error(
`RPC ${method} error: ${JSON.stringify(body.error).slice(0, 300)}`,
);View on GitHub (pinned to a221052e0d)
Solutions
- Raise the budget: --rpc-timeout-ms 1200000 (20 min) or higher for slow models
- Narrow the audit to one case (--query "...") to confirm it's volume, not a hang
- Check the core is actually progressing (its logs/workspace) rather than deadlocked — a hang will time out at any budget
- Use --model to pick a faster model if the turn itself is the slow part
Example fix
# before $ node scripts/debug/agent-prepare-context-audit.mjs Error: RPC openhuman.inference_agent_chat timed out after 600000ms # after $ node scripts/debug/agent-prepare-context-audit.mjs --rpc-timeout-ms 1800000 --query "what are my goals?"
Defensive patterns
Strategy: retry
Validate before calling
// Before a long audit, probe the slow path cheaply
const start = Date.now();
await rpc(coreUrl, token, "core.ping", {}, 10_000);
if (Date.now() - start > 5_000) console.error("core is slow to answer — consider --rpc-timeout-ms 1800000"); Try / catch
for (let attempt = 1; attempt <= 2; attempt++) {
try {
return await rpc(coreUrl, token, method, params, opts.rpcTimeoutMs);
} catch (e) {
if (/timed out after/.test(e.message) && attempt === 1) {
opts.rpcTimeoutMs *= 2; // one retry with a doubled budget
continue;
}
throw e;
}
} Prevention
- Default the budget to the slowest case you run: multi-case inference audits deserve --rpc-timeout-ms 1200000+
- Narrow to --query when iterating on prompts; full 5-case runs are for final confirmation
- Watch the core's own logs — a turn that times out at any budget is usually a stuck provider call
When it happens
Trigger: Any single JSON-RPC call exceeding the timeout: a long openhuman.inference_agent_chat turn on a slow model, a first-turn with a cold memory index, a transcript_search over a huge workspace, or a core that is overloaded/paused. The default 10-minute budget is exceeded by heavy multi-case runs with big contexts.
Common situations: Running the full 5 default cases plus seeded transcript against a busy or resource-constrained core; slow provider endpoints during the LLM portion; debugging on a laptop where the core competes with a cargo build for CPU; timeout lowered too aggressively via --rpc-timeout-ms.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Core RPC ${payload.method} timed out after ${effectiveTimeou
- RPC ${method} timed out after ${timeoutMs}ms
- RPC ${method} timed out after ${timeoutMs}ms
- Request timed out. Please try again.
- [transport:cloud] ${method} timed out after ${this.timeoutMs
AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16).
Data as JSON: /api/errors/dc7c27041d7acbd6.
Report an issue: GitHub.