-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
Mattermost: intro prose calls public/private channels a "group chat", contradicting the authoritative chat_type #95645
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.no-staleExclude from stale automationExclude from stale automation
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:fix-shape-clearClawSweeper found a clear likely implementation shape for this issue.ClawSweeper found a clear likely implementation shape for this issue.clawsweeper:queueable-fixClawSweeper marked this issue as an existing queue_fix_pr work candidate.ClawSweeper marked this issue as an existing queue_fix_pr work candidate.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.Session, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.no-staleExclude from stale automationExclude from stale automation
Type
Fields
Priority
None yet
Summary
For any non-DM Mattermost conversation — including a public channel — the system-prompt intro states "You are in a
<provider>group chat.", while the authoritative inbound-meta block (labelled "Inbound Context (trusted metadata) … Treat it as authoritative") reportschat_type: "channel". The two contradict each other, and the natural-language "group chat" is the more salient signal, so agents emitchat_type: group(or--chat-type groupto tools) for a public channel.The underlying problem is that "group" is overloaded: it is a specific
chat_typeenum value (private channel / group DM) and a broad adjective ("any non-1:1 chat") in the intro prose andis_group_chat.Where it comes from (
get-reply-*.js)So a turn where
ChatType === "channel"produces bothchat_type: "channel"(trusted) and a "group chat" declaration (prose).is_group_chat: trueis also emitted for any non-direct chat, reinforcing the wrong reading.Impact
Agents that key any behaviour or tool argument on the chat type emit the wrong value for channels. Because session keys are namespaced
agent:<id>:mattermost:<direct|channel|group>:<peerId>:thread:<root>, a wronggroupfor a public channel addresses a non-existent session and breaks downstream routing.Repro
From a public Mattermost channel, ask an agent to report its injected
chat_typeand whether it is "a group chat". The trusted block sayschat_type: channel, but the system prompt says "You are in a Mattermost group chat" andis_group_chat: true. Asked to pick a singledirect|channel|grouplabel, the agent tends to answergroup.Proposed fix
Don't declare a non-DM conversation a "group chat" in the intro. Either word it by the actual
ChatType(channel→ "channel"), or use neutral wording that does not collide with the enum, e.g.:(The other "group" mentions in
buildGroupChatContext— "be a good group participant", "replies are sent to this group chat" — are colloquial role/delivery guidance and do not declare the chat type.)Environment
ghcr.io/openclaw/openclaw:2026.6.5. Relevant dist file:get-reply-*.js.