Skip to content

Teams extension deps wiped on every global npm update — @microsoft/agents-hosting not in top-level package.json #15622

@BradGroux

Description

@BradGroux

Bug Description

The msteams extension declares @microsoft/agents-hosting (and related packages) as dependencies in extensions/msteams/package.json, but these are not listed in the top-level package.json.

This means every npm update -g openclaw@latest or npm install -g openclaw replaces the entire node_modules tree and removes the Teams extension dependencies as "extraneous." The Teams channel then fails to start:

Cannot find module '@microsoft/agents-hosting'
Require stack:
- /Users/.../.npm-global/lib/node_modules/openclaw/extensions/msteams/src/sdk.ts

Impact

  • Teams channel silently dies after any global npm operation
  • Users must manually run cd <openclaw-install> && npm install @microsoft/agents-hosting after every update
  • No error surfaced at update time — the failure only appears when Teams tries to send/receive

Reproduction

  1. Install openclaw globally: npm install -g openclaw@latest
  2. Configure the msteams channel and verify it works
  3. Manually install Teams deps: cd $(npm root -g)/openclaw && npm install @microsoft/agents-hosting
  4. Verify Teams works
  5. Run npm update -g openclaw@latest (or let the built-in auto-updater do it)
  6. Teams channel fails with Cannot find module '@microsoft/agents-hosting'

Root Cause

extensions/msteams/package.json declares the dependency, but the top-level package.json does not. npm only installs/preserves dependencies listed in the root package.json during global installs.

Current Workaround

Post-update hook that reinstalls the Teams deps:

cd $(npm root -g)/openclaw && npm install @microsoft/agents-hosting

Expected Behavior

Extension dependencies should either:

  1. Be declared in the top-level package.json, or
  2. Be installed via a post-install script, or
  3. Be bundled into the extension dist

Environment

  • OpenClaw version: 2026.2.12
  • Node: v23.11.0
  • npm: 10.9.2
  • OS: macOS (arm64)
  • Install method: npm install -g openclaw

Frequency

This has caused outages on three separate occasions (Feb 4, Feb 12, Feb 13, 2026) before we traced it to the npm update cycle.

Metadata

Metadata

Assignees

Labels

staleMarked as stale due to inactivity

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions