OpenClaw v2026.5.22 發佈摘要
OpenClaw v2026.5.22 發佈摘要
關鍵變更
OpenClaw v2026.5.22 引入了一系列深層技術優化與穩定性改進,旨在降低延遲、改善記憶體管理,並強化不同作業系統下的系統安全性。
Gateway 效能與延遲
其中最顯著的更新之一是大幅降低了 /models 列舉的延遲。透過在啟動時預熱 provider auth-state map,每次呼叫模型列舉的成本已從大約 20 秒降至 5 毫秒——實現了 4,100 倍的加速。這確保了 Discord 和 Telegram 中的模型選擇器能保持響應,且不再觸發互動逾時。
進一步的效能提升包括:
- Plugin Registry Reuse: Gateway 現在會在分發期間重複使用相容的啟動插件註冊表,避免冗餘載入並降低首次分發延遲。
- Lazy Loading: 啟動時閒置的插件工作、核心 Gateway 方法處理程序,以及內嵌的 ACPX runtime 現在都採用延遲載入,允許 Gateway 健康狀態與就緒訊號在無需等待未使用的處理程序樹的情況下發出。
- Resource Caching: 系統現在會快取 plugin SDK public-surface alias maps,並重複使用不可變的插件元數據快照,以避免在熱路徑上重複進行檔案系統統計。
Agent 與 Sub-agent 協調
父代理(parent agents)與委派工作者(delegated workers)之間的協調已進行精煉,以獲得更好的 token 效率與可靠性:
- Bootstrap Optimization: 使用者現在可以為 sub-agents 配置特定的 bootstrap files 列表(例如,使用
SUBAGENTS.md代替完整的SOUL.md與USER.md堆疊),從而降低委派任務的 token 開銷。 - Completion Delivery: Codex-native
spawn_agent的完成結果現在會主動交付回父 session,確保背景工作者結果在 Discord 中是可見的,而無需使用者手動觸發。 - Sub-agent Handoff: 原生的 sub-agent completion handoff 已被簡化;子代理現在會直接向請求者報告其最新的可見助手結果。
記憶體與 Session 管理
為了支援高負載部署,session store 已重新設計以減少記憶體保留:
- Immutable Read APIs: 新的快照與條目級別的讀取 API 取代了可變的全量 store clones,防止了先前在高 session 環境中導致 OOM 錯誤的大型
skillsSnapshot.prompt字串的重複。 - Locking Hardening: Session 寫入鎖現在會在獲取期間獨立執行
maxHoldMs策略,防止 Gateway 在大型 session files (>300KB) 導致寫入緩慢時發生凍結。 - Context Budgeting:
/status指令現在會在無法取得最新 provider 使用情況時,揭露估計的 context budget 快照,提供更好的 prompt 壓力可視性。
OS-Specific Hardening
- macOS (launchd):
reloadhandoff script 現在會輪詢以確認卸載完成,以防止啟動過程中的Input/output error競態條件。此外,現在會透過在報告失敗前探測服務狀態來優雅地處理併發啟動競態。 - Windows: Codex app-server 現在會驗證指令覆寫(command overrides),以防止格式錯誤的字串(例如,將執行檔與參數組合在一起)被視為單一模組路徑。Windows 安裝程式也已強化,以處理 Git checkout 失敗並在原始主機上引導啟動可攜式 Node.js。
影響
已修復的問題
- Stability: 修復了因工作區啟動條目中未定義的檔名而導致啟動 context building 崩潰的嚴重問題 (#85523)。
- Reliability: 解決了
openclaw agent在 cron 下忽略SIGTERM的問題,導致程序鏈掛起與 RAM 耗盡 (#71710)。 - Connectivity: 修復了迴路 CDP issue,即受管代理(managed proxy)阻礙了瀏覽器的 WebSocket handshake,導致使用者在代理後使用
openclaw browser start時失效 (#83255)。 - Accuracy: 修復了 Anthropic transport 中精度損失的 bug,即大型整數 ID(例如 Discord snowflakes)在 JSON 解析時被四捨五入 (#47229)。
- User Experience: 修復了
/verbose on在一般群組 session 中被忽略的 bug,導致工具與進度摘要被隱藏 (#85488)。
整合提升
- xAI/Grok: 增加了對 Grok
web_search的 xAI OAuth profiles 支援,並引入了新的 Grok model aliases。 - Telegram: 透過允許將本地附件路徑作為實際媒體發送,改善了媒體傳遞。
- Discord: 為組件註冊表生命週期增加了可配置的
agentComponents.ttlMs,以支援更長時間運行的非同步工作流。
升級指南
Breaking Changes & Migration
- Workspace Provider Plugins: 為了安全性強化,除非被明確信任,否則在設定模式下不再自動發現工作區來源的 provider plugins。使用者必須將這些 plugin IDs 添加到
config.plugins.allow列表中以維持現有行為。 - Codex App-Server (Windows): 手動的
appServer.command指令覆寫若將執行檔與參數組合在單一字串中,現在會被拒絕。使用者應移除這些覆寫覆寫,並依賴受管啟動路徑或提供有效的執行檔路徑。
Sources
- Releasev2026.5.22 — openclaw 2026.5.22
- PRFix: preserve modelOverride in agent handler (#5369)
- PRfeat(anthropic): migrate 1M context from beta to GA
- PRdocs/types: clarify that omitting accountId in bindings matches default account only, not all accounts
- PRfix(gateway): normalize explicit state dir overrides at startup
- PRfix(memory): report missing qmd workspace cwd
- PRfeat: start onboarding for fresh CLI installs
- PRfix(agents): handle parallel tool call deltas in openai-completions stream
- PRfix(proxy): add missing clientSocket error handler in CONNECT tunnel
- PRfix(browser): bypass managed proxy for loopback CDP
- PRfix(update): repair managed npm plugin peers
- PRAllow Discord component registry TTL override
- PRperf(plugins): reuse compatible gateway startup registry on dispatch
- PRperf: isolate doctor core check tests
- PRfix(sessions): reduce session-store memory retention
- PRSpeed up /models browse replies
- PRfix: summarize internal webchat message tool results
- PRfix(diffs): continue after card hydration errors
- PRperf(models): /models 20s → 5ms via pre-warmed provider auth state
- PRfeat(agents): expose estimated context budget status
- PRfix(cli): validate tasks audit limit
- PRfix(agents): bound embedded compaction write locks
- PRfix(skills): show empty state notice in config wizard
- PRfix(memory-lancedb): expose public memory artifacts
- PRFix Telegram forum-topic subagent completion delivery
- PRfeat: add xAI OAuth web search and provider timeouts
- PRLet plugin binding commands escape bound routes
- PRfix(telegram): send attachment paths as media
- PRAdd chat picker search and pagination
- PR[Fix] Preserve deferred lifecycle errors
- PR[token efficiency] subagent bootstrap files
- PRrefactor(crabbox): parse provider list from binary help instead of hardcoding
- PRfix(twitch): preserve newer message handler during cleanup
- PRRestore Control UI gateway token pairing [AI]
- PRfix(status): bound deep docker audit probes
- PRfix(channels): honor /verbose in group sessions
- PRRecover stuck Codex compaction
- PRfix(microsoft-foundry): DeepSeek models incorrectly use openai-completions API
- PRfix(tools): honor config apiKey in media tool preflight
- PRfix(session): surface previous-transcript archive failures on /new rotation (#81984)
- PRfix(agents): add openai-responses family to non-visible turn retry guard
- PRfix(bootstrap): guard bootstrap name checks against undefined names (#85523)
- PRfix(status): show configured cost for aws-sdk models
- PRfix(cli-output): ignore cumulative usage from result events in stream-json parser (#85573)
- PRfix(agents/harness): pass CLI runtime aliases through to PI in selectAgentHarnessDecision
- PRfix(secrets): show irreversible warning after interactive apply confirmation
- PRfix(gateway): omit stream-error placeholders from agent prompts
- PRperf(utils): preserve message identity in stripInlineDirectiveTagsFromMessageForDisplay
- PRfix(cli): waitForever must keep the event loop alive
- PRfix(session-lock): enforce maxHoldMs in shouldReclaim during lock acquisition
- PRfix(agents): omit empty tools array for proxy-like openai-completions endpoints
- PRfix(status): add gateway delivery health telemetry
- PRfix: resolve per-model api override in auth hooks and transport selection
- PRfix(agents): surface blocked subagent completions
- PRfix(plugins): secure setup-mode provider discovery against untrusted workspace plugins [AI-assisted]
- PRPrepack npm git update specs before install
- PRfix(update): preserve package service state during cutover
- PRfix(anthropic): preserve unsafe integer tool inputs
- PRfix(models): resolve set aliases from runtime config [AI-assisted]
- PRfix(push): use valid default VAPID subject [AI-assisted]
- PRfix(channels): bypass debounce for bare abort triggers [AI-assisted]
- PRfix(code-mode): return structured worker error codes
- PRfix(codex): deliver native spawn_agent completions
- PRfix(code-mode): align outer exec hook params
- PR[AI-assisted] fix(reply): wait for block replies before tools
- PRfix(core): route dmScope main event wakes to agent main
- PRfix(update): harden managed handoff cwd
- PRFix media completion duplicate delivery
- PRLog Discord component registry error details
- PRfix(agent): abort accepted gateway runs on signal
- PRValidate Codex app-server command overrides
- PRfix(gateway): include openclaw bin in service PATH
- PRfix(gateway): harden launchd reload handoff race recovery
- PRfix(gateway): handle concurrent launchd bootstrap restart race
- PRfix #84745: scope Google preview model normalization to Google providers only
- PRfix(gateway): mirror source message sends into transcript
- PRfix(gateway): eager-load lifecycle runtime to survive in-place upgrades
- PRfix(integrations): enforce channel read target allowlists [AI]
- PRfix(agent): await local agent_end hooks
- PRfix(channels): pass allowBootstrap from channel-selection so in-agent message tool resolves channels in --local processes
- PRfix: constrain Windows task script names [AI]
- PRfix(gemini): strip sub-second precision from web_search time_range_filter
- PRfix(openai): preserve codex gpt-5.5 image input
- PRfix(codex): block progress-only completions [AI-assisted]
- PRfix(agent): support explicit CLI session keys
- PRfix(skills): dedupe shared-directory watchers across agent workspaces (#84968)
- PRfix: strip -plugin suffix in deriveIdHint to match manifest ids
- PRfix(gateway): close child ACP sessions on parent reset/delete (#68916)
- PRfix(agents): stop denied exec followups
- PRfix(messages): strip unsupported citation markers
- PRfix(telegram): preserve fenced code languages
- PR[codex] fix control ui chat session picker history
- PR[codex] Clarify inherited thinking off label
- PR[codex] add color mode tooltips
- PR[Fix] Surface gateway connect assembly failures
- PRfix(agents): preserve OpenAI reasoning token usage
- PRFix heartbeat message-tool delivery policy
- PRfix(codex): add API key paste auth
- PRfix(codex): honor node exec policy for native surfaces
- PRFix context pressure preflight for tool-heavy sessions
- PRFix Telegram missing harness spool poison
- PRFix/codex deactivated workspace failover
- PRfix(tui): raise streaming watchdog threshold to 120s and suppress false-positive warning
- PRfix(memory-core): allow bounded dreaming session cleanup
- PRfix(trajectory): tolerate partial skill snapshot entries in support capture
- PRfix(agents): disable pi-coding-agent auto-retry to prevent tool call replay loops
- PRfix(agents): classify auth HTML provider responses
- PRfix(exec): protect pathPrepend against posix login-shell RC overrides
- PRfix(gateway): allow bearer-auth session history reads
- PRKeep legacy Codex OAuth sidecar profiles usable
- PRfix(diffs): replace iconMarkup string with ToolbarIconName enum to el…
- PRfix(agents): tolerate in-process session writes during prompt release
- PRfix(slack): suppress reasoning payloads in non-streaming delivery paths
- PRfix(memory): stop recall tracking when dreaming is disabled
- PRperf(cli): lazy-load agents actions for help
- PRperf(cli): speed up onboarding help startup
- PRSkip empty sherpa structured transcripts
- PRfix(codex): stabilize heartbeat dynamic tool schema
- PRfix(pdf): time out idle remote PDF reads
- PRperf(cli): cache stable subcommand help
- PRfix(config): validate browser sandbox bind sources [AI]
- PRdoctor: constrain legacy plugin cleanup paths [AI]
- PRperf: speed up secrets and nodes help startup
- PRFix Telegram isolated polling stall watchdog
- PRfix(update): prune stale local bundled plugin shadows
- PRfix(codex): beta blocker - keep context engine on canonical session key
- PRFix Discord session recovery abort ownership
- PRHandle Codex turns missing completion
- PRFix Matrix configured two-person room routing
- PRFix inherited XDG env for exec subprocesses
- PRfix: redact denied exec failure params
- PRfix: require configured subagent allowlist targets
- PRfix(codex): surface native compaction failures
- PRfix(telegram): dedupe replayed message dispatches
- PRfix(codex): extend message tool timeout