openclaw - 💡(How to fix) Fix [Feature]: googlechat — add `dm.threadReplies` config option to control reply threading [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#61435Fetched 2026-04-08 02:58:39
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Author
Participants
Timeline (top)
labeled ×1

Add a dm.threadReplies config option to the Google Chat channel so replies can be sent as top-level messages in the DM space rather than nested thread replies.

Root Cause

This happens because channel.runtime hardcodes thread: payload.replyToId (derived from the inbound message.thread.name) in every reply call — both for the typing indicator message and the actual response. There is no config option to suppress this.

Fix Action

Fix / Workaround

  1. Monkey-patching the OpenClaw source — fragile, breaks on every update, unsupported.
    1. System prompt instruction to never thread — Pixel cannot control the OpenClaw runtime's outbound call; the threading is applied by the gateway layer after the LLM response, not by the agent itself.
    1. Using a separate outbound-only bot — high operational complexity; defeats the purpose of a unified channel config.
    1. Doing nothing / user clicks into thread — UX regression; every DM conversation requires an extra tap to read replies, which is disruptive for a conversational assistant.

Code Example

"googlechat": {
  "replyToMode": "off"
}

---

typingMessageName = (await sendGoogleChatMessage({
  account, space: spaceId,
  text: `_${botName} is typing..._`,
  thread: message.thread?.name   // ← always threaded
}))?.messageName;

---

await sendGoogleChatMessage({
  account, space: spaceId,
  text: chunk,
  thread: payload.replyToId   // ← always threaded
});

---

threadReplies: z.enum(["off", "inbound", "always"]).optional()
RAW_BUFFERClick to expand / collapse

Summary

Add a dm.threadReplies config option to the Google Chat channel so replies can be sent as top-level messages in the DM space rather than nested thread replies.

Problem to solve

When a user sends a DM to a Google Chat app powered by OpenClaw, the bot's reply always appears in a thread under the original message rather than as a top-level message in the DM chat body.

This happens because channel.runtime hardcodes thread: payload.replyToId (derived from the inbound message.thread.name) in every reply call — both for the typing indicator message and the actual response. There is no config option to suppress this.

The result: the user sees their message in the main DM chat, but has to click into a thread to see the bot's reply — a poor UX for a conversational assistant.

Notably, proactive sends (where the bot initiates a message) already work correctly — they appear in the main chat body because no thread param is set. The fix for replies is the same: simply omit thread from the sendGoogleChatMessage call when threading is disabled.

Proposed solution

Add a replyToMode config option to channels.googlechat (matching the Matrix channel's existing threadReplies field):

"googlechat": {
  "replyToMode": "off"
}

Enum values:

  • "off" — never thread replies; all replies go to the main DM chat body
    • "inbound" — thread replies only when the inbound message has a thread (current default behavior)
      • "always" — always thread replies Default: "inbound" (preserves backward compatibility — existing configs without this key behave exactly as they do today)

Implementation: In sendGoogleChatMessage, the thread param is already conditional (if (thread) body.thread = { name: thread }). When replyToMode is "off", simply don't pass the thread argument from payload.replyToId. No changes needed to the send function itself — only the call site in the reply handler.

Alternatives considered

  1. Monkey-patching the OpenClaw source — fragile, breaks on every update, unsupported.
    1. System prompt instruction to never thread — Pixel cannot control the OpenClaw runtime's outbound call; the threading is applied by the gateway layer after the LLM response, not by the agent itself.
    1. Using a separate outbound-only bot — high operational complexity; defeats the purpose of a unified channel config.
    1. Doing nothing / user clicks into thread — UX regression; every DM conversation requires an extra tap to read replies, which is disruptive for a conversational assistant.

Impact

  • Affected: All users running Google Chat apps via OpenClaw in DM mode
    • Severity: Medium — app is functional but UX is degraded; users must click into a thread to read every reply
      • Frequency: Every single DM interaction
        • Consequence: Conversational AI assistants feel unnatural in Google Chat DMs; replies are hidden behind a thread click rather than appearing inline in the conversation

Evidence/examples

Code location: channel.runtime-CBZ9BGA0.js

The typing indicator send (hardcoded thread):

typingMessageName = (await sendGoogleChatMessage({
  account, space: spaceId,
  text: `_${botName} is typing..._`,
  thread: message.thread?.name   // ← always threaded
}))?.messageName;

The reply delivery (hardcoded thread):

await sendGoogleChatMessage({
  account, space: spaceId,
  text: chunk,
  thread: payload.replyToId   // ← always threaded
});

sendGoogleChatMessage already conditionally includes the thread (if (thread) body.thread = { name: thread }), so omitting it when threadReplies: "off" requires no changes to that function.

Precedent: Matrix channel config schema already defines:

threadReplies: z.enum(["off", "inbound", "always"]).optional()

The identical pattern is requested for Google Chat.

Additional information

  • OpenClaw version: 2026.4.2
    • Channel: googlechat (single-account mode)
      • Platform: Windows, running as a local gateway with Cloudflare Tunnel
        • The fix must remain backward-compatible — existing configs without replyToMode should continue to thread replies (current behavior)
          • replyToMode: "off" is the primary use case requested; "first" and "all" variants would align with Matrix parity
            • The typingIndicator field already scopes per-account cleanly; replyToMode should follow the same pattern

extent analysis

TL;DR

To fix the issue of bot replies appearing in a thread under the original message in Google Chat DMs, add a replyToMode config option to the Google Chat channel and set it to "off" to send replies as top-level messages.

Guidance

  • Add a replyToMode config option to the channels.googlechat configuration with possible values "off", "inbound", and "always".
  • Set replyToMode to "off" to prevent threading replies and send them as top-level messages in the DM chat body.
  • Verify that the sendGoogleChatMessage function is called without the thread argument when replyToMode is set to "off".
  • Test the configuration by sending a DM to the Google Chat app and checking if the bot's reply appears as a top-level message.

Example

"googlechat": {
  "replyToMode": "off"
}

This configuration will prevent threading replies and send them as top-level messages in the DM chat body.

Notes

The proposed solution is backward-compatible, and existing configurations without the replyToMode key will continue to thread replies as before.

Recommendation

Apply the workaround by adding the replyToMode config option and setting it to "off", as this will fix the issue without requiring any changes to the sendGoogleChatMessage function.

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