Summary
MS Teams delegated OAuth setup currently launches the browser with xdg-open on win32, so the native Windows path does not use the repository's normal Windows browser-open behavior.
Steps to reproduce
- Stub
process.platform to "win32".
- Call
openDelegatedOAuthUrl("https://example.com/oauth") from extensions/msteams/src/setup-surface.ts.
- Observe the spawned command.
Expected behavior
On Windows, delegated OAuth setup should use the same browser-open command family as the shared helper in src/infra/browser-open.ts, which resolves to explorer.exe on win32.
Actual behavior
openDelegatedOAuthUrl() currently selects:
open on macOS
xdg-open on every other platform
That means win32 still tries xdg-open.
OpenClaw version
Observed on main at fbccc18e745e (2026-04-16) before the local fix.
Operating system
Windows 11 (repro validated with a local win32-targeted unit test in a source checkout).
Install method
Source checkout / local test workspace.
Model
N/A (setup-surface issue before model selection).
Provider / routing chain
N/A (delegated OAuth launcher path only).
Logs, screenshots, and evidence
Relevant code paths:
extensions/msteams/src/setup-surface.ts:32-35
src/infra/browser-open.ts:36-39
Local repro evidence:
- A targeted local repro test passed while asserting that
openDelegatedOAuthUrl() calls xdg-open when process.platform === "win32".
- The same repro confirmed the shared browser-open helper still resolves to
explorer.exe on win32.
Impact and severity
- Affected users/systems/channels: native Windows users configuring MS Teams delegated OAuth
- Severity: medium (can block or break browser launch during setup)
- Frequency: deterministic in the validated win32 repro path
- Consequence: delegated OAuth setup uses the wrong launcher on Windows and diverges from the repo's shared browser-open behavior
Additional information
This looks like a narrow cross-platform regression rather than a broader auth or token-handling issue. The smallest fix appears to be adding an explicit win32 -> explorer.exe branch (or reusing a platform-safe shared launcher through an allowed seam).
Summary
MS Teams delegated OAuth setup currently launches the browser with
xdg-openonwin32, so the native Windows path does not use the repository's normal Windows browser-open behavior.Steps to reproduce
process.platformto"win32".openDelegatedOAuthUrl("https://example.com/oauth")fromextensions/msteams/src/setup-surface.ts.Expected behavior
On Windows, delegated OAuth setup should use the same browser-open command family as the shared helper in
src/infra/browser-open.ts, which resolves toexplorer.exeonwin32.Actual behavior
openDelegatedOAuthUrl()currently selects:openon macOSxdg-openon every other platformThat means
win32still triesxdg-open.OpenClaw version
Observed on
mainatfbccc18e745e(2026-04-16) before the local fix.Operating system
Windows 11 (repro validated with a local win32-targeted unit test in a source checkout).
Install method
Source checkout / local test workspace.
Model
N/A (setup-surface issue before model selection).
Provider / routing chain
N/A (delegated OAuth launcher path only).
Logs, screenshots, and evidence
Relevant code paths:
extensions/msteams/src/setup-surface.ts:32-35src/infra/browser-open.ts:36-39Local repro evidence:
openDelegatedOAuthUrl()callsxdg-openwhenprocess.platform === "win32".explorer.exeonwin32.Impact and severity
Additional information
This looks like a narrow cross-platform regression rather than a broader auth or token-handling issue. The smallest fix appears to be adding an explicit
win32 -> explorer.exebranch (or reusing a platform-safe shared launcher through an allowed seam).