OpenClaw v2026.3.7: Context Engines, Persistent Bindings, and a Slimmer Docker Image

Another substantial release. This one is heavy on extensibility and deployment improvements. The context engine plugin interface is the kind of foundational change that will pay dividends for months. The rest is a mix of quality-of-life improvements and fixes that close real production gaps.

Full release: v2026.3.7 on GitHub

The Headliners

Context Engine Plugin Interface

This is the biggest architectural change in this release. OpenClaw now has a formal ContextEngine plugin slot with full lifecycle hooks: bootstrap, ingest, assemble, compact, afterTurn, and subagent spawn/end hooks. A LegacyContextEngine wrapper preserves existing compaction behavior for everyone who doesn’t opt in.

What this means in practice: plugins like lossless-claw can now provide completely alternative context management strategies without modifying core compaction logic. If you’ve ever wished you could control exactly how your agent’s context window gets built, trimmed, or carried across sub-agent boundaries, this is the extension point for that.

Why it matters: The default compaction works fine for most setups, but power users with specific context requirements (long research sessions, code review pipelines, multi-step orchestration) can now plug in their own logic. Zero behavior change if you don’t configure one. That’s the right way to ship a feature like this.

ACP Persistent Channel Bindings

ACP thread bindings now survive restarts. Discord channel and Telegram topic bindings get durable storage, proper routing resolution, and CLI management support. Previously, spawning an ACP session bound to a Discord thread would lose that binding on gateway restart. Now it persists.

Telegram gets even more love here: topic thread bindings work with --thread here|auto, follow-up messages route correctly to bound sessions, and successful binds get pinned in-topic for visibility.

Why it matters: If you use ACP sessions (spawning Codex, Claude Code, or other agents in Discord threads), this removes the biggest reliability gap. No more orphaned sessions after a restart. No more re-binding manually. The thread just works, persistently.

Per-Topic Agent Routing

Forum groups and DM topics on Telegram can now route to dedicated agents with isolated sessions. Set a per-topic agentId override and each topic gets its own agent brain.

Why it matters: If you run a Telegram forum group (one of the best setups for multi-purpose agents), you can now have different topics route to different agents. A “code review” topic goes to your coder agent. A “research” topic goes to your main Opus agent. A “quick questions” topic goes to Haiku. Each with isolated context. Clean separation without running multiple bot accounts.

Multi-Stage Docker Build

The Dockerfile got restructured into a proper multi-stage build. The runtime image ships without build tools, source code, or Bun. There’s also a new OPENCLAW_VARIANT=slim build arg for a bookworm-slim variant, and OPENCLAW_EXTENSIONS lets you bake selected extension dependencies into the image.

Why it matters: If you’re deploying OpenClaw in containers (Proxmox LXC, Docker Compose, Kubernetes), your images just got significantly smaller and faster to start. Pre-baking extensions means no npm install on every container launch. This is a “finally” change for anyone running OpenClaw in production containers.

The Sleepers

Compaction Lifecycle Events

New session:compact:before and session:compact:after internal events plus plugin callbacks with session and count metadata. Automations can now react to compaction runs.

Why it matters: Compaction is one of those invisible processes that can cause confusion when it happens mid-conversation. Now you can hook into it. Log it. Alert on it. Adjust behavior before or after. Useful for debugging sessions where context seems to “forget” things.

Post-Compaction Section Control

New agents.defaults.compaction.postCompactionSections config lets you choose which AGENTS.md sections get re-injected after compaction. Legacy fallback behavior preserved.

Why it matters: After compaction, OpenClaw re-injects parts of your AGENTS.md to maintain agent identity. But maybe you don’t want all of it. Maybe your AGENTS.md has sections that are only relevant for initial context. Now you control exactly what survives compaction. Fine-grained tuning that was previously impossible.

System Context Plugin Fields

Plugins can now use prependSystemContext and appendSystemContext to place static guidance in system prompt space. This is significant for provider caching: system prompt content gets cached more efficiently than user-space injections.

Why it matters: If you write plugins that inject instructions, putting them in system context space means Anthropic’s prompt caching can actually cache them across turns. That translates directly to lower token costs on repeated turns. Subtle but impactful for high-volume setups.

Plugin Hook Policy

New plugins.entries..hooks.allowPromptInjection config. Unknown typed hook names get validated at runtime. Legacy before_agent_start model/provider overrides preserved while prompt-mutating fields get stripped when injection is disabled.

Why it matters: Security feature. If you install third-party plugins, this lets you allow model overrides without allowing prompt mutation. Trust the plugin to pick a model, but don’t trust it to change what your agent says. Good granularity.

Tool Result Head+Tail Truncation

Oversized tool results now use head+tail truncation instead of just head truncation. Important tail diagnostics (error messages, summary lines) are preserved.

Why it matters: Ever had a long command output where the error was at the bottom but OpenClaw truncated it and you lost the error? Fixed. The agent now sees both the beginning and end of large outputs. Small change, big improvement for debugging.

OpenAI-Compatible TTS Base URL

New messages.tts.openai.baseUrl config for routing TTS to custom endpoints. Config takes precedence over environment variables.

Why it matters: If you’re running a local TTS server (like a Piper or Coqui instance), you can now route OpenClaw’s TTS through it instead of hitting OpenAI. Another brick in the local-first wall.

Breaking Changes

One breaking change, and it’s worth reading:

Gateway auth mode must be explicit. If you have both gateway.auth.token and gateway.auth.password configured (including SecretRefs), you now need to set gateway.auth.mode to either token or password before upgrading. Without it, startup, pairing, and TUI will fail.

This is a security improvement (no more ambiguous auth resolution), but it will break existing configs that have both auth methods defined without an explicit mode. Check your config before you upgrade.

Notable Fixes

A few fixes worth calling out:

  • Config fail-closed on validation errors. Previously, invalid configs could silently fall back to permissive runtime defaults. Now they fail closed. This is a security fix disguised as a bug fix. If your config has errors, the gateway won’t start instead of starting with who-knows-what defaults.

  • Memory search BM25 ranking fix. Hybrid memory search had a bug where keyword match scores were collapsing or reversing. Stronger keyword matches now rank above weaker ones, as they should. If your memory search results felt random, this is probably why.

  • Telegram stale-socket restart guard. Prevents Telegram providers from being misclassified as stale due to long uptime. Stops restart storms after upgrades. If you’ve seen your Telegram bot restart repeatedly after updating, this is the fix.

  • Headless Linux onboarding fix. The daemon install flow no longer crashes on SSH/headless VPS environments when probing systemctl. If you tried to set up OpenClaw on a remote server and it crashed during onboarding, try again with this release.

  • Brave web search language code validation. Properly handles language codes like zh-hans, zh-hant, en-gb, and pt-br instead of letting them fail upstream with 422 errors.

New Model Support

  • Gemini 3.1 Flash-Lite gets first-class support across model-id normalization, default aliases, and media understanding. Another lightweight option for tasks that don’t need heavy reasoning.

  • MiniMax-M2.5-Lightning removed from provider catalogs. If you were still referencing it, switch to MiniMax-M2.5-Highspeed.

Bottom Line

v2026.3.7 is an extensibility and reliability release. The context engine plugin interface is the headline, but the persistent ACP bindings and Docker improvements are what most production users will feel immediately.

The theme here is “stop losing state.” Bindings survive restarts. Compaction is observable. Context management is pluggable. Config errors fail loudly. These are all things that make OpenClaw more predictable in production, which is what you want from infrastructure software.

Upgrade:

openclaw update
# or
npm update -g openclaw

Check your gateway auth config first if you have both token and password defined. Run openclaw config validate to catch any issues before restarting.