OpenClaw Update: Strengthening Agent Stability and Plugin Performance
The latest set of merges for OpenClaw addresses several critical stability bottlenecks, particularly around agent context management and plugin discovery. By introducing safety timeouts for compaction and reducing redundant filesystem operations during startup, the platform is significantly more resilient to hung processes and slow startup times.
Merged PRs
- Move Codex soul context to developer instructions (Original PR)
- fix(config): dedupe missing official plugin warnings (Original PR)
- docs: clarify xAI OAuth setup (Original PR)
- Expose messageId in message CLI JSON output (Original PR)
- Preserve disabled Discord presentation buttons (Original PR)
- feat(ui): tool name style in usage panel (Original PR)
- perf(plugins): extend discovery threading to loader, manifest registry, installed-index, and config contracts (Original PR)
- fix(clawhub): preserve base URL path prefix (Original PR)
- docs: move native codex plugins into capabilities (Original PR)
- fix(plugins): add default timeout for before_compaction/after_compaction hooks (Original PR)
- fix(cli): honor --no-prefix-cwd in acp (Original PR)
- fix(agents): bound plugin-owned context-engine compaction with a safety timeout (Original PR)
- fix(twitch): register chat intent for refreshing auth (Original PR)
- Fix managed Gateway updates across CLI and service Node skew (Original PR)
- perf: thread explicit plugin discovery through contracts registry (Original PR)
- [codex] fix iOS TestFlight release archive (Original PR)
- feat(codex): add plugin list enable disable commands (Original PR)
Key Changes
Agent Stability and Compaction Safety
One of the most significant improvements is the mitigation of "agent hangs" during context compaction. Previously, plugin-owned context engines (such as the lossless-claw LCM plugin) could run compact() without any safety timeout or abort signal. If a plugin's compaction process stalled—due to rate-limited summarizers or unbounded loops—the entire agent turn would hang indefinitely.
To resolve this, OpenClaw now implements compactContextEngineWithSafetyTimeout, which wraps plugin compaction in a finite safety timeout and threads an AbortSignal into the contract. Additionally, a default 30-second timeout has been added to before_compaction and after_compaction void hooks to prevent them from freezing the Codex notification queue.
Plugin Discovery Performance
Startup performance, particularly for the TUI, was suffering from redundant filesystem walks. Profiling revealed that discoverOpenClawPlugins() was being called independently by multiple subsystems, resulting in hundreds of thousands of synchronous JSON reads for a small number of unique paths.
Recent changes introduce a threading pattern where a PluginDiscoveryResult can be pre-computed and passed through the loader, manifest registry, and config contracts. This allows the platform to perform one filesystem walk per startup flow rather than repeating it for every subsystem.
Codex and Integration Enhancements
- Codex Management: New commands (
/codex plugins list,enable, anddisable) allow users to manage Codex sub-plugins directly from the command surface, with changes persisting inopenclaw.json. - Twitch Auth: A fix was implemented to register the
chatintent when adding users with refreshing tokens, resolving an issue where bot accounts failed to establish stable IRC connections. - ClawHub Connectivity: The system now correctly preserves base URL path prefixes for ClawHub requests, enabling support for reverse-proxied deployments.
- CLI Improvements: The
openclaw message send --jsoncommand now exposes a top-levelmessageIdfor easier automation, and theacpcommand now correctly honors the--no-prefix-cwdflag.
Impact
These updates directly address several high-severity pain points reported by users and maintainers:
- Elimination of Infinite Hangs: By bounding compaction and hooks, users will no longer experience agents that stop responding entirely during context management.
- Reduced Startup Latency: The optimization of plugin discovery removes a massive I/O bottleneck, significantly speeding up the launch of the TUI and Gateway.
- Improved Developer Experience: The addition of stable CLI JSON outputs and corrected Node binary handling during
openclaw updatereduces friction for automation and system administration. - Reliable Integrations: Fixes to Twitch auth and ClawHub URL construction ensure that third-party integrations work reliably across diverse deployment environments.