Skip to content

Google Chat: add option to disable automatic threading on replies #52475

Description

@svmark

Problem

Since v2026.3.7, all Google Chat agent replies are sent as threaded replies. The monitor (extensions/googlechat/src/monitor.ts) unconditionally copies message.thread?.name from every inbound webhook payload into ReplyToId / ReplyToIdFull, and passes it to the typing indicator. On every outbound message, this value is re-attached as the thread field in the Google Chat API request body — causing all agent replies to land inside a thread.

The existing replyToMode: "off" config only controls the agent's tool-based threading (whether the agent can explicitly target a thread via tools), not the monitor's automatic threading behavior.

Expected behavior

There should be a config option to send replies as top-level messages with no threading. For example:

{
  "channels": {
    "googlechat": {
      "disableThreading": true
    }
  }
}

Current workaround

Manually patching monitor.ts in the installed package to hardcode const disableThreading = true and conditionally suppress ReplyToId, ReplyToIdFull, and the typing indicator's thread field. This patch is lost on every upgrade.

Locations that need the change

In extensions/googlechat/src/monitor.ts:

  1. ReplyToId / ReplyToIdFull in finalizeInboundContext() — currently set to message.thread?.name
  2. Typing indicator sendGoogleChatMessage({ thread: message.thread?.name }) — always threads the "is typing..." message
  3. deliverGoogleChatReply — passes payload.replyToId (sourced from the above) as thread to sendGoogleChatMessage at two call sites (text chunks and media attachments)

Suggested implementation

Read a new disableThreading boolean from the googlechat channel config (default false to preserve existing behavior). When true, set ReplyToId / ReplyToIdFull to undefined and omit the thread argument from the typing indicator call.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions