fix(core): route relay through multi-workspace bindings#328
Open
xxb wants to merge 1 commit intochenhg5:mainfrom
Open
fix(core): route relay through multi-workspace bindings#328xxb wants to merge 1 commit intochenhg5:mainfrom
xxb wants to merge 1 commit intochenhg5:mainfrom
Conversation
chenhg5
approved these changes
Mar 28, 2026
Owner
chenhg5
left a comment
There was a problem hiding this comment.
LGTM. Well-implemented multi-workspace relay routing.
Review notes:
- ✅ CI passes
- ✅ Correct approach: routes relay through workspace bindings
- ✅ Uses
sourceSessionKeyto resolve workspace properly - ✅ Falls back to global agent/sessions when not multi-workspace
- ✅ Tests cover both single and multi-workspace scenarios
- ✅ Error handling for missing workspace bindings
This enables relay to work correctly with workspace isolation. Approved for merge.
Contributor
Author
|
Thanks for the review. This PR is ready to merge as-is:
It is also still cleanly mergeable right now; merging sooner may help avoid future drift/conflicts since |
486a372 to
e2cb877
Compare
e2cb877 to
cd00b10
Compare
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.
Summary
This fixes bot-to-bot relay in
multi-workspacemode.Before this change, relay requests only passed
chatIDinto the target engine, so the target side bypassed normal workspace routing and used the global agent/session manager. That caused relayed messages to run in the wrong workspace.What changed
sessionKeythrough relay handlingmulti-workspacemodeCC_SESSION_KEYset to the original source session key for agent-side relay/cron contextBehavior note
In
multi-workspacemode, relay from an unbound source channel now fails explicitly instead of silently falling back to the global agent. This is intentional so relay behavior matches workspace-aware routing expectations.Validation