#20047: fix(googlechat): typing indicator shows 'OpenClaw' instead of agent identity.name
channel: googlechat
channel: matrix
size: XS
trusted-contributor
Cluster:
WhatsApp and Google Chat Fixes
## Problem
The Google Chat typing indicator always shows "OpenClaw is typing..." even when the agent has `identity.name` configured. This is because `resolveBotDisplayName()` checks `agent.name` but skips `agent.identity.name` — the standard way users configure their agent's display name.
## Root Cause
`resolveBotDisplayName()` fallback chain was:
1. Account config name
2. `agent.name`
3. `"OpenClaw"`
Missing: `agent.identity.name` (from `agents.list[].identity.name`)
## Fix
Insert `identity.name` as step 2 in the fallback chain, before `agent.name`:
1. Account config name
2. **`agent.identity.name`** ← added
3. `agent.name`
4. `"OpenClaw"`
## Changes
| File | Change |
|------|--------|
| `extensions/googlechat/src/monitor.ts` | Check `identity.name` before `name` in `resolveBotDisplayName()` |
Closes #18580
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR contains two fixes:
1. **Google Chat typing indicator fix**: Adds `agent.identity.name` to the `resolveBotDisplayName()` fallback chain so the typing indicator respects the agent's configured identity name instead of always showing "OpenClaw is typing...". The fallback chain is now: account config name → `identity.name` → `agent.name` → "OpenClaw".
2. **Matrix message drop fix**: Changes `startupGraceMs` from `0` to `30_000` (30 seconds) to prevent silent message drops when the Matrix homeserver clock is behind the gateway. Also adds verbose logging for dropped pre-startup and old events to aid debugging.
- Both fixes are minimal, well-scoped, and follow existing codebase patterns.
- The `identity.name` access pattern matches usage across the rest of the codebase (`src/infra/outbound/identity.ts`, `src/channels/plugins/outbound/slack.ts`, etc.).
- The 30s grace period is conservative relative to the gateway health monitor's 60s default.
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge — the changes are minimal, well-scoped bug fixes with no architectural risk.
- Both changes are small, targeted fixes. The googlechat change adds one additional fallback check using a well-established pattern. The matrix change adjusts a timing constant to a reasonable value and adds diagnostic logging. No new dependencies, no behavioral regressions, and the changes are consistent with existing codebase patterns.
- No files require special attention.
<sub>Last reviewed commit: f88ada1</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#13829: fix(googlechat): detect bot @mentions via user.type when botUser no...
by mcaxtr · 2026-02-11
76.6%
#21147: feat(slack): support chat:write.customize for custom bot name/avatar
by bernardclaw · 2026-02-19
76.3%
#20554: fix(googlechat): prevent infinite restart loop in startAccount
by Gitjay11 · 2026-02-19
76.1%
#3837: fix(googlechat): space events response and thread reply context
by rehanchrl · 2026-01-29
76.1%
#19043: googlechat: fix runtime.error signature in startup error handling
by markesphere · 2026-02-17
75.7%
#15792: fix: pass agentId to resolveSessionFilePath in additional call sites
by MisterGuy420 · 2026-02-13
75.2%
#14309: fix(ui): resolve chat event session key mismatch
by justonlyforyou · 2026-02-11
75.1%
#22611: fix(discord): allow messages from other instance bots in multi-acco...
by dae-sun · 2026-02-21
75.1%
#15852: fix: pass agentId when resolving IRC session paths
by MisterGuy420 · 2026-02-14
74.9%
#22977: fix(ui): resolve agent names from config in session dropdown
by NikhilGaddam · 2026-02-21
74.7%