You assume the OpenClaw local model timeout is unfixable — a limitation of the tool itself. It’s not. The fix was merged four months ago in commit d9dc75774b. But the error message you’re getting doesn’t mention it, the docs don’t surface it, and the only way to find it is to read a Reddit thread or dig through a 100-comment GitHub issue. This article connects those dots — and tells you exactly which config parameter the error message should have named but didn’t.
Table of Contents
- Why does OpenClaw timeout after exactly 60 seconds with local models?
- What’s the actual configuration parameter that fixes this?
- Why didn’t the error message tell you about this config?
- Configuration table: local model timeout settings that actually work
- Should you upgrade to the fixed version, or is your current workaround enough?
- What OpenClaw Local Model Timeout Means for Your Stack
- FAQ
Why Does OpenClaw Timeout After Exactly 60 Seconds with Local Models?
Most users hit this and immediately reach for agents.defaults.timeoutSeconds. They set it to 86400. Nothing changes. They try environment variables — LLM_REQUEST_TIMEOUT, channel timeouts, tool timeouts, gateway timeouts. Still nothing. The model dies at 60 seconds every time.
The reason is architectural, and it’s not obvious from reading the OpenClaw configuration docs. The embedded agent runner has two separate timeout systems that operate independently: the agent-level timeout and the LLM idle watchdog.
- The agent-level timeout (
agents.defaults.timeoutSeconds) — controls how long the entire agent run is allowed to take. This is the one the docs describe, and the one users naturally configure first. - The LLM idle watchdog (
agents.defaults.llm.idleTimeoutSeconds) — a separate timeout specific to the period before the model emits its first streamed token. This lives insrc/agents/pi-embedded-runner/run/llm-idle-timeout.tsand defaults toDEFAULT_LLM_IDLE_TIMEOUT_MS = 60_000.
These two timers are not linked. Increasing one has zero effect on the other. According to the GitHub issue thread (openclaw/openclaw#46049, opened March 14, 2026), users confirmed 100% reproducibility: every request where local model generation exceeds the internal idle threshold triggers the watchdog, regardless of how high agent-level timeouts are set.
The physics of why local models hit this are straightforward. An MLX model on an Apple M4 Pro with a 25,000-token context can take 60–67 seconds in prefill at roughly 400 tokens per second — exactly at the watchdog’s edge. DeepSeek-R1-Distill-Qwen-32B with a 131k context window and reasoning enabled can take much longer. Cloud providers don’t face this because their infrastructure completes that same prefill in milliseconds.
The second mechanism, identified by user hkstrongside in the GitHub thread, is a WebSocket RPC timeout in the gateway itself, hardcoded at 3e4 (30,000ms = 30 seconds) in the bundled JavaScript. This is separate again from both of the above. For pre-fix versions, this produces a two-retry pattern: users reported timeouts at roughly 60–65 seconds total, matching exactly 30 seconds times two retry attempts before final failover.
For day-to-day use with AI automation tools and local inference, the idle watchdog is the one you need to address. It is the root cause for the vast majority of reports across Ollama, MLX, and llama.cpp deployments.
What’s the Actual Configuration Parameter That Fixes the OpenClaw Local Model Timeout?
The parameter is agents.defaults.llm.idleTimeoutSeconds. It is nested inside the llm object inside defaults inside agents. If you have not seen it before, that is not unusual — it does not appear in the main configuration reference that most users read.
Here is the complete, tested configuration block. Add this to your ~/.openclaw/openclaw.json:
{
"agents": {
"defaults": {
"timeoutSeconds": 300,
"llm": {
"idleTimeoutSeconds": 300
}
}
}
}
The timeoutSeconds and idleTimeoutSeconds values should be set together. Setting only one of them leaves the other at its default, which will still cause failures under the right conditions.
Alternatively, you can apply it via the CLI without editing the JSON directly:
openclaw config set agents.defaults.llm.idleTimeoutSeconds 600
That sets a 10-minute idle watchdog, which is generous enough for most cold-start scenarios.
Provider-specific guidance:
- Ollama (standard hardware): 180–300 seconds. Ollama’s cold-start on most consumer GPUs is well under 60 seconds once a model is loaded, but if you’re running large models (30B+) on CPU fallback, 300 is safer.
- MLX on Apple Silicon: 300 seconds minimum. The 25K-token context prefill at ~400 tok/s documented in the GitHub thread puts you right at 62 seconds — above the 60-second default. Set this to 300 to give yourself headroom for longer contexts and vision requests.
- llama.cpp with large context: 600 seconds. User I-k-a-r-u-s documented a scenario where llama.cpp needed 30 minutes of processing for a Kimi-K2.5 model with a 52,000-token prompt. For reasoning models with large context, 600 is not excessive.
- Remote Ollama via SSH tunnel or similar: 300 seconds. Network latency stacks on top of inference latency; the clawdias workaround documented in the GitHub thread used 300 seconds successfully on a Raspberry Pi 5 with a remote Ollama provider.
Setting idleTimeoutSeconds to 0 disables the watchdog entirely. This is not recommended for production because a genuinely hung request will never recover, but it is useful for debugging to confirm the watchdog is the actual culprit in your setup.
Why Didn’t the Error Message Tell You About This Config?
This is the part that competitor articles skip entirely. They either document the bug or document the fix. None of them examine why the fix remained invisible to users for months after it shipped.
Commit d9dc75774b, merged to main on April 8, 2026, fixed the underlying timeout behavior. According to contributor steipete’s closing comment on the GitHub issue, the commit made four changes:
agents.defaults.llm.idleTimeoutSecondsstill wins when explicitly configured, and0still disables the watchdog.- When that LLM idle timeout is not set, the watchdog now inherits
agents.defaults.timeoutSecondsinstead of falling back to the hardcoded 60-second default. - Cron-triggered runs with no explicit LLM or agent timeout now disable the default idle watchdog entirely.
- Timeout-before-first-response errors now point at
agents.defaults.llm.idleTimeoutSecondsinstead of only suggestingagents.defaults.timeoutSeconds.
Item 4 is the critical one. The fix partially improved the error message — but only for the specific case of “timeout before first response.” Other timeout error paths in the embedded runner still produce the generic "LLM request timed out" log line with no config reference at all. The log output documented in the original bug report — error=LLM request timed out. followed by decision=surface_error reason=timeout — is still what most users see, because they are hitting a slightly different code path than the one the commit updated.
The structural problem is deeper than one missed log line. OpenClaw’s configuration namespace has at least three timeout-adjacent parameters that affect local model behavior, and they resolve independently in different layers of the stack. A user who reads the configuration docs will find agents.defaults.timeoutSeconds described in detail. They will not find agents.defaults.llm.idleTimeoutSeconds described at all in the main docs — it was discovered by users reading source code, specifically openclaw/openclaw#46049, where the TypeScript path cfg?.agents?.defaults?.llm?.idleTimeoutSeconds was traced manually.
This is a documentation architecture failure, not a code architecture failure. The code was fixed. The discoverability of the fix was not. Users who upgraded past commit d9dc75774b but never set idleTimeoutSeconds explicitly got the improved inheritance behavior — timeoutSeconds now flows down to the watchdog — but only if they also had agents.defaults.timeoutSeconds set to a large value. Users who had not set that either were still running on the 60-second hardcoded default.
The result: commit d9dc75774b closed #46049 on April 8, then at least three duplicate issues were filed against the same symptom by May — each one from a user running post-fix OpenClaw who simply had neither timeoutSeconds nor idleTimeoutSeconds set, leaving both watchdogs on their 60-second hardcoded defaults.
Configuration Table: Local Model Timeout Settings That Actually Work
The table below maps every timeout parameter users commonly try against what it actually controls and whether it affects the LLM idle watchdog. This is the reference that does not exist in the official docs.
| Parameter | What it controls | Fixes LLM idle watchdog? | Recommended value (local models) |
|---|---|---|---|
agents.defaults.timeoutSeconds |
Total agent run duration | Only on versions after d9dc75774b, and only when idleTimeoutSeconds is unset | 300 |
agents.defaults.llm.idleTimeoutSeconds |
Time allowed before first streamed token from LLM | Yes — this is the fix | 300 (MLX/Ollama) or 600 (llama.cpp + large context) |
channels.*.timeoutSeconds |
Channel-level response timeout (Telegram, Discord, etc.) | No | 300 |
tools.web.fetch.timeoutSeconds |
HTTP timeout for web fetch tool | No | Default is usually fine |
LLM_REQUEST_TIMEOUT (env var) |
LLM SDK HTTP timeout (defaults to 600s — not the problem) | No | Leave at default |
WebSocket RPC requestTimeoutMs (hardcoded) |
Gateway-to-runner RPC (30s default, pre-fix versions only) | Partial — only relevant on pre-d9dc75774b versions | Upgrade instead of patching the bundle |
The most common trap documented across the GitHub thread is setting agents.defaults.timeoutSeconds = 86400 and assuming that covers everything. On pre-fix versions, it covers nothing relevant to this bug. On post-fix versions, it helps — but only if idleTimeoutSeconds is not set separately. Once you set idleTimeoutSeconds explicitly, that value takes precedence and the inheritance from timeoutSeconds no longer applies.
A note on the AWS Bedrock report in the GitHub thread: user KundKMC documented the same 60-65 second timeout pattern with zai.glm-5 on Bedrock (eu-west-2), confirming a consistent durationMs=61505 in diagnostic logs. The same fix applies — the idle watchdog fires before the cloud model’s response completes in high-context scenarios, not just with local inference backends.
Should You Upgrade to the Fixed Version, or Is Your Current Workaround Enough?
Short answer: upgrade, then also set the config parameter. The upgrade alone is not sufficient for most local model deployments.
Version breakdown:
- OpenClaw 2026.3.12 and earlier: Fully affected. The idle watchdog is hardcoded at 60 seconds.
agents.defaults.timeoutSecondsdoes nothing for this. The only option is patching the bundle (fragile, re-applies on every update) or settingagents.defaults.llm.idleTimeoutSecondsdirectly — which works even on these versions because the config path was always wired up; the fallback default was just never configurable at the user level until the documentation failure was identified. - OpenClaw 2026.4.2 through versions before d9dc75774b: The hardcoded 30s WebSocket RPC timeout is still present alongside the 60s idle watchdog. Users confirmed both firing independently. Set both
timeoutSecondsandidleTimeoutSecondsto 300+. - OpenClaw post-d9dc75774b (April 8, 2026 onwards): The inheritance behavior is fixed. If you set
agents.defaults.timeoutSeconds = 300and do not setidleTimeoutSeconds, the watchdog inherits 300 seconds. This is better, but settingidleTimeoutSecondsexplicitly is still recommended because it makes your intent unambiguous and is unaffected by future changes to the inheritance logic.
The JavaScript bundle patch documented by hkstrongside (sed -i.bak 's/: 3e4;/: 3e5;/' reply-Bm8VrLQh.js) is not recommended as a permanent fix. The bundled file names change between versions, making the patch non-portable. User panda-on in the thread confirmed this: on their installation, the relevant code had moved to method-scopes-0x4tgmV6.js. Bundle-patching is a diagnostic tool, not a deployment strategy.
The fastest path to a working local model setup is this sequence:
- Update to the latest OpenClaw release.
- Add
agents.defaults.llm.idleTimeoutSecondsto youropenclaw.jsonusing the config block in Section 2. - Set
agents.defaults.timeoutSecondsto the same value for consistency. - Restart the OpenClaw gateway.
- Test with a known cold-start scenario (restart your Ollama/MLX server, then send a 10k+ token context request).
If you’re still hitting timeouts after following these steps on the latest version, file a fresh issue rather than commenting on the closed #46049 thread. The fix was confirmed working on OpenClaw 2026.4.5 with Ollama, MLX, and llama.cpp backends across multiple platforms including Raspberry Pi 5 and Apple Silicon M4 Pro.
What OpenClaw Local Model Timeout Means for Your Stack
The technical fix here is a single JSON key. You can add it in 30 seconds. What takes longer is understanding why you needed to find it on Reddit instead of in the error message.
OpenClaw has multiple overlapping timeout systems that resolve independently at different layers of the stack. That’s a reasonable architectural choice for a tool handling everything from cron jobs to real-time chat to multi-step tool chains. But it creates a discoverability problem when the configuration namespace doesn’t map cleanly to the mental model users bring. When a user sets every timeout they can find to 86,400 seconds and the system still times out after 60, the natural conclusion is that the timeout is hardcoded and unfixable. It isn’t — but the error message confirms that assumption by pointing to the wrong parameter.
The broader lesson for anyone running local inference in agent frameworks: your timeout budget must be measured from request dispatch, not first token — meaning prefill eats your margin before generation begins. DeepSeek-R1-Distill-Qwen-32B on MLX can consume the entire 60-second default watchdog in prefill alone, at which point a 400 tok/s generation rate is irrelevant. Any agent framework with a timeout system needs to surface the prefill window in the error message that fires when it expires — specifically by naming agents.defaults.llm.idleTimeoutSeconds in the LLM request timed out log line, not in a GitHub issue comment four months later.
Set agents.defaults.llm.idleTimeoutSeconds. The bug was fixed. Make sure your config knows it.
Frequently Asked Questions About OpenClaw Local Model Timeout
Q: Why does the OpenClaw local model timeout persist even after setting agents.defaults.timeoutSeconds to a large value?
A: Because there are two separate timeout systems in OpenClaw’s embedded runner. agents.defaults.timeoutSeconds controls the total agent run duration, but a separate LLM idle watchdog — defaulting to 60 seconds — fires before the first streamed token is received. You must set agents.defaults.llm.idleTimeoutSeconds explicitly to fix this. On versions released after commit d9dc75774b (April 2026), setting agents.defaults.timeoutSeconds will cause the watchdog to inherit that value, but only if idleTimeoutSeconds is not set separately.
Q: What is the correct config to fix OpenClaw local model timeout for Ollama and MLX backends?
A: Add the following block to your ~/.openclaw/openclaw.json: {"agents": {"defaults": {"timeoutSeconds": 300, "llm": {"idleTimeoutSeconds": 300}}}}. For MLX on Apple Silicon, 300 seconds is the minimum recommended value due to prefill times of 60+ seconds on 25k-token contexts. For llama.cpp with large context windows (50k+ tokens), use 600 seconds.
Q: Which OpenClaw version shipped the fix for the local model timeout bug?
A: The fix was merged to main in commit d9dc75774b on April 8, 2026, confirmed by contributor steipete in the GitHub issue openclaw/openclaw#46049. Versions from 2026.4.5 onwards include this fix. However, even on fixed versions you should explicitly set agents.defaults.llm.idleTimeoutSeconds in your config, because the improved inheritance behavior only applies when that parameter is left unset — once you configure it explicitly, it takes full precedence.
Sources
Synthesized from reporting by reddit.com, github.com, community.n8n.io.
- reddit.com: Openclaw LLM Timeout (SOLVED) : r/LocalLLaMA
- github.com: [Bug]: LLM request timeout ignores configured timeout settings (agent/channel/tool timeouts not respected) · Issue #46049 · openclaw/openclaw · GitHub
- reddit.com: r/openclaw – Reddit
- reddit.com: openclaw – Reddit
- community.n8n.io: Request timed out error when using OpenAI LLM in AI Agent – Questions – n8n Community