#13285: feat(pairing): add pairingAnonymous option to hide platform branding
agents
size: XS
Cluster:
Messaging Platform Improvements
## Summary
When `pairingAnonymous: true` is set in channel config, pairing replies sent to unauthorized DM users omit the "OpenClaw" platform name and CLI commands. Bot operators can keep their platform choice private.
**Before** (default, unchanged):
```
OpenClaw: access not configured.
Your Telegram user id: 121243274
Pairing code: U8Q5UCYJ
Ask the bot owner to approve with:
openclaw pairing approve telegram <code>
```
**After** (`pairingAnonymous: true`):
```
Access not configured.
Your Telegram user id: 121243274
Pairing code: U8Q5UCYJ
Share this code with the bot administrator to get access.
```
### Changes
- `buildPairingReply()`: add `anonymous` param for generic message variant (no "OpenClaw", no CLI)
- `TelegramAccountConfig`: add `pairingAnonymous?: boolean` + Zod schema entry
- `bot-message-context.ts`: refactor inline Telegram pairing message to use shared `buildPairingReply` (eliminates code duplication between Telegram and other channels)
### Config
```jsonc
// channels.telegram (top-level or per-account)
{
"dmPolicy": "pairing",
"pairingAnonymous": true
}
```
Default: `false` — current behavior preserved.
## Test plan
- [x] 7 tests pass (5 existing + 2 new: anonymous mode, branded mode)
- [x] Build passes
- [ ] CI
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR adds a `pairingAnonymous` Telegram config option to emit a generic pairing DM reply (no platform branding / CLI command), refactors Telegram pairing replies to use the shared `buildPairingReply()` helper, and introduces additional embedded-runner compaction controls (timeout + optional compaction model override) with accompanying tests.
The changes touch Telegram’s inbound DM pairing flow (`src/telegram/bot-message-context.ts`), config typing + Zod schemas for Telegram and agent defaults, and compaction behavior in the embedded runner (timeout handling, model override, and reasoning disabling).
<h3>Confidence Score: 3/5</h3>
- This PR has a couple of correctness issues that should be fixed before merging.
- Main risk is configuration resolution and model-shape correctness: Telegram pairing reads `pairingAnonymous` only from the global telegram config (ignoring per-account overrides), and compaction mutates the model `reasoning` field in a way that may not match provider expectations if it’s not a boolean. The rest of the changes look localized and are covered by tests.
- src/telegram/bot-message-context.ts, src/agents/pi-embedded-runner/compact.ts
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
---
## Validation
- [x] `pnpm build` — passes
- [x] `pnpm check` — passes
- [x] `pnpm test` — 7 tests pass (5 existing + 2 new)
## Contribution checklist
- [x] **Focused scope**: Add pairingAnonymous config option for privacy
- [x] **What + why**: described above
- [x] **AI-assisted**: Yes, Claude Code was used for implementation. Testing level: fully tested (7 tests)
Most Similar PRs
#7911: Unapproved users receive pairing codes on every /start message befo...
by crazypeace · 2026-02-03
80.1%
#8985: fix(telegram): preserve forum topic context for pairing auto-replies
by lailoo · 2026-02-04
78.6%
#17882: fix: drop WhatsApp pairing reply for unconfigured accounts
by adit-negi · 2026-02-16
77.6%
#6265: feat(whatsapp): add pairing owner notification
by zote · 2026-02-01
75.0%
#11249: fix(whatsapp): prevent pairing-mode auto-replies to unknown DMs
by liuxiaopai-ai · 2026-02-07
74.8%
#12936: fix(telegram): omit message_thread_id for private DM chats
by omair445 · 2026-02-09
74.0%
#13696: feat(cli): add --code option for WhatsApp pairing code login
by asklee-klawd · 2026-02-10
74.0%
#8653: Docs: clarify DM pairing approve command
by adityasingh2400 · 2026-02-04
73.5%
#21029: Feature/telegram bot avatar clean
by aleonnet · 2026-02-19
73.4%
#8310: feat(telegram): Add allowBots support for groups (parity with Disco...
by vishaltandale00 · 2026-02-03
72.4%