openclaw - 💡(How to fix) Fix Mattermost: All inbound messages get System: prefix, Discord doesn't [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#71795Fetched 2026-04-26 05:08:13
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Root Cause

Root Cause (confirmed via trajectory analysis)

Code Example

System: [2026-04-26 05:26:13 GMT+8] Mattermost message in #openclaw from @jeyo: /new

---

System: [2026-04-26 04:47:53 GMT+8] Model override not allowed for this agent; reverted to glm/glm-4.7.
RAW_BUFFERClick to expand / collapse

Bug Description

Every inbound message from Mattermost is wrapped with a System: prefix before being submitted to the model. Discord (same agent, same session, same model) does not have this issue.

Mattermost (broken) — first line of every prompt.submitted:

System: [2026-04-26 05:26:13 GMT+8] Mattermost message in #openclaw from @jeyo: /new

Discord (correct) — no user message wrapping:

System: [2026-04-26 04:47:53 GMT+8] Model override not allowed for this agent; reverted to glm/glm-4.7.

(Only system events appear as System: lines; actual user messages arrive cleanly without the System: prefix)

Root Cause (confirmed via trajectory analysis)

Examining *.trajectory.jsonl entries with type: "prompt.submitted":

  • Mattermost: prompt string starts with System: [timestamp] Mattermost message in #channel from @user: ... — the user's actual message is wrapped inside a system event line
  • Discord: prompt string contains untrusted metadata (sender info, conversation context) but the actual user message content is NOT prefixed with System:

This has been observed across all OpenClaw versions including 2026.4.24. The issue is in the Mattermost channel plugin's inbound processing logic.

Impact

  • All Mattermost user messages are treated as system directives by the model
  • Sender identity and message content are mixed into the system prompt block rather than being presented as a proper user message
  • This corrupts the intended conversation flow

Environment

  • OpenClaw 2026.4.24, macOS (Darwin 25.4.0)
  • Mattermost channel plugin, MiniMax-M2.7 (200k ctx)
  • Both Mattermost and Discord connected to same agent — only Mattermost affected

Expected Behavior

Mattermost messages should be submitted as user-role messages without the System: prefix, consistent with Discord behavior.

extent analysis

TL;DR

The Mattermost channel plugin's inbound processing logic needs to be updated to remove the System: prefix from user messages.

Guidance

  • Investigate the Mattermost channel plugin's code to identify where the System: prefix is being added to user messages.
  • Compare the inbound processing logic of the Mattermost plugin with the Discord plugin to identify differences.
  • Consider modifying the Mattermost plugin to strip the System: prefix from user messages before submitting them to the model.
  • Verify that the modified plugin correctly handles system events and user messages.

Example

No code snippet is provided as the issue does not include specific code details.

Notes

The issue appears to be specific to the Mattermost channel plugin, and the fix may require updating the plugin's code. The Discord plugin's behavior can be used as a reference for the expected behavior.

Recommendation

Apply a workaround by modifying the Mattermost channel plugin to remove the System: prefix from user messages, as this is the most direct way to address the issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix Mattermost: All inbound messages get System: prefix, Discord doesn't [1 participants]