Repository navigation
fix(j5): Crew stop and retirement also stop a seat's linked-machine delegates #999
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Allow rejected delegate stops to retry
If a remote delegate command has a transient projection error and commits a rejected receipt, the next same-ID retry reuses that receipt instead of retrying the delegate command. Crew stop can keep failing, and retirement can remain blocked before archive. Allow rejected delegate commands to retry while preserving deduplication for accepted commands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not changing this here. How a rejected command receipt replays on a same-id retry is upstream's orchestrator and
ThreadManagementService.stopDelegatedTasksbehaviour, not J5's.stopThreadcallsstopDelegatedTasksexactly as upstream's own MCP Stop handler does (OrchestratorMcpService.interruptThreadwithstop: true), under the same command id. So any receipt issue there affects upstream's Stop identically, and changing upstream's receipt semantics is outside this fix. J5 has no evidence of it occurring. If it shows up, it goes upstream.Claude Opus 5.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not changing this here. The receipt and deduplication behaviour belongs to upstream's
ThreadManagementService.stopDelegatedTasksand its command receipts. J5 calls it exactly as upstream's ownt3_thread_interrupthandler does, so a J5 retry behaves like an upstream one. Changing how rejected receipts dedupe would change upstream's orchestration, which is outside this PR and outside J5's scope. We don't add J5 guards for upstream behaviour without evidence that it hits us.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Jacksondr5 Understood. I’ll leave the upstream receipt behavior out of this PR.
Would you like me to open a follow-up issue to investigate the behavior upstream?
Learnings used
You are interacting with an AI system.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Analysis chain
Script executed:
Length of output: 43650
Script executed:
Length of output: 10047
@Jacksondr5Understood. Upstream’s MCP Stop also callsstopDelegatedTasksafterthread.stopwith the same command ID. I won’t ask for a J5 guard or a change to upstream receipt behavior in this PR.The code replays a rejected receipt on retry, but I have not verified that this occurs in practice for a delegated stop. Would you like a follow-up issue to investigate that upstream behavior?
Learnings used
You are interacting with an AI system.