[codex] Fix main-session web UI reply routing to Telegram#29328
[codex] Fix main-session web UI reply routing to Telegram#29328Takhoffman merged 2 commits intoopenclaw:mainfrom
Conversation
Greptile SummaryFixes message delivery routing when replies are sent from the Web Control UI to Telegram messages unified in the main session. The fix correctly inherits routing metadata ( Confidence Score: 4/5
Last reviewed commit: 11e8e47 |
|
Additional field report (real-world, Telegram-only operator) SummaryI can reproduce reply-routing drift even when I never send replies from Control UI (I reply 100% from Telegram). Environment
What I observed
Hard evidence (same incident window)Window: 2026-02-28 10:26:00–10:32:00 UTC
Relevant user messages in transcript:
Why this may extend scope of current fixPR #29328 focuses on RequestCould maintainers confirm whether there are other non- |
11e8e47 to
7bbb3be
Compare
|
PR #29328 - [codex] Fix main-session web UI reply routing to Telegram (#29328) Merged via squash.
Thanks @BeeSting50! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7bbb3bea54
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| OriginatingChannel: originatingChannel, | ||
| OriginatingTo: originatingTo, |
There was a problem hiding this comment.
Surface route delivery failures from chat.send
Setting OriginatingChannel/OriginatingTo here makes chat.send go through cross-channel routeReply delivery, but that path does not throw on send failure (it logs and returns ok: false/queuedFinal: false), and chat.send still marks the run as successful. In environments where the target channel is unavailable or the stored route is stale, the operator gets an "ok" completion while Telegram/Feishu receives nothing. Please treat failed routed finals as a failed run (or explicitly fallback) before broadcasting success.
Useful? React with 👍 / 👎.
…9328) thanks @BeeSting50 Verified: - pnpm test src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts - pnpm exec oxfmt --check src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts src/auto-reply/reply/dispatch-from-config.ts src/gateway/server-methods/chat.ts CHANGELOG.md - CI note: non-required check "check" failed on unrelated src/slack/monitor/events/messages.ts TS errors outside this PR scope. Co-authored-by: BeeSting50 <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…anks @BeeSting50 Verified: - pnpm test src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts - pnpm exec oxfmt --check src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts src/auto-reply/reply/dispatch-from-config.ts src/gateway/server-methods/chat.ts CHANGELOG.md - CI note: non-required check "check" failed on unrelated src/slack/monitor/events/messages.ts TS errors outside this PR scope. Co-authored-by: BeeSting50 <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…9328) thanks @BeeSting50 Verified: - pnpm test src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts - pnpm exec oxfmt --check src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts src/auto-reply/reply/dispatch-from-config.ts src/gateway/server-methods/chat.ts CHANGELOG.md - CI note: non-required check "check" failed on unrelated src/slack/monitor/events/messages.ts TS errors outside this PR scope. Co-authored-by: BeeSting50 <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…9328) thanks @BeeSting50 Verified: - pnpm test src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts - pnpm exec oxfmt --check src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts src/auto-reply/reply/dispatch-from-config.ts src/gateway/server-methods/chat.ts CHANGELOG.md - CI note: non-required check "check" failed on unrelated src/slack/monitor/events/messages.ts TS errors outside this PR scope. Co-authored-by: BeeSting50 <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…9328) thanks @BeeSting50 Verified: - pnpm test src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts - pnpm exec oxfmt --check src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts src/auto-reply/reply/dispatch-from-config.ts src/gateway/server-methods/chat.ts CHANGELOG.md - CI note: non-required check "check" failed on unrelated src/slack/monitor/events/messages.ts TS errors outside this PR scope. Co-authored-by: BeeSting50 <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…9328) thanks @BeeSting50 Verified: - pnpm test src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts - pnpm exec oxfmt --check src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts src/auto-reply/reply/dispatch-from-config.ts src/gateway/server-methods/chat.ts CHANGELOG.md - CI note: non-required check "check" failed on unrelated src/slack/monitor/events/messages.ts TS errors outside this PR scope. Co-authored-by: BeeSting50 <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…9328) thanks @BeeSting50 Verified: - pnpm test src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts - pnpm exec oxfmt --check src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts src/auto-reply/reply/dispatch-from-config.ts src/gateway/server-methods/chat.ts CHANGELOG.md - CI note: non-required check "check" failed on unrelated src/slack/monitor/events/messages.ts TS errors outside this PR scope. Co-authored-by: BeeSting50 <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
…9328) thanks @BeeSting50 Verified: - pnpm test src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts - pnpm exec oxfmt --check src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts src/auto-reply/reply/dispatch-from-config.ts src/gateway/server-methods/chat.ts CHANGELOG.md - CI note: non-required check "check" failed on unrelated src/slack/monitor/events/messages.ts TS errors outside this PR scope. Co-authored-by: BeeSting50 <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> (cherry picked from commit 050e928)
…9328) thanks @BeeSting50 Verified: - pnpm test src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts - pnpm exec oxfmt --check src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts src/auto-reply/reply/dispatch-from-config.ts src/gateway/server-methods/chat.ts CHANGELOG.md - CI note: non-required check "check" failed on unrelated src/slack/monitor/events/messages.ts TS errors outside this PR scope. Co-authored-by: BeeSting50 <[email protected]> Co-authored-by: Tak Hoffman <[email protected]> (cherry picked from commit 050e928)
…9328) thanks @BeeSting50 Verified: - pnpm test src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts - pnpm exec oxfmt --check src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts src/auto-reply/reply/dispatch-from-config.ts src/gateway/server-methods/chat.ts CHANGELOG.md - CI note: non-required check "check" failed on unrelated src/slack/monitor/events/messages.ts TS errors outside this PR scope. Co-authored-by: BeeSting50 <[email protected]> Co-authored-by: Tak Hoffman <[email protected]>
Fixes #29301
Title
Reply routing fails when
session.dmScope=mainand replies are sent fromchat.send(Web Control UI): replies stay in web history and are not delivered to Telegram.Severity Assessment
Medium. Message delivery silently fails on a supported configuration (
session.dmScope=main) and can cause operators to believe users received responses when they did not.Impact
When users send Telegram messages that are unified into the main session, replying from the web Control UI can keep the assistant response only in session history, without delivering it back to Telegram.
Affected Component
src/gateway/server-methods/chat.ts(chat.sendcontext construction)src/auto-reply/reply/dispatch-from-config.ts(origin routing decision path)Technical Reproduction
session.dmScopetomain.Root cause:
chat.sendalways setOriginatingChannelto internalwebchat, which preventeddispatch-from-configfrom routing final replies to the stored external session delivery context.Demonstrated Impact
In runtime logs during reproduction, UI-originated runs executed with
messageChannel=webchat, and no Telegram outbound send occurred for that reply path. User-observed behavior matched this: response visible in session history only, not in Telegram.Environment
2026.2.26session.dmScope=mainRemediation Advice
chat.send, inherit routable origin metadata from session delivery fields (deliveryContext/lastChannel) when available, instead of forcing internal webchat origin.OriginatingChannel,OriginatingTo,AccountId, andMessageThreadIdfor downstream route-reply logic.chat.sendorigin inheritance from session delivery contextValidation
pnpm test src/auto-reply/reply/dispatch-from-config.test.ts src/gateway/server-methods/chat.directive-tags.test.ts