Troubleshoot guide12 minUpdated 2026-05-06

Troubleshooting OpenClaw — fixes that actually work.

Most OpenClaw errors fall into a small set of buckets: a misconfigured base URL, a stale daemon, a sandboxed tool that didn't get allowed. The good news is each one has a deterministic fix. Type your symptom into the diagnostic below, or scroll the index.

Quick answers

  • How do I fix "Agent couldn't generate a response"?

    Almost always the OpenRouter base URL bug. Edit ~/.openclaw/agents/main/agent/models.json and replace openrouter.ai/v1 with openrouter.ai/api/v1, then openclaw gateway restart.
  • Why won't my OpenClaw daemon restart?

    Known regression after openclaw update — the auto-restart hits a SyntaxError on hashed module filenames. Manually run openclaw gateway stop && pkill -f openclaw-gateway && openclaw gateway start.
  • What does `openclaw doctor --fix` do?

    Audits your install — file permissions, port bindings, config validity, daemon state — and applies fixes for issues it can resolve automatically. Resolves about 70% of common problems on its own. Run it first, every time.
  • Why are tools missing from my OpenClaw chat?

    Sandbox tool policy is separate from per-agent tools.allow. Even if you added a tool to the agent, the sandbox at tools.sandbox.tools must also list it. Both layers must permit the tool.
  • Why is OpenClaw broken after updating?

    Two causes typically: (1) the post-update auto-restart failed (manual restart fixes it), or (2) compaction left orphaned tool_result blocks in active sessions. Reset broken sessions; durable facts are already in MEMORY.md.

Always run this first

Start with `openclaw doctor`

Before any deeper debugging, run the built-in auditor. It catches most of the common issues — wrong file permissions, port conflicts, stale config keys, dead daemon — and applies fixes inline.

openclaw doctor --fix

Output looks like this:

example output
✓ Gateway binary found at /usr/local/bin/openclaw
✓ Config valid: ~/.openclaw/openclaw.json
✗ Daemon not running
  → Starting... done
✓ Port 18789 available
✗ State directory permissions: 755 (should be 700)
  → Fixing... done
✓ All checks passed

If doctor --fix doesn't resolve your issue, the diagnostic below maps every known recurring symptom to its specific fix.

Match your error

Symptom diagnostic

Type your error message or symptom. The tool finds the closest match in our index of recurring OpenClaw issues — built from GitHub Issues, Discord help threads, and our own support inbox.

Symptom diagnostic

The #1 issue

"Couldn't generate a response"

The error message is generic but the cause almost always isn't. Three patterns produce 90% of these reports:

  • OpenRouter base URL bug. The fresh setup writes https://openrouter.ai/v1 but the correct endpoint is https://openrouter.ai/api/v1. Add the /api.
  • Empty turn from Anthropic. Opus 4.6/4.7 sometimes returns a zero-content "successful" response. Switch to Sonnet temporarily; the bug is being tracked.
  • Wrong API key. openclaw models list returns nothing if the provider rejects the key. Test the key directly against the provider.
# The OpenRouter fix
sed -i 's|openrouter.ai/v1|openrouter.ai/api/v1|g' \
  ~/.openclaw/agents/main/agent/models.json
openclaw gateway restart

Post-update regression

Daemon won't restart

After openclaw update, you sometimes see:

Daemon restart failed: SyntaxError: The requested module
'../daemon-cli-B8367s61.js' does not provide an export named
'runDaemonInstall'

The update succeeded — just the auto-restart hit a hashed filename mismatch. Manually restart:

openclaw gateway stop
pkill -f openclaw-gateway      # belt and suspenders
openclaw gateway start
openclaw gateway status

If you also have a stale clawdbot-gateway service from a pre-rename install, that's the second cause of port conflicts:

sudo systemctl stop clawdbot-gateway 2>/dev/null
sudo systemctl disable clawdbot-gateway 2>/dev/null
openclaw service install

Sandbox + agent

Tools missing in chat

The agent says "I'd love to read that file but I don't have the read tool" — even though you added it. Cause: two layers of allow-listing.

LayerWherePurpose
Per-agentagent.tools.allowWhat the agent can attempt
Sandboxtools.sandbox.toolsWhat the sandbox permits

Both must list the tool. Edit ~/.openclaw/openclaw.json:

~/.openclaw/openclaw.jsonjson
{
  "agents": [{
    "id": "main",
    "tools": { "allow": ["read", "write", "exec", "browser"] }
  }],
  "tools": {
    "sandbox": {
      "tools": ["read", "write", "exec", "browser"]
    }
  }
}

Most reported

OpenRouter base URL bug

Worth its own section because the fresh-install path produces this error so reliably. The signs:

  • Set up via onboarding with OpenRouter selected
  • First message returns "Couldn't generate a response"
  • Logs show "incomplete turn detected: payloads=0"
  • Direct test of your OpenRouter key works fine outside OpenClaw

The fix is one line:

sed -i 's|openrouter.ai/v1|openrouter.ai/api/v1|g' \
  ~/.openclaw/agents/main/agent/models.json
openclaw gateway restart

Or edit ~/.openclaw/agents/main/agent/models.json by hand and replace both openrouter.ai/v1 instances with openrouter.ai/api/v1.

Session corruption

Broken after compaction

After the agent runs long enough to trigger compaction, you sometimes see:

Error: tool_result block references unknown tool_use id

The compaction process can leave dangling references between tool_use and tool_result blocks. The session is unrecoverable once this happens — but durable facts in MEMORY.md are already saved (the memory flush ran before compaction).

openclaw sessions reset --agent main

Tracked in issues #9672, #8967, and #5497. The OpenClaw team is working on it; for now resetting is the workaround.

What to look for

Reading the logs

Three log destinations depending on how you're running:

SetupHow to view
Native installopenclaw logs --follow
systemd servicejournalctl -u openclaw-gateway -f
Dockerdocker compose logs -f openclaw

The five most diagnostic log lines:

  • incomplete turn detected: payloads=0 — model returned nothing. Wrong base URL, dead provider, or empty response.
  • tool_result orphaned — session corruption from compaction. Reset.
  • heartbeat skipped — rate-limited or model timeout. Check provider status page.
  • sandbox denied tool — sandbox.tools needs that tool added.
  • memory_search returned 0 results — index out of date. openclaw memory reindex.

Get help fast

When asking on Discord or filing an issue, include three things: the exact error message, the output of openclaw doctor, and the last 50 lines of logs. That gets you a fix in minutes instead of days.

FAQ

What does `openclaw doctor --fix` actually do?
Audits your install (file permissions, port bindings, config validity, daemon state) and applies fixes for issues it can resolve automatically. Per community analysis it resolves about 70% of common problems on its own. Run it first, every time.
My agent says "Couldn't generate a response" on every message. Why?
98% of the time: an OpenRouter base URL bug. Fresh installs sometimes write `https://openrouter.ai/v1` but the correct endpoint is `https://openrouter.ai/api/v1`. Edit ~/.openclaw/agents/main/agent/models.json and add /api to the path.
After `openclaw update`, the daemon doesn't restart.
Known regression — the post-update auto-restart hits a SyntaxError on the new hashed module filenames. The update succeeded; just the restart failed. Manually run `openclaw gateway restart` and it'll come up.
Tools (exec, browser) aren't showing up in chat.
Sandbox tool policy is separate from per-agent tools.allow. Even if you added a tool to the agent, the sandbox at tools.sandbox.tools must also list it. Both layers must permit the tool.
Sessions break with "orphaned tool_result" errors after compaction.
Tracked in issues #9672, #8967, #5497. Not always recoverable — clear the session and start fresh. The memory flush will have already saved durable facts to MEMORY.md, so you don't lose much.
How do I read the OpenClaw logs?
`openclaw logs --follow` for live tailing, or `journalctl -u openclaw-gateway -f` if you're running it as a systemd service. Filter by agent: `openclaw logs --agent main`. Critical errors show in red.

Want OpenClaw without the ops?

Provision is the managed OpenClaw cloud — agents, channels, browser, and skills, all running. $99/mo. 48-hour free trial.