Skip to content

[Bug]: Managed Git install loads raw DeepSeek web-search contract under node_modules, breaking Gateway MCP startup #201874

Open

Description

@jacobtomlinson-bot

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

On a managed Git install, a Gateway MCP request tries to load DeepSeek's raw TypeScript web-search contract from under node_modules, where Node rejects type stripping, even though the compiled JavaScript artifact is present.

Steps to reproduce

  1. Run OpenClaw 2026.11.5 (7db69bedeab6) from the managed Git release layout on Node 24.22.1.
  2. In WebChat, start a turn with Fable 5.2 through the native Claude CLI with the bundled OpenClaw MCP bridge.
  3. The turn fails before replying. Retrying starts a fresh process but produces the same Gateway log error.

Expected behavior

The Gateway loads the bundled contract and initializes its loopback MCP server so the CLI receives Gateway tools, as described in the CLI backends documentation.

Actual behavior

Both attempts logged a Node type-stripping error for the source file immediately before the MCP startup failure. The compiled contract exists in the same release. No model-version rejection was observed.

OpenClaw version

2026.11.5 (7db69bedeab6)

Operating system

Ubuntu 24.04.4 LTS, Linux 6.17.0, arm64; Node v24.22.1

Install method

Managed Git development install, running from git-install/releases/<release>/lib/node_modules/openclaw.

Model

claude-fable-5-2 (observed trigger; other callers weren't tested)

Provider / routing chain

WebChat → OpenClaw Gateway → native claude-cli → Claude Code 2.1.322 with OpenClaw's loopback MCP bridge.

Logs

Redacted Gateway excerpts (same errors on retry):

warn mcp-loopback request handling failed: Stripping types is currently unsupported for files under node_modules, for "<state-dir>/git-install/releases/<release>/lib/node_modules/openclaw/extensions/deepseek/web-search-contract-api.ts"
error Embedded agent failed before reply: Claude Code started without the OpenClaw MCP server (status failed). The CLI process was retired; retry the request to start a fresh process.

Screenshots, recordings, and evidence

Both paths exist under the running release root:

  • extensions/deepseek/web-search-contract-api.ts (the path named in the error)
  • dist/extensions/deepseek/web-search-contract-api.js (compiled artifact)

Impact and severity

Blocks the affected WebChat workflow: 2/2 observed attempts failed before a reply on this managed Git installation. Other callers and installations were not tested.

Additional information

Activity

  1. added
    clawsweeper:intake:bug
    P1
    clawsweeper:fix-shape-clear
    clawsweeper:queueable-fix
    clawsweeper:source-repro
    impact:other
    issue-rating: 🦞 diamond lobster
    no-stale
    and removed
    clawsweeper:intake:bug
    on Nov 19, 2026
  2. clawsweeper commented on Nov 19, 2026

    @clawsweeper
    Contributor

    Codex review: this still needs some work.

    Summary
    Keep this issue open: the merged layout fix does not resolve recovery when an older updater builds the candidate beneath node_modules; an open maintainer-authored PR addresses that remaining failure.

    Reproducibility: The reported legacy layout and maintainer upgrade trace match current main's source-first contract selection; no live reproduction or tests were run during this read-only review.

    Next step
    Review #200578 for legacy-updater recovery and confirm the original MCP turn succeeds before closing this issue.

    Review details

    Best possible solution:

    Affected legacy installations should update themselves into the corrected release layout and resume contract-loading Gateway requests without manual checkout rebuilding.

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

    The reported legacy layout and maintainer upgrade trace match current main's source-first contract selection; no live reproduction or tests were run during this read-only review.

    Is this the best way to solve the issue?

    Moving releases outside node_modules repairs newly built layouts, while the open follow-up's compiled-contract selection addresses candidates placed there by older updaters and must preserve ordinary checkout source precedence.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • The original WebChat-to-Claude-CLI turn has no recorded successful confirmation after recovery.
    • The recovery change remains in an open PR and is not established as current-main behavior.

    Codex review notes: model internal, reasoning medium; reviewed against 76cbbdf70d30.

    Label changes

    Label changes:

    • add impact:crash-loop: The maintainer-confirmed configured-provider case fails Gateway startup and repeats the failure during update activation.
    • remove clawsweeper:fix-shape-clear: Current issue advisory state no longer selects this label.
    • remove clawsweeper:queueable-fix: Current issue advisory state no longer selects this label.
    • remove impact:other: Current review impact labels are impact:crash-loop.

    Label justifications:

    • P1: Affected managed Git installations can lose Gateway startup and repeatedly roll back updates, blocking an existing agent workflow.
    • impact:crash-loop: The maintainer-confirmed configured-provider case fails Gateway startup and repeats the failure during update activation.
    Evidence reviewed

    What I checked:

    How this review workflow works
    • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
    • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
    • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
    • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
    • Maintainers can also comment @clawsweeper review to request a fresh review only.
    • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge; those execution lanes are retired.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

    Reviewed November 21, 2026, 2:54 AM ET / 07:54 UTC.

  3. obviyus commented on Nov 19, 2026

    @obviyus
    Collaborator

    Thanks for the precise report. The cause is the Git release layout from #199706.

    Each release lived at git-install/releases/<id>/lib/node_modules/openclaw. The plugin loader forces anything under node_modules/openclaw/ onto Node's native loader. Node refuses to strip types under node_modules, so the bundled web-search-contract-api.ts sources failed to load. The updater missed it because it built and checked each release beside its final path, then moved it under node_modules.

    #201917 moves Git releases to git-install/releases/<id>/openclaw, behind git-install/openclaw, and builds and checks each release at that path.

    This affects dev-channel Git installs on main builds since 2026-11-17 (they report 2026.11.5). The published 2026.11.5 release still updates Git checkouts in place.

    Once #201917 lands, could you confirm it on your install?

    1. Run openclaw update. Your current updater runs this one, so the release still lands under node_modules.
    2. Run openclaw update once more. This one moves the release out.
    3. Start the same WebChat turn with Fable 5.2 through claude-cli.

    realpath ~/.openclaw/git-install/openclaw should show no node_modules, and the Gateway log should have no "Stripping types" line. Please reply with whether the turn now replies.

  4. obviyus commented on Nov 19, 2026

    @obviyus
    Collaborator

    #201917 landed in 2ef6f7b. One correction to my earlier steps, from a real upgrade run that starts at your build 7db69bedeab6:

    • Run both updates from a terminal, with openclaw from your checkout. Do not start them from the Control UI or another Gateway-started update. The old release cannot run its own updater: it fails with the same "Stripping types" error, for scripts/stage-bundled-plugin-runtime.mts.
    • If a web search provider is set in your config, the Gateway on the old layout fails at startup with this error, not only during a turn. The two terminal updates still work while it is down.

    In that run, the first update moved the checkout to the fix. The second, now run by the fix, rebuilt the release at git-install/releases/<id>/openclaw and removed the old link. The Gateway then started and web_search succeeded, with no stripping error in its log.

    Please confirm whether your WebChat turn replies after the two updates.

  5. obviyus commented on Nov 20, 2026

    @obviyus
    Collaborator

    A correction to my earlier steps. An upgrade test that starts from your build (7db69bedeab6), with a web search provider configured, found a case where they do not work.

    That build still runs the update itself, so it builds the fixed version in the old lib/node_modules location. The new Gateway then hits the same "Stripping types" error at startup, and the update rolls back. Running openclaw update again repeats this.

    If that happens to you, update the checkout by hand once, so the fixed updater runs the next update:

    cd <your OpenClaw checkout>
    git pull
    pnpm install
    pnpm build
    node openclaw.mjs update

    The last command now runs the fixed updater. It rebuilds the release at git-install/releases/<id>/openclaw and removes the old git-install/lib/node_modules/openclaw link. Afterwards, realpath ~/.openclaw/git-install/openclaw should show no node_modules.

    Without a web search provider configured, the Gateway starts normally on the old layout, and the earlier two-update steps work.

  6. added
    impact:crash-loop
    and removed
    no-stale
    clawsweeper:fix-shape-clear
    clawsweeper:queueable-fix
    impact:other
    on Nov 21, 2026
  7. added a commit that references this issue on Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1clawsweeper:source-reproimpact:crash-loopissue-rating: 🦞 diamond lobster

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions