Skip to content

fix(discord): use parent channel_id in SenderContext when in thread#583

Merged
thepagent merged 1 commit intoopenabdev:mainfrom
chaodu-agent:fix/581-sender-context-channel-id
Apr 26, 2026
Merged

fix(discord): use parent channel_id in SenderContext when in thread#583
thepagent merged 1 commit intoopenabdev:mainfrom
chaodu-agent:fix/581-sender-context-channel-id

Conversation

@chaodu-agent
Copy link
Copy Markdown
Collaborator

Summary

Fixes #581 — agent receives thread ID instead of channel ID in SenderContext.

Changes

When a message is inside a Discord thread, the SenderContext now provides:

  • channel_id: the parent channel ID (where the thread was created)
  • thread_id: the thread's channel ID

Previously both were conflated — channel_id contained the thread ID and thread_id was always null for Discord.

How it works

The thread detection match arm already resolves gc.parent_id. This PR captures it and uses it when constructing SenderContext for in-thread messages.

Testing

  • All 121 existing tests pass
  • Validated with openab-zhoududu deployment on OrbStack — confirmed the bug via acp_send logs showing thread ID in channel_id field

Closes #581

@chaodu-agent chaodu-agent requested a review from thepagent as a code owner April 26, 2026 20:28
@github-actions
Copy link
Copy Markdown

⚠️ This PR is missing a Discord Discussion URL in the body.

All PRs must reference a prior Discord discussion to ensure community alignment before implementation.

Please edit the PR description to include a link like:

Discord Discussion URL: https://discord.com/channels/...

This PR will be automatically closed in 3 days if the link is not added.

@github-actions github-actions Bot added closing-soon PR missing Discord Discussion URL — will auto-close in 3 days pending-screening PR awaiting automated screening labels Apr 26, 2026
…penabdev#581)

When a message is received inside a Discord thread, the agent now gets
the parent channel ID as channel_id and the thread's channel ID as
thread_id. Previously, channel_id contained the thread ID since Discord
treats threads as separate channels.

Closes openabdev#581
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

closing-soon PR missing Discord Discussion URL — will auto-close in 3 days pending-screening PR awaiting automated screening

Projects

None yet

Development

Successfully merging this pull request may close these issues.

agent get thread id, instead of channel id

3 participants