-
Notifications
You must be signed in to change notification settings - Fork 6
fix: only resolve run-session when root session goes idle, not subagent sessions #600
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -239,7 +239,7 @@ export function useCloudAgentStream({ | |
| } | ||
| }, | ||
|
|
||
| onSessionStatusChanged: status => { | ||
| onSessionStatusChanged: (status, _sessionId) => { | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. WARNING: Stream completion can be triggered by non-root session idle events
|
||
| setSessionStatus(status); | ||
|
|
||
| // Handle streaming state based on status | ||
|
|
||
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.
WARNING: Idle status from child sessions can prematurely end root streaming
This callback now receives
sessionIdbut ignores it. If a subagent/child session emitsstatus.type === 'idle', this will setisStreamingto false and callonStreamCompletefor the parent flow too early. Consider gating completion to the active/root session ID, similar to the safeguard added inrun-session.ts.