Skip to content

[core/runtime] Backward-compat shim missing: core.channel.turn.* renamed to core.channel.inbound.* on 2026-06-03 #91122

Closed

Description

@ckai49500-source

Issue: Backward-compat shim missing after core.channel.turn.run 鈫?core.channel.inbound.run rename

Affected versions:

  • openclaw core: 2026.5.22 (a374c3a) 鈥?renamed turn 鈫?inbound on 2026-06-03
  • @openclaw/feishu: 2026.5.28 (released 2026-05-30) 鈥?still calls core.channel.turn.run()
  • @openclaw/feishu: 2026.6.1 (released 2026-06-03 19:21 UTC) 鈥?migrated to core.channel.inbound.run() 鉁?fixed

Environment: Windows 11, Node v24.14.0, OpenClaw Gateway (port 18789), feishu DM channel.

Symptom

openclaw status --deep shows:

feishu  channel   ON  SETUP  configured

(last field SETUP 鈥?stuck, never advances to OK)

openclaw logs show, repeating on every DM event:

TypeError: Cannot read properties of undefined (reading 'run')
    at Object.run (monitor.account-CmXHWuwG.js:2738)   // catch
    at runChannelInbound (monitor.account-CmXHWuwG.js:2678)   // throw

Root cause

The 2026-06-03 OpenClaw core release renamed and moved the public core.channel API:

Before (鈮?2026-05-22) After (鈮?2026-06-03)
core.channel.turn.run() core.channel.inbound.run()
core.channel.turn.buildContext() core.channel.inbound.buildContext()
core.channel.turn.runPreparedReply() core.channel.inbound.runPreparedReply()
core.channel.turn.dispatchReply() core.channel.inbound.dispatchReply()

Source: dist/runtime-channel-DSbqIqfK.js exposes the new inbound key but removed the turn key. Source: dist/kernel-CYjskkiY.js line 813 鈫?977 鈥?runChannelTurn was renamed to runChannelInboundEvent.

Plugins compiled against 鈮?2026-05-22 (e.g. @openclaw/feishu@2026.5.28) still call core.channel.turn.run(), which now resolves to undefined.run 鈫?TypeError.

Why this matters

  • This is a silent breaking change for any third-party channel plugin pinned to the old core.channel.turn.* API.
  • feishu@2026.5.28 (the version most users will have) is broken on a fresh install of openclaw@2026.5.22+.
  • There is no deprecation warning, no migration guide, and no compatibility shim.
  • The P0 patch (see below) is required for anyone running openclaw@2026.5.22+ with feishu@2026.5.28 or any other plugin still on the old API.

Reproduction

# 1. Install openclaw 2026.5.22 (or any 2026.6.x)
npm install -g openclaw@2026.5.22

# 2. Install feishu plugin (pinned to 2026.5.28)
npm install -g @openclaw/feishu@2026.5.28

# 3. Configure feishu via openclaw config set
openclaw config set channels.feishu.<account>.appId ...
openclaw config set channels.feishu.<account>.appSecret ...

# 4. Start gateway
openclaw gateway

# 5. Check status
openclaw status --deep
#   feishu  channel   ON  SETUP  configured    <-- stuck

# 6. Send a DM to your bot
# 7. Tail logs
openclaw logs
#   TypeError: Cannot read properties of undefined (reading 'run')
#       at runChannelInbound (monitor.account-CmXHWuwG.js:2678)

Proposed fix: add a turn alias to createRuntimeChannel()

This is a 0-risk backward-compat shim. It re-exports the same four functions under the old name. It's idempotent, and once all plugins migrate to inbound, the alias can be removed in a future major version with a deprecation notice.

// P0 patch: backward-compat alias for plugins calling core.channel.turn.run
// (new name is core.channel.inbound.run 鈥?see runChannelInboundEvent)
turn: {
    buildContext: buildChannelInboundEventContext,
    run: runChannelInboundEvent,
    runPreparedReply: runPreparedInboundReply,
    dispatchReply: dispatchChannelInboundReply
},

The shim is already in our patches/openclaw+runtime-channel-turn-alias+2026-06-07.patch file. The patch is verified by git apply --check and git apply (6840B byte-identical to the live file).

Alternative fix considered

Updating all 4 core.channel.turn.run call sites in @openclaw/feishu's monitor.account-*.js to core.channel.inbound.run 鈥?this is what feishu@2026.6.1 did (it was the original fix path). However, this only fixes feishu; other plugins on the old API would still break.

A core-level shim is the correct long-term fix.

Workaround until the fix lands

For users on openclaw@2026.5.22+ + feishu@2026.5.28 (or any old-API plugin), apply this patch via OpenClaw's built-in patches/ mechanism:

  1. Save the patch from this issue to ~/AppData/Roaming/npm/node_modules/openclaw/patches/openclaw+runtime-channel-turn-alias+2026-06-07.patch
  2. npm install -g openclaw (the postinstall hook auto-replays all patches/*.patch)

We have validated this with git apply --check + git apply (returns 6840B identical to the live file).

PR

I'd be happy to submit a PR. The PR would add the 4-line turn block shown above to dist/runtime-channel-DSbqIqfK.js in createRuntimeChannel()'s return object (placed right after the existing inbound key).

Suggested PR title: feat(core): add backward-compat turnalias oncore.channel for plugins on the legacy API

Suggested label: bug, core:runtime, breaking-change-revert, help wanted


cc: channel plugin maintainers 鈥?please migrate your call sites to core.channel.inbound.run when convenient. The turn alias will be kept for at least one major release cycle.

Activity

  1. clawsweeper commented on Jun 7, 2026

    @clawsweeper
    Contributor

    Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed August 30, 2026, 3:47 PM ET / 19:47 UTC.

    Summary
    Keep open: current main deliberately exposes only channel.inbound, while the linked PR is an unmerged, conflict-marked candidate. Whether an older released plugin runtime API warrants a deprecated compatibility alias is a maintainer product-contract decision.

    Reproducibility: no. current source proves that the old member is absent, but this read-only review could not run the historical published-plugin pairing or establish its release contract from local history.

    Root-cause cluster
    Relationship: canonical
    Canonical: #91122
    Summary: This issue is the canonical product-contract discussion; the linked PR is a candidate implementation, not a completed fix.

    Members:

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

    Ways to help us reproduce this

    • Add a screenshot or short recording showing the behavior.
    • Add expected vs actual behavior.
    • Include redacted logs or terminal output.

    Maintainer decision needed

    Question Recommendation
    Should OpenClaw support plugins built against the removed runtime.channel.turn.* surface for a defined deprecation window? Restore a bounded alias: Reintroduce turn as the same runtime object as inbound, document a deprecation/removal window, and prove an archived old-plugin receive path.

    Why: Current documentation deliberately removes the namespace, while the existing lower-bound compatibility metadata does not prevent an older plugin from loading on a newer host. Choosing an alias versus fail-fast upgrade behavior defines the public plugin contract.

    Next step
    The linked PR already owns the proposed code change, but maintainer direction is required before treating a legacy alias as supported API.

    Review details

    Best possible solution:

    Make an explicit plugin-SDK compatibility decision: if older stable plugins are supported, restore one shared deprecated alias with a bounded removal policy and archived-plugin regression proof; otherwise reject or diagnose the incompatible plugin before it handles a message.

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

    No: current source proves that the old member is absent, but this read-only review could not run the historical published-plugin pairing or establish its release contract from local history.

    Is this the best way to solve the issue?

    Unclear: a same-object alias avoids divergent runtime behavior, but the current docs intentionally removed the name, so maintainers must first decide whether this legacy plugin API remains supported.

    AGENTS.md: found and applied where relevant.

    Remaining risk / open question:

    • Without either a compatibility alias or an admission-time diagnostic, an installed plugin whose lower-bound API range accepts a newer host can reach an inbound event before discovering that the removed member is unavailable.
    • The linked PR is unmerged and conflict-marked, so it cannot yet establish a resolved supported contract.

    Codex review notes: model internal, reasoning high; reviewed against 16421ec0b0b3.

    Label changes

    Label justifications:

    • P1: The reported compatibility failure prevents replies to inbound channel messages for affected installed plugins.
    • impact:message-loss: The described runtime dereference suppresses normal responses after an inbound event is received.
    Evidence reviewed

    What I checked:

    Likely related people:

    • Peter Lee: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
    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.
    • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
    • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.
  2. added
    P1High-priority user-facing bug, regression, or broken workflow.
    impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.
    issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.
    clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.
    clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.
    clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.
    clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    and removed
    clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.
    clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.
    on Jun 19, 2026
  3. 20 remaining items

  4. added
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    and removed
    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.
    issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.
    clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.
    issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.
    on Aug 29, 2026
  5. openclaw-barnacle commented on Sep 14, 2026

    @openclaw-barnacle

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

  6. added a commit that references this issue on Sep 17, 2026
    29e455f
  7. added a commit that references this issue on Sep 17, 2026
    c147150
  8. added a commit that references this issue on Sep 17, 2026
    29a94e5
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

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request 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.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.issue-rating: 🦪 silver shellfishThin issue quality; more reproduction proof or environment detail is needed.staleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions