Skip to content

Route system-channel outbound messages to origin channel and add test#7

Merged
YspCoder merged 1 commit intomainfrom
codex/fix-clawgo-task-delivery-failure
Mar 2, 2026
Merged

Route system-channel outbound messages to origin channel and add test#7
YspCoder merged 1 commit intomainfrom
codex/fix-clawgo-task-delivery-failure

Conversation

@YspCoder
Copy link
Copy Markdown
Owner

@YspCoder YspCoder commented Mar 2, 2026

Motivation

  • System-originated inbound messages encoded an origin in ChatID but outbound messages continued to use the system channel, preventing replies from being delivered back to the originating channel.

Description

  • Update prepareOutbound to remap outbound Channel and ChatID when an inbound message has Channel == "system" by splitting ChatID on ":" and falling back to cli when no origin is present.
  • Construct an outbound variable to modify the message before returning, trimming ReplyToID and preserving original content and chat info.
  • Add a new unit test TestProcessInbound_SystemMessagePublishesToOriginChannel in loop_session_regression_test.go and import time for test timeout handling.

Testing

  • Ran the package unit tests with go test ./pkg/agent, and the suite passed including the new TestProcessInbound_SystemMessagePublishesToOriginChannel test.

Codex Task

@YspCoder YspCoder merged commit 062be86 into main Mar 2, 2026
@YspCoder YspCoder deleted the codex/fix-clawgo-task-delivery-failure branch March 2, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant