Skip to content

Gateway startup fails on WSL2: EROFS chmod '/home/junl/.openclaw/state' in subagent-registry #108250

Closed

Description

@j7l9

Summary

OpenClaw Gateway (v2026.7.1) fails to start on WSL2. The subagent-registry and task-registry modules attempt to chmod ~/.openclaw/state during startup, which throws EROFS: read-only file system, causing Gateway shutdown.

v2026.6.11 does not have this issue (no such modules).

Environment

  • OS: Linux 6.18.33.1-microsoft-standard-WSL2 (x64)
  • WSL: Ubuntu on Windows (WSL2)
  • Node: v22.22.3
  • OpenClaw: 2026.7.1
  • Filesystem: ext4 via WSL2
  • Directory: ~/.openclaw/state — permissions 0700, owner junl:1000

Steps to Reproduce

  1. Run WSL2 (Ubuntu) with OpenClaw installed via npm global
  2. Install/update to openclaw@2026.7.1
  3. Start Gateway (systemd user service or manual)
  4. Gateway fails to start

Relevant Log Excerpts

2026-07-15T18:37:04.876+08:00 [agents/subagent-registry] failed to restore subagent runs from disk: EROFS: read-only file system, chmod /home/junl/.openclaw/state
2026-07-15T18:37:04.937+08:00 [gateway] starting HTTP server...
2026-07-15T18:37:04.959+08:00 [tasks/registry] Failed to restore task registry
2026-07-15T18:37:16.291+08:00 [shutdown] started: gateway startup failed

Additional Evidence

  • chmod 700 ~/.openclaw/state from bash shell → succeeds (exit 0)
  • Python os.chmod("/home/junl/.openclaw/state", 0o700) → succeeds
  • The filesystem is not read-only — this appears to be a Node.js + WSL2 ext4 compatibility issue with the specific chmod call path used by the new modules

Impact

Gateway cannot start. Complete outage on WSL2. Users must rollback to 2026.6.11 to recover.

Suggested Fix

  • Avoid chmod on ~/.openclaw/state at startup (directory should already have correct permissions from prior runs)
  • If permissions enforcement is needed, wrap chmod in try/catch and continue on EROFS in WSL environments
  • Consider using graceful degradation for subagent-registry / task-registry restore failures instead of blocking Gateway startup

Activity

  1. locked as resolved and limited conversation to collaborators on Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions