OpenClaw has merged a Gateway performance fix aimed at worker recovery stalls in large session stores. PR #138890, "fix(gateway): prevent stalls during worker recovery," landed at 05:53 UTC on September 5, 2026.
The problem appeared when worker placement needed to resolve a single placement workspace from a store containing many sessions. According to the PR, each lookup decoded every session entry, and repeated lookups for multiple placements multiplied that work.
That kind of issue is easy to miss in small local testing. It shows up when a Gateway has real history, many retained sessions, and recovery paths that must make quick ownership decisions during activation, move, reclaim, dispatch, or conflict handling.
What Changed
Worker placement now uses OpenClaw's existing exact session-read path for workspace resolution. The PR applies that path across activation and recovery, dispatch, move, reclaim, and conflict-report lookups.
The canonical accessor still resolves the same candidate keys and stores. It still detects duplicate and noncanonical entries, returns the selected session and worktree fields, and leaves lifecycle and authority checks at their existing boundaries.
The important part is what it avoids: resolving one session no longer requires deserializing unrelated session payloads. The repair does this without adding a cache, changing storage, changing configuration, or discarding history.
Why It Matters
Gateway recovery is one of the places where small inefficiencies can become very visible. If OpenClaw is trying to recover or place workers after a restart, users care less about the internal store shape and more about whether their sessions come back without delay.
This change should help larger installations where session history has accumulated. It also keeps the fix conservative. Instead of adding a new adapter or shortcut state, worker recovery reuses the canonical exact accessor that already owns session identity resolution.
The user-visible result is straightforward:
- Worker recovery avoids decoding unrelated payloads.
- Move, reclaim, dispatch, and conflict paths use the same exact lookup style.
- Existing duplicate and noncanonical entry checks remain in place.
- Session history and workspace identity semantics stay unchanged.
- No new cache or migration is introduced.
Evidence From The PR
The PR reports a real SQLite regression where two consecutive workspace lookups decoded 48 unrelated payloads before the repair and zero afterward, while returning the same session and worktree identities.
Validation included 348 related tests across 10 files, covering worker lifecycle, move and reclaim behavior, provisioning cancellation, canonical aliases, ownership, and exact-row access. A synthetic Linux and Node 26 proof used the exact PR resolver and installed canonical SQLite accessors, again showing 48 unrelated row decodes before the change and zero after it.
Hosted CI for the reviewed head reported 106 successful checks and 17 skipped checks, including production and test typechecks. The PR also documents a 180-second post-merge observation with 91 of 91 HTTP 200 responses, median latency of 1.494 ms, and low main-thread CPU use.
The author is careful not to overclaim: that observation is not a matched before-and-after startup benchmark, and it does not prove that every possible Gateway stall is gone. Still, for this exact recovery lookup path, the before-and-after decode count is a strong signal that OpenClaw removed unnecessary full-store work.