openclaw - ✅(Solved) Fix feat(bluebubbles): per-DM systemPrompt — follow-up to #60665 (#69198 only addressed groups) [1 pull requests, 1 comments, 2 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#77009Fetched 2026-05-04 04:59:29
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Timeline (top)
commented ×1cross-referenced ×1

Fix Action

Fix / Workaround

  • Original feature request: #60665 (closed by partial fix in #69198)
  • Merged PR: #69198 — added groups-only systemPrompt
  • Telegram/WhatsApp precedent: direct.<id>.systemPrompt already implemented and documented
  • QQBot precedent: accounts.<acct>.systemPrompt already implemented
  • Docs claiming a workaround that doesn't exist: docs/channels/bluebubbles.md "DMs ignore this field..." paragraph (added in #69198)

PR fix notes

PR #77086: feat(bluebubbles): add per-DM systemPrompt via direct.<handle>.systemPrompt config

Description (problem / solution / changelog)

Summary

  • Adds direct.<handle>.systemPrompt and direct."*".systemPrompt config for BlueBubbles DMs, mirroring the existing groups.<id>.systemPrompt pattern
  • Telegram and WhatsApp both support per-DM system prompts; BlueBubbles was asymmetric (#60665/#69198 added per-group only)
  • Exact sender handle takes precedence over "*" wildcard, same logic as group config
  • Group messages are unaffected when only direct config is set

Commits

  1. feat(bluebubbles): add per-DM systemPrompt config schemabluebubblesDmConfigSchema + direct field in account schema and TypeScript type
  2. feat(bluebubbles): resolve per-DM systemPrompt from direct config — wire into monitor-processing.ts context builder
  3. feat(bluebubbles): add ui-hint and regression tests for per-DM systemPrompt — 4 new tests + ui-hint entry
  4. chore: add CHANGELOG entry for per-DM systemPrompt (#77009)

Test plan

  • pnpm exec vitest run extensions/bluebubbles/src/monitor.test.ts — 89/89 pass
  • pnpm exec vitest run extensions/bluebubbles/ — 589/589 pass
  • pnpm exec oxlint on all changed files — 0 warnings/errors
  • pnpm exec oxfmt — formatted

New regression tests:

  • exact handle match sets GroupSystemPrompt
  • "*" wildcard fallback sets GroupSystemPrompt
  • exact handle beats wildcard
  • group messages unaffected by direct config

Fixes #77009.

🤖 Generated with Claude Code

Changed files

  • CHANGELOG.md (modified, +1/-0)
  • extensions/bluebubbles/src/config-schema.ts (modified, +11/-0)
  • extensions/bluebubbles/src/config-ui-hints.ts (modified, +4/-0)
  • extensions/bluebubbles/src/monitor-processing.ts (modified, +6/-3)
  • extensions/bluebubbles/src/monitor.test.ts (modified, +88/-1)
  • extensions/bluebubbles/src/types.ts (modified, +10/-0)
RAW_BUFFERClick to expand / collapse

TL;DR

Follow-up to #60665 (closed by #69198): the merged PR added per-group systemPrompt for BlueBubbles, but the original ask explicitly requested "channel root, per-group, or per-DM" support. The DM case was silently dropped. This leaves BB asymmetric with Telegram and WhatsApp — both of which support direct.<id>.systemPrompt — and means BB DM users (the most common iMessage shape) cannot inject channel-aware behavioral instructions through config.

Current state (v2026.5.2)

Schema parity across plugins, verified from bundled-channel-config-metadata.generated.ts:

Channelroot.systemPromptaccounts.*.systemPromptgroups.*.systemPromptdirect.*.systemPrompt
bluebubbles
telegram
whatsapp
feishu
qqbot

BB has no direct, dms, conversations, or chats config bucket at all — there's no place in the BB schema to attach per-DM behavioral config of any kind.

Why "use agent-level prompt customization instead" doesn't work

The merged PR's docs recommend agent-level customization for DMs:

"DMs ignore this field; use agent-level or account-level prompt customization instead."

Two problems:

  1. Account-level doesn't exist either. channels.bluebubbles.accounts.<acct> has no systemPrompt field. The recommendation references config that isn't there.
  2. Agent-level isn't channel-scoped. agents.defaults.systemPromptOverride and agents.list[].systemPromptOverride are global to the agent. Setting iMessage-style brevity rules at the agent level forces them on Slack, Discord, and every other channel the same agent serves.

So in practice, the only ways to inject per-DM BB behavior today are:

  • Workspace-side soft prompts (rely on the model to remember to load a DNA file based on channel context — fragile)
  • Hook-side message rewriting (requires custom code, defeats the purpose of having systemPrompt config)
  • Spawning a dedicated agent per channel via bindings[] (heavy)

None of these are what the original feature request was meant to enable.

Proposed solution

Add one (or both) of:

A. channels.bluebubbles.direct.<chatGuid>.systemPrompt with "*" wildcard fallback, mirroring the existing Telegram and WhatsApp direct.<id>.systemPrompt pattern. This is the most direct symmetry fix and reuses the existing chatGuid/chatIdentifier/numeric-chatId matching strategy that's already implemented for groups in #69198.

B. channels.bluebubbles.accounts.<acct>.systemPrompt for an account-wide prompt that applies to every conversation (DM or group) on that account, matching the qqbot pattern. This would also make the merged PR's docs recommendation accurate.

Option A alone closes the gap symmetrically with Telegram/WhatsApp. Option B is a nice complement for users who want a single account-wide prompt without per-conversation tuning. Implementing both gives the same flexibility users already have on the most-similar channels.

References

  • Original feature request: #60665 (closed by partial fix in #69198)
  • Merged PR: #69198 — added groups-only systemPrompt
  • Telegram/WhatsApp precedent: direct.<id>.systemPrompt already implemented and documented
  • QQBot precedent: accounts.<acct>.systemPrompt already implemented
  • Docs claiming a workaround that doesn't exist: docs/channels/bluebubbles.md "DMs ignore this field..." paragraph (added in #69198)

extent analysis

TL;DR

Add channels.bluebubbles.direct.<chatGuid>.systemPrompt to support per-DM system prompts for BlueBubbles, mirroring the existing pattern in Telegram and WhatsApp.

Guidance

  • Review the proposed solutions (A and B) to determine the best approach for adding per-DM system prompt support.
  • Consider implementing both channels.bluebubbles.direct.<chatGuid>.systemPrompt and channels.bluebubbles.accounts.<acct>.systemPrompt to provide flexibility for users.
  • Update the documentation to reflect the new configuration options and remove the inaccurate workaround recommendation.
  • Test the new configuration options to ensure they work as expected and provide the desired functionality.

Example

No code snippet is provided as the issue is focused on configuration and schema changes.

Notes

The solution requires updating the BlueBubbles schema to include the new configuration options. This may involve modifying the bundled-channel-config-metadata.generated.ts file and updating the documentation.

Recommendation

Apply workaround by implementing option A, channels.bluebubbles.direct.<chatGuid>.systemPrompt, to provide per-DM system prompt support and achieve symmetry with Telegram and WhatsApp. This solution directly addresses the missing functionality and provides a clear path forward.

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