Bug type
Behavior bug (incorrect output/state without crash)
Summary
Description:
Bug Report — MS Teams File Upload via CLI
Channel: Microsoft Teams (msteams)
Summary
When using openclaw message send --channel msteams --media to send a file in a Teams personal (1:1) chat, Teams correctly shows the FileConsentCard asking the user to Allow/Decline. However, when the user clicks Allow, the bot responds with:
"This card action is not supported by "
And the file is never uploaded.
Steps to reproduce
Configure OpenClaw with
MS Teams channel 2. Run:
openclaw message send --channel msteams --target "user:" --message "Here is your file" --media /path/to/file.zip
Teams shows FileConsentCard to the user ✅
User clicks Allow ❌
Bot responds: "This card action is not supported"
Expected behavior
After user clicks Allow:
Bot receives fileConsent/invoke callback
File is uploaded to the OneDrive URL provided by Teams
FileInfoCard is sent confirming successful upload
User receives the file ✅
Actual behavior
Bot fails to handle the fileConsent/invoke callback. The file was never stored in pendingUploads (via storePendingUpload()) before the FileConsentCard was sent, so when the callback arrives, getPendingUpload(uploadId) returns undefined and the
upload fails silently — resulting in the "card action not supported" error shown to the user.
Root Cause (Analysis)
The fileConsent/invoke handler in monitor-handler.ts correctly calls getPendingUpload(uploadId) — but the openclaw message send --media CLI path never calls storePendingUpload() before sending the FileConsentCard. This means the in-memory pending upload store is empty when the callback arrives.
Fix needed: The outbound --media send path for Teams should:
Call storePendingUpload() with the file buffer before sending the FileConsentCard
Include the returned uploadId in the card's acceptContext / declineContext
Environment
Node: v22.22.0
OpenClaw: 2026.3.13 (61d171a)
Channel: msteams
Chat type: Personal (1:1 DM)
File size: 750 KB (< 4MB)
Additional Notes
The fileConsent/invoke handler code in monitor-handler.ts is correctly implemented ✅
The file-consent.ts utilities (buildFileConsentCard, uploadToConsentUrl) look correct ✅
The bug is specifically in the CLI outbound send path not wiring up storePendingUpload() ❌
Permissions confirmed working: Chat.ReadWrite.All, Files.ReadWrite.All, Group.Read.All
OpenClaw version
OpenClaw 2026.3.13 (61d171a)
Operating system
OS: Linux 6.8.0-106-generic (x64)
Install method
npm global
Model
anthropic-sonnet 4.6
Provider / routing chain
openclaw
Config file / key location
openclaw.json
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response
Bug type
Behavior bug (incorrect output/state without crash)
Summary
Description:
Bug Report — MS Teams File Upload via CLI
Channel: Microsoft Teams (msteams)
Summary
When using openclaw message send --channel msteams --media to send a file in a Teams personal (1:1) chat, Teams correctly shows the FileConsentCard asking the user to Allow/Decline. However, when the user clicks Allow, the bot responds with:
"This card action is not supported by "
And the file is never uploaded.
Steps to reproduce
Configure OpenClaw with
MS Teams channel 2. Run:
openclaw message send --channel msteams --target "user:" --message "Here is your file" --media /path/to/file.zip
Teams shows FileConsentCard to the user ✅
User clicks Allow ❌
Bot responds: "This card action is not supported"
Expected behavior
After user clicks Allow:
Bot receives fileConsent/invoke callback
File is uploaded to the OneDrive URL provided by Teams
FileInfoCard is sent confirming successful upload
User receives the file ✅
Actual behavior
Bot fails to handle the fileConsent/invoke callback. The file was never stored in pendingUploads (via storePendingUpload()) before the FileConsentCard was sent, so when the callback arrives, getPendingUpload(uploadId) returns undefined and the
upload fails silently — resulting in the "card action not supported" error shown to the user.
Root Cause (Analysis)
The fileConsent/invoke handler in monitor-handler.ts correctly calls getPendingUpload(uploadId) — but the openclaw message send --media CLI path never calls storePendingUpload() before sending the FileConsentCard. This means the in-memory pending upload store is empty when the callback arrives.
Fix needed: The outbound --media send path for Teams should:
Call storePendingUpload() with the file buffer before sending the FileConsentCard
Include the returned uploadId in the card's acceptContext / declineContext
Environment
Node: v22.22.0
OpenClaw: 2026.3.13 (61d171a)
Channel: msteams
Chat type: Personal (1:1 DM)
File size: 750 KB (< 4MB)
Additional Notes
The fileConsent/invoke handler code in monitor-handler.ts is correctly implemented ✅
The file-consent.ts utilities (buildFileConsentCard, uploadToConsentUrl) look correct ✅
The bug is specifically in the CLI outbound send path not wiring up storePendingUpload() ❌
Permissions confirmed working: Chat.ReadWrite.All, Files.ReadWrite.All, Group.Read.All
OpenClaw version
OpenClaw 2026.3.13 (61d171a)
Operating system
OS: Linux 6.8.0-106-generic (x64)
Install method
npm global
Model
anthropic-sonnet 4.6
Provider / routing chain
openclaw
Config file / key location
openclaw.json
Additional provider/model setup details
No response
Logs, screenshots, and evidence
Impact and severity
No response
Additional information
No response