Repository navigation
fix: prefer requesterOrigin over stale session entry in subagent announce routing - #4957
Merged
tyler6204 merged 2 commits intoJan 30, 2026
Merged
Conversation
tyler6204
added a commit
that referenced
this pull request
Jan 30, 2026
tyler6204
force-pushed
the
fix/subagent-announce-channel-routing
branch
from
January 30, 2026 23:28
fc0c971 to
44b3b01
Compare
…unce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario.
…enclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
tyler6204
force-pushed
the
fix/subagent-announce-channel-routing
branch
from
January 30, 2026 23:33
44b3b01 to
4baa5a6
Compare
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ayushozha
pushed a commit
to ayushozha/openclaw
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
YuriNachos
pushed a commit
to YuriNachos/clawdbot-fork
that referenced
this pull request
Feb 1, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
mf-yang
added a commit
to mf-yang/openclaw-cn
that referenced
this pull request
Feb 2, 2026
openclaw#4957) Fix subagent announce routing to use fresh requesterOrigin.
HashWarlock
pushed a commit
to HashWarlock/openclaw
that referenced
this pull request
Feb 4, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
uxcu
pushed a commit
to uxcu/kook-openclaw
that referenced
this pull request
Feb 5, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
bestNiu
pushed a commit
to bestNiu/clawdbot
that referenced
this pull request
Feb 5, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
Open
8 tasks done
john-ver
pushed a commit
to apmcoin/apmclaw
that referenced
this pull request
Mar 9, 2026
dustin-olenslager
pushed a commit
to dustin-olenslager/ironclaw-supreme
that referenced
this pull request
Mar 24, 2026
lovewanwan
pushed a commit
to lovewanwan/openclaw
that referenced
this pull request
Apr 28, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
ogt-redknie
pushed a commit
to ogt-redknie/OPENX
that referenced
this pull request
May 2, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
May 9, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
jameslcowan
pushed a commit
to jameslcowan/openclaw
that referenced
this pull request
Jun 2, 2026
zooqueen
pushed a commit
to zooqueen/openclaw
that referenced
this pull request
Sep 11, 2026
lhfer
pushed a commit
to lhfer/openclaw
that referenced
this pull request
Oct 11, 2026
…unce routing (openclaw#4957) * fix: prefer requesterOrigin over stale session entry in subagent announce routing When a subagent finishes and announces results back, resolveAnnounceOrigin merged the session entry (primary) with requesterOrigin (fallback). If the session store had a stale lastChannel (e.g. whatsapp) from a previous interaction but the user was now on a different channel (e.g. bluebubbles), the announce would route to the wrong channel. Swap the merge order so requesterOrigin (captured at spawn time, reflecting the actual current channel) takes priority, with the session entry as fallback for any missing fields. Error before fix: Delivery failed (whatsapp to bluebubbles:chat_guid:...): Unknown channel: whatsapp Adds regression test for the stale-channel scenario. * fix: match test to exact failure scenario and improve reliability (openclaw#4957) (thanks @tyler6204) - Remove lastTo from stale session store to match the exact mismatch scenario described in the PR - Replace 5ms setTimeout sleeps with expect.poll for better test reliability - Prevents flakiness on slower CI machines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When a subagent finishes and announces results back to the main session, the delivery routes to the wrong channel. The error:
The user only has bluebubbles configured, but the announce tries to deliver via whatsapp.
Root Cause
In
resolveAnnounceOrigin()(src/agents/subagent-announce.ts), the session entry was used as the primary source andrequesterOriginas the fallback when merging delivery context:mergeDeliveryContext(primary, fallback)resolves each field independently. If the session store had a stalelastChannel(e.g."whatsapp") from a previous interaction but nolastTo, the merge produced:channel:"whatsapp"(from stale session entry — primary)to:"bluebubbles:chat_guid:..."(from requesterOrigin — fallback)This mismatch caused the delivery to attempt whatsapp with a bluebubbles address.
Fix
Swap the merge priority so
requesterOrigin(captured at subagent spawn time, reflecting the actual current channel) takes precedence:The session entry still serves as fallback for any fields not present in
requesterOrigin.Testing
prefers requesterOrigin channel over stale session lastChannel in queued announce