Skip to content

[Bug]: ACPX update expands to 2.1 GiB; OOM leaves core/plugin drift that startup does not repair #107659

Closed as not planned

Description

@bjesuiter

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

A stable npm update expanded the managed @openclaw/acpx install to 2.1 GiB and was OOM-killed after replacing core; the next gateway startup kept the prerelease official plugins instead of converging them, then entered a startup failure loop.

Steps to reproduce

Observed once on the production host; a second destructive run was not attempted.

  1. Start with npm-global OpenClaw 2026.7.1-beta.5 and managed official plugins including @openclaw/acpx and @openclaw/codex at 2026.7.1-beta.5.

  2. Use a Linux host with 6 GiB RAM and no swap.

  3. Run:

    openclaw update --channel stable --yes --no-restart --json --timeout 1800
  4. Observe the core package reach 2026.7.1, then the update process get OOM-killed while creating the stable ACPX managed generation.

  5. Inspect managed plugin generations and the installed-plugin index.

  6. Restart the gateway.

Expected behavior

The update should avoid installing binaries for unrelated operating systems/architectures. If the updater is killed after core replacement, the next update/startup should either resume official-plugin convergence or keep/restore a runnable core-plugin combination before loading stale plugins.

Actual behavior

  • The update service was OOM-killed at a 3 GiB process/service memory peak.
  • The previous ACPX generation occupies 2.1 GiB and contains Claude SDK, Codex-ACP, and esbuild binaries for Linux, macOS, and Windows across architectures. The host is Linux x64.
  • The interrupted stable ACPX generation is only 304 KiB, while the active generation and installed-plugin index still point to 2026.7.1-beta.5.
  • Core reports stable 2026.7.1, and openclaw update status reports no registry update available.
  • The next gateway startup retained @openclaw/acpx@2026.7.1-beta.5 and @openclaw/codex@2026.7.1-beta.5. Startup then failed five times because the stale Codex migration emitted unresolved-owner warnings that stable core treated as a failed startup migration.
  • Manual openclaw update repair is required; startup did not perform the version convergence itself.

OpenClaw version

2026.7.1 (2d2ddc4), updating from 2026.7.1-beta.5

Operating system

Debian GNU/Linux 13.5 (trixie), Linux x86_64, 6 GiB RAM, no swap

Install method

npm global; update executed in a transient systemd user service

Model

N/A (core/plugin update path; no model request involved)

Provider / routing chain

N/A (core/plugin update path; no provider involved)

Additional provider/model setup details

N/A

Logs

$ openclaw --version
OpenClaw 2026.7.1 (2d2ddc4)

$ free -h
               total        used        free      shared  buff/cache   available
Mem:           6.0Gi       ...
Swap:             0B          0B          0B

# Result returned by systemd-run --user --wait:
Finished with result: oom-kill
Main processes terminated with: code=exited, status=1/FAILURE
Service runtime: 1min 912ms
CPU time consumed: 1min 8.023s
Memory peak: 3G (swap: 0B)

# Journal:
openclaw-stable-update.service: A process of this unit has been killed by the OOM killer.
openclaw-stable-update.service: Failed with result 'oom-kill'.

# Managed generation sizes after the failure:
2.1G  .../openclaw-acpx-...__openclaw-generation__g-<beta>/
304K  .../openclaw-acpx-...__openclaw-generation__g-<stable-partial>/
1.4G  .../openclaw-codex-...__openclaw-generation__g-<beta>/
1.2G  .../openclaw-llama-cpp-provider-...__openclaw-generation__g-<beta>/

# Active package manifests after core reached stable:
acpx:               2026.7.1-beta.5
codex:              2026.7.1-beta.5
llama-cpp-provider: 2026.7.1-beta.5

# Largest files in the complete ACPX generation include:
238M @anthropic-ai/claude-agent-sdk-linux-x64/claude
235M @anthropic-ai/claude-agent-sdk-linux-arm64/claude
233M @anthropic-ai/claude-agent-sdk-linux-x64-musl/claude
229M @anthropic-ai/claude-agent-sdk-win32-x64/claude.exe
228M @anthropic-ai/claude-agent-sdk-darwin-x64/claude
223M @zed-industries/codex-acp-linux-x64/bin/codex-acp
190M @zed-industries/codex-acp-darwin-x64/bin/codex-acp
179M @zed-industries/codex-acp-win32-x64/bin/codex-acp.exe

# Gateway startup:
OpenClaw startup migrations did not complete cleanly; refusing to report the gateway ready.
- Left Codex binding sidecar in place after importing its conversation binding because its session owner could not be resolved: <redacted-sidecar-path>

openclaw-gateway.service: Main process exited, code=exited, status=1/FAILURE
openclaw-gateway.service: Failed with result 'exit-code'.
# Repeated 5 times; systemd then left the unit failed.

Screenshots, recordings, and evidence

Registry/package evidence:

  • npm view @openclaw/acpx@2026.7.1 dist.unpackedSize reports only 222999 bytes for the plugin package itself.
  • Its published npm-shrinkwrap.json contains 40 optional platform-package entries for Anthropic Claude SDK, Codex-ACP, and esbuild.
  • The completed managed ACPX tree contains 42 platform package directories and binaries for incompatible OS/CPU combinations despite running on Linux x64.
  • @openclaw/acpx@2026.7.1 depends on @agentclientprotocol/claude-agent-acp@0.55.0 and @zed-industries/codex-acp@0.16.0; their transitive platform packages declare os/cpu metadata.

Code-path evidence in v2026.7.1:

  • src/plugins/install.ts runs managed npm install with --omit=dev --omit=peer, but does not omit optional dependencies.
  • Managed generation activation protects the previous active plugin on a normal handled failure. A SIGKILL cannot execute rollback/finally cleanup, and the partial deterministic generation remains on disk.
  • Startup runPostCorePluginConvergence calls missing-install repair and payload smoke checks. It does not call the full official-plugin version sync performed by updatePluginsAfterCoreUpdate / updateNpmInstalledPlugins.

Related but not duplicate:

Impact and severity

Affected: Native npm-global installations with managed ACPX/Codex plugins on memory-constrained hosts.

Severity: High; the update replaced core, killed another memory-heavy user service, and left the gateway unable to start.

Frequency: 1/1 observed stable update attempt on this host. A controlled repeat was not attempted because it would risk another production outage.

Consequence: Gateway outage and manual operator recovery. The active old generation remains intact, but startup does not converge it to the installed core version.

Additional information

The immediate memory footprint is not the 223 KiB ACPX package itself; it is dependency expansion. The current evidence does not establish whether the incompatible optional packages are installed because of npm 11.13.0 behavior with the published shrinkwrap, the nested managed-generation layout, or OpenClaw's install options. That is the first part needing investigation.

The generation design prevents activation of the incomplete ACPX candidate, which is good. The remaining recovery gap is at the transaction level: core replacement had already completed, the updater died before official-plugin convergence/record commit, and startup accepted the old plugin payload as present/smoke-loadable rather than recognizing and repairing the core/plugin channel-version drift.

Activity

  1. Artyomkun commented on Jul 14, 2026

    @Artyomkun

    This is a classic data race between core update and plugin convergence. Core reaches stable, OOM-kill interrupts plugin sync, startup doesn't repair the drift, gateway loops.

    The fix: either make core+plugin update atomic (both succeed or both roll back), or add startup recovery that detects version drift and forces plugin convergence before loading.

    Same root cause as #83337, but with OOM as the trigger. @bjesuiter good catch.

  2. clawsweeper commented on Jul 15, 2026

    @clawsweeper
    Contributor

    Thanks for the context here. I swept through the related work, and this is now duplicate or superseded.

    Close as superseded by the open canonical update-transaction proposal. Current main now performs startup plugin convergence, while the remaining ACPX/OOM and whole-product rollback design is explicitly owned by the canonical issue.

    Root-cause cluster
    Relationship: duplicate
    Canonical: #124396
    Summary: The canonical proposal explicitly includes the ACPX OOM interruption and the remaining whole-product update-recovery work.

    Members:

    Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.

    Canonical path: Keep the current startup recovery and resolve OOM-safe candidate staging, plugin cohort activation, and rollback under #124396.

    So I’m closing this here and keeping the remaining discussion on #124396.

    Review details

    Best possible solution:

    Keep the current startup recovery and resolve OOM-safe candidate staging, plugin cohort activation, and rollback under #124396.

    Do we have a high-confidence way to reproduce the issue?

    No high-confidence live reproduction was established: the reported OOM was observed once and repeating it is destructive; current source proves recovery behavior but not the npm optional-dependency expansion mechanism.

    Is this the best way to solve the issue?

    No—the remaining work is not best solved by another narrow startup-sync patch; the canonical transaction proposal is the safer place to choose candidate validation, rollback, and official-plugin cohort policy.

    Security review:

    Security review: No pull-request patch is under review.

    AGENTS.md: found and applied where relevant.

    What I checked:

    Likely related people:

    • Peter Steinberger: Current-main blame and commit history attribute the startup convergence entry point and its shared recovery integration to this commit. (role: introduced current startup-recovery boundary; confidence: high; commits: 9b43f1c82ebf; files: src/commands/doctor-config-preflight-plugin-verification.ts, src/cli/update-cli/post-core-plugin-convergence.ts, src/commands/doctor/shared/missing-configured-plugin-install.candidates.ts)

    Codex review notes: model internal, reasoning high; reviewed against 627084304a91.

  3. openclaw-barnacle commented on Jul 30, 2026

    @openclaw-barnacle

    This issue has been automatically marked as stale due to inactivity.
    Please add updates or it will be closed.

  4. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:crash-loopCrash, hang, restart loop, or process-level availability failure.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    on Jul 30, 2026
  5. added
    maturity:stableBroken existing behavior primarily owned by an M4/M5 scorecard surface.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    and removed
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    on Aug 1, 2026
  6. 7 remaining items

  7. added
    P2Normal backlog priority with limited blast radius.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    and removed
    P1High-priority user-facing bug, regression, or broken workflow.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    on Aug 14, 2026
  8. self-assigned this
    on Aug 24, 2026
  9. vincentkoc commented on Aug 24, 2026

    @vincentkoc
    Member

    Closing as a duplicate of #124396.

    Thanks @bjesuiter for the concrete production evidence. Current main keeps the narrower startup convergence and exact-version Codex repair from #124209 (3e116952e4b1ba85c11f397f2a435fbc08aebbf8). Provenance correction: 9b43f1c82e is an unrelated UI commit, not the source of that repair.

    The remaining ACPX cross-platform dependency expansion/OOM and interrupted-update rollback contract are not fixed by #124209. #124396 explicitly owns those broader transaction, staging, and rollback decisions.

    Release status as of August 24, 2026: signed tag v2026.8.1-beta.3 contains 3e116952e4, and @openclaw/codex@2026.8.1-beta.3 is published, but there is no GitHub beta.3 release and openclaw@2026.8.1-beta.3 is not published (the core beta dist-tag remains 2026.8.1-beta.2). Current-main/tag inclusion therefore is not yet a published, paired operator fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P2Normal backlog priority with limited blast radius.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.close:duplicateClosed as duplicatededupe:childDuplicate issue/PR child in dedupe clusterimpact:crash-loopCrash, hang, restart loop, or process-level availability failure.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions