openclaw - 💡(How to fix) Fix Stability, installer auth, runtime compatibility, and context-management improvements

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

This is a field report from a real OpenClaw installation/use session. The main reliability issues are clustered around local dashboard auth persistence, Codex OAuth profile detection, runtime/package compatibility, long-session context growth, and missing final assistant messages after tools complete.

Reporter: @Arentai86 / OpenZen

Error Message

  • The error suggests auth may be stored in the wrong place or not propagated to the agent directory.

Root Cause

These issues are not isolated polish problems. Together they make OpenClaw feel unreliable after install and during serious long-running work. Fixing auth persistence, version atomicity, context hygiene, and guaranteed final-turn completion would substantially improve trust in OpenClaw as a daily-use agent runtime.

Fix Action

Fix / Workaround

After 20-30 minutes of continuous work, active context can fill with tool output, repeated logs, failed patch attempts, command output, and stale intermediate state.

  • long shell outputs
  • repeated failed patches
  • repeated missing-file errors
  • repeated same-tool failures
  • logs that are no longer useful once the task is done

Code Example

Auth required
The Gateway is reachable, but it needs a matching token or password before this browser can connect.

---

Agent failed before reply: No API key found for provider "openai-codex".
Auth store: ~/.openclaw/agents/main/agent/auth-profiles.json
Configure auth for this agent ...

---

(0, _pluginRuntime.listRegisteredPluginAgentPromptGuidance) is not a function

---

Cannot find module
~/Library/Application Support/OpenClaw/runtime/server/dist/plugin-sdk/root-alias.cjs/agent-harness-task-runtime

Require stack:
~/.openclaw/npm/node_modules/@openclaw/codex/dist/run-attempt-...
RAW_BUFFERClick to expand / collapse

Summary

This is a field report from a real OpenClaw installation/use session. The main reliability issues are clustered around local dashboard auth persistence, Codex OAuth profile detection, runtime/package compatibility, long-session context growth, and missing final assistant messages after tools complete.

Reporter: @Arentai86 / OpenZen

Environment

  • OS: macOS
  • Installation path: custom OpenClaw installer
  • Gateway URL observed locally: http://127.0.0.1:7842
  • Chat URL observed after install: http://127.0.0.1:7842/chat?session=main
  • Runtime/package locations involved:
    • ~/.openclaw
    • ~/Library/Application Support/OpenClaw/runtime/server
    • ~/.openclaw/npm/node_modules/@openclaw/codex

Problems Observed

1. Dashboard/chat auth breaks after browser restart

After reopening OpenClaw, the browser can land on the Gateway Dashboard auth screen instead of returning to the usable chat session.

The page asks for:

  • WebSocket URL
  • Gateway Token
  • Password

Observed message:

Auth required
The Gateway is reachable, but it needs a matching token or password before this browser can connect.

Expected:

  • Installer creates and persists a valid local dashboard/chat URL.
  • Browser restart does not break the local session.
  • User does not need to manually recover WebSocket token/password after a normal install.

Actual:

  • A raw URL like http://127.0.0.1:7842/chat?session=main is not enough.
  • User can be dropped into an auth dashboard and blocked without manual token setup.

2. Codex OAuth/auth profile is not reliably picked up

OpenClaw can fail only after the user sends a message:

Agent failed before reply: No API key found for provider "openai-codex".
Auth store: ~/.openclaw/agents/main/agent/auth-profiles.json
Configure auth for this agent ...

Expected:

  • If openai-codex is selected, OpenClaw should use the Codex OAuth profile automatically.
  • Installer/runtime should copy, link, or discover portable auth profiles correctly.
  • Missing auth should be detected during setup or preflight, not after the first user request.

Actual:

  • UI loads and the agent appears usable.
  • Execution fails only at runtime.
  • The error suggests auth may be stored in the wrong place or not propagated to the agent directory.

3. Runtime/package mismatch after update or install

Observed errors include:

(0, _pluginRuntime.listRegisteredPluginAgentPromptGuidance) is not a function

and:

Cannot find module
~/Library/Application Support/OpenClaw/runtime/server/dist/plugin-sdk/root-alias.cjs/agent-harness-task-runtime

Require stack:
~/.openclaw/npm/node_modules/@openclaw/codex/dist/run-attempt-...

Expected:

  • Bundled runtime server and @openclaw/codex versions are always compatible.
  • Installer/update process is atomic.
  • If runtime files/functions are missing, OpenClaw repairs itself or refuses to start with a clear diagnostic.

Actual:

  • Gateway can start successfully while agent execution fails later.
  • Runtime references files/functions that are not present in the installed server package.

4. Agent executes tools but does not send the final answer

Repeatedly, OpenClaw runs tool calls successfully but never sends the final assistant message. The user then has to ask again what happened.

Observed:

  • Tool cards appear.
  • Commands finish.
  • No final assistant response arrives.
  • Sometimes runtime eventually reports idle/watchdog fallback.

Expected:

  • After tools finish, OpenClaw always emits a final assistant message.
  • UI receives a turn/completed or equivalent terminal event.
  • If the model/tool loop stalls, runtime produces a clear fallback summary from completed tool results.

Actual:

  • Chat looks hung even though work was completed.
  • User cannot tell whether the task finished, failed, or is still running.

5. Context grows too fast and long project chats become unreliable

After 20-30 minutes of continuous work, active context can fill with tool output, repeated logs, failed patch attempts, command output, and stale intermediate state.

Expected:

  • Completed tool results are compacted or summarized.
  • Old bulky tool output is removed from active prompt context.
  • Important decisions and state remain as compact summaries.
  • Long project sessions remain usable for hours.

Actual:

  • Context usage becomes very high.
  • Agent slows down, hangs, or stops answering.
  • Old tool outputs appear to remain in active context too long.

6. Tool output and repeated failed attempts pollute context

OpenClaw appears to keep too much low-value operational noise in the conversation:

  • long shell outputs
  • repeated failed patches
  • repeated missing-file errors
  • repeated same-tool failures
  • logs that are no longer useful once the task is done

Expected:

  • Tool output has strict caps.
  • Repeated identical errors trigger a hard stop or summarization.
  • Completed phases are replaced by concise state summaries.

Actual:

  • Context fills with low-value operational history.

Suggested Improvements

  1. Make the installer create a valid persistent local dashboard/chat URL.
  2. Persist or auto-refresh gateway auth tokens across browser restarts.
  3. Validate openai-codex auth during setup and before first run.
  4. Lock runtime server and @openclaw/codex package versions together.
  5. Add a startup doctor check for missing runtime files/functions.
  6. Add automatic context hygiene:
    • early compression around 30-40% context usage
    • pruning old tool outputs
    • keeping only the recent N messages verbatim
    • summarizing completed tool phases
    • enforcing a hard message-count or token-budget limit
  7. Guarantee final turn completion:
    • always emit turn/completed
    • if missing after timeout, synthesize a final summary from completed tool results
  8. Add visible UI state:
    • running
    • compacting
    • waiting for model
    • completed
    • failed
  9. Add loop guardrails for repeated identical tool failures.

Acceptance Criteria

  • Fresh install opens directly into a usable chat.
  • Browser restart does not require manual Gateway Token recovery.
  • openai-codex works with Codex OAuth profile without a manual API key.
  • Runtime update cannot leave mixed incompatible versions.
  • Agent always sends a final answer after completing tools.
  • Long sessions can run for hours with automatic context compaction.
  • User never sees silent hangs after completed tool execution.

Why this matters

These issues are not isolated polish problems. Together they make OpenClaw feel unreliable after install and during serious long-running work. Fixing auth persistence, version atomicity, context hygiene, and guaranteed final-turn completion would substantially improve trust in OpenClaw as a daily-use agent runtime.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING