Skip to content

[Bug]: msteams plugin crash-loops due to path-to-regexp v8 incompatibility in @microsoft/teams.apps #55250

@tazmon95

Description

@tazmon95

Bug type

Crash (process/app exits or hangs)

Beta release blocker

No

Summary

The msteams channel plugin crash-loops on startup with Missing parameter name at index 5: /api* because @microsoft/[email protected] uses an unnamed wildcard route pattern that is invalid in path-to-regexp v8.x (shipped with Express 5).

Steps to reproduce

  1. Install OpenClaw 2026.3.24 (which depends on express@^5.2.1 and @microsoft/[email protected])
  2. Configure the msteams channel with valid credentials
  3. Start the gateway (openclaw gateway start)
  4. Observe the msteams plugin crash-loop in gateway logs

Expected behavior

The msteams plugin starts successfully and listens on the configured webhook port.

Actual behavior

The plugin crashes immediately on startup. It retries 10 times with exponential backoff, then the health-monitor restarts the cycle. Teams is completely unreachable. Gateway logs show:

[msteams] [default] channel exited: Missing parameter name at index 5: /api*; visit https://git.new/pathToRegexpError for info
[msteams] [default] auto-restart attempt 1/10 in 5s

OpenClaw version

2026.3.24

Operating system

Linux 6.8.12-15-pve (x64) — Proxmox LXC, Ubuntu

Install method

npm global

Model

anthropic/claude-opus-4-6

Provider / routing chain

openclaw -> anthropic (not relevant to this bug — the crash occurs before any model interaction)

Additional provider/model setup details

N/A — this is a channel startup crash, not a model/provider issue.

Logs, screenshots, and evidence

Mar 26 07:58:36 fitzy node[26024]: 2026-03-26T07:58:36.008-07:00 [msteams] starting provider (port 3978)
Mar 26 07:58:36 fitzy node[26024]: 2026-03-26T07:58:36.011-07:00 [msteams] [default] channel exited: Missing parameter name at index 5: /api*; visit https://git.new/pathToRegexpError for info
Mar 26 07:58:36 fitzy node[26024]: 2026-03-26T07:58:36.011-07:00 [msteams] [default] auto-restart attempt 2/10 in 11s

Root cause traced to node_modules/@microsoft/teams.apps/dist/plugins/http/plugin.js:99:

this.express.use('/api*', express_1.default.json());

path-to-regexp v8 (used by Express 5) removed unnamed wildcards. The fix is '/api{*path}'.

Impact and severity

Affected: All msteams channel users on OpenClaw 2026.3.24+
Severity: Critical (entire Teams channel is non-functional)
Frequency: 100% — every startup attempt
Consequence: No messages can be received or sent via Microsoft Teams

Additional information

The incompatible pattern originates in @microsoft/[email protected] (Microsoft Teams SDK), not OpenClaw source code. A pnpm patch is the cleanest fix until Microsoft publishes an updated SDK. PR submitted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions