Repository navigation
fix(delivery): prevent agent sessions from becoming message targets - #115657
Merged
Merged
Conversation
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 29, 2026
vincentkoc
added a commit
that referenced
this pull request
Jul 29, 2026
…ifecycle-hooks * origin/main: fix(mattermost): key private channels as group on outbound routing (#96645) fix(ci): grant Telegram QA runtime scratch access (#115659) fix(telegram): stop retrying blocked recipients (#115640) fix(tts): persist generated speech in media store (#115647) fix(gateway): preserve complete streamed chat completions (#115652) fix(mac): prevent app auth from blocking node-host startup (#115533) fix(heartbeat): keep message-tool final replies private (#115629) fix(gateway): drain root work continuations before direct-stop process exit (#105848) fix(ollama): keep active streams within their idle timeout (#115648) fix(delivery): keep session keys out of inferred message targets (#115657) fix(ci): type code mode matrix catch callback (#115674) refactor(agents): centralize bundled CLI backend auth policy (#115633) refactor: remove 3,527 lines of runtime and test duplication (#115626) [AI] fix(doctor): stop repeated bundledDiscovery migration noise on beta (#115208) # Conflicts: # scripts/code-mode-model-matrix.ts
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.
Closes #114159
What Problem This Solves
Fixes an issue where users relying on Discord or another messaging channel for subagent, cron, or autonomous replies could see messages dead-lettered or delivered to an internal session identity instead of their actual channel. A session-shaped current channel could also hide a valid current conversation target.
Why This Change Was Made
Infer outbound destinations only from actual conversation targets. Reuse the canonical agent-session parser at both message-action normalization and the pre-discovery target gate, skip bare and channel-wrapped internal sessions, keep searching for a real current messaging target, and leave every explicitly supplied destination unchanged. This is a provider-neutral core fix; it changes no channel plugin, configuration, authentication, schema, or Discord target grammar.
User Impact
Subagent, cron, and autonomous messages use the real current conversation when available. When no channel destination exists, message sending fails immediately with the existing actionable target-required error instead of discovering a plugin, making a provider request, or producing a dead-letter.
Evidence
faf0ded0d561890f404d5cbd7a713a0627c86823: 495/495 remote tests passed on Blacksmith Testboxtbx_01kyp78n6px5kse5n2fbe82ew7: canonical normalization, real registered outbound send/no-send, agent message tool, gateway send RPC, and actual Discord REST send, outbound adapter, target parser, and channel-action contract suites.pnpm check:changedpassed, including core and core-test tsgo, changed-file formatting, lint, SDK and plugin boundaries, dependency guards, dead exports, runtime cycles, and state-schema guards.gpt-5.6-solautoreview atxhighcompleted clean with no accepted/actionable findings.