#23030: fix(subagents): restore isInternalMessageChannel guard in resolveAnnounceOrigin
agents
size: XS
experienced-contributor
Cluster:
Agent Messaging Enhancements
## Summary
Restores the narrower `isInternalMessageChannel()` guard from PR #22223 (fe57bea08) that was inadvertently reverted by f555835b0.
The original `!isDeliverableMessageChannel()` check strips the requester channel from the announce origin whenever the channel is not in the registered deliverable set. This is overly broad: it discards legitimate requester origins for plugin channels whose adapter ID differs from their plugin ID (e.g. `"gmail"` vs `"openclaw-gmail"`), causing the announce system to fall back to stale session routes.
`isInternalMessageChannel()` limits stripping to explicitly internal channels (webchat only), preserving requester origin context for all external channels regardless of their position in the deliverable registry.
## Note
This is a behaviour change for channels not yet in the deliverable list. Acceptable as a no-op if upstream prefers the broader check — the immediate Gmail delivery issue is fixed separately in #23229.
## Related
- #23229 — companion fix: gate `sendAnnounce` delivery hints on channel deliverability, remove `method:send` bypass in `sendSubagentAnnounceDirectly`
- #22223 — original fix (fe57bea08) that introduced `isInternalMessageChannel`
- f555835b0 — commit that inadvertently reverted #22223
## Test plan
- [ ] Spawn a subagent from a Gmail thread — announce origin channel is preserved, not stripped
- [ ] Spawn a subagent from webchat — webchat still stripped as internal (no regression)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Most Similar PRs
#23229: fix(subagent-announce): gate queued delivery on channel deliverabil...
by mcinteerj · 2026-02-22
81.0%
#23166: fix(agents): restore subagent announce chain from #22223
by tyler6204 · 2026-02-22
73.3%
#22982: fix: prevent stale threadId from routing subagent announces to wron...
by unboxed-ai · 2026-02-21
68.9%
#22205: fix: expose resolvedTo as currentChannelId so sub-agents inherit th...
by Galygious · 2026-02-20
67.1%
#23048: feat(session): add `announceDeliver` option to suppress auto-delive...
by nszhsl · 2026-02-21
64.9%
#17527: fix(gateway): allow WebChat to attach to main session regardless of...
by Glucksberg · 2026-02-15
64.7%
#22407: fix: allow agent turn after subagent completion message delivery
by noodleprincss-ai · 2026-02-21
64.1%
#15863: fix: route agent-to-agent Slack messages to bound sessions
by MisterGuy420 · 2026-02-14
63.6%
#7584: Tests: align subagent announce wait expectations
by justinhuangcode · 2026-02-03
63.5%
#22719: fix(agents): make subagent announce timeout configurable (restore 6...
by Valadon · 2026-02-21
63.4%