Skip to content

Comments

fix(subagents): restore isInternalMessageChannel guard in resolveAnnounceOrigin#23030

Open
mcinteerj wants to merge 1 commit intoopenclaw:mainfrom
mcinteerj:fix/restore-subagent-announce-chain
Open

fix(subagents): restore isInternalMessageChannel guard in resolveAnnounceOrigin#23030
mcinteerj wants to merge 1 commit intoopenclaw:mainfrom
mcinteerj:fix/restore-subagent-announce-chain

Conversation

@mcinteerj
Copy link
Contributor

@mcinteerj mcinteerj commented Feb 21, 2026

Summary

Restores the narrower isInternalMessageChannel() guard from PR #22223 (fe57bea) that was inadvertently reverted by f555835.

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

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

@openclaw-barnacle openclaw-barnacle bot added agents Agent runtime and tooling size: XS experienced-contributor Contributor with 10+ merged PRs labels Feb 21, 2026
@mcinteerj mcinteerj force-pushed the fix/restore-subagent-announce-chain branch 3 times, most recently from e7c74bf to bbc9554 Compare February 22, 2026 01:50
@mcinteerj mcinteerj force-pushed the fix/restore-subagent-announce-chain branch from bbc9554 to a11ad5a Compare February 22, 2026 01:59
…unceOrigin

Restores the narrower internal-channel guard from PR openclaw#22223 (fe57bea) that was
inadvertently reverted by f555835.

The original !isDeliverableMessageChannel() check strips the requester's channel
whenever it is not in the registered deliverable set. This causes delivery
failures for plugin channels whose adapter ID differs from their plugin ID (e.g.
"gmail" vs "openclaw-gmail"): the requester origin is discarded and the announce
falls back to stale session routes — typically WhatsApp — resulting in a timeout
followed by an E.164 format error.

Replacing with isInternalMessageChannel() limits stripping to explicitly internal
channels (webchat), preserving the requester origin for all external channels
regardless of whether they are currently in the deliverable list.

Fixes: openclaw#22223 regression introduced in f555835

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@mcinteerj mcinteerj force-pushed the fix/restore-subagent-announce-chain branch from d0ec8f1 to c92e04c Compare February 22, 2026 04:06
@mcinteerj mcinteerj changed the title fix(subagents): restore announce origin channel check from #22223 fix(subagents): restore isInternalMessageChannel guard in resolveAnnounceOrigin Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling experienced-contributor Contributor with 10+ merged PRs size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant