Skip auto-handoff-on-sleep for orchestrator sessions with local child agents#13211
Skip auto-handoff-on-sleep for orchestrator sessions with local child agents#13211warp-dev-github-integration[bot] wants to merge 1 commit into
Conversation
When auto-handoff-on-sleep is enabled, an in-progress synced orchestrator session was auto-handed-off to the cloud on sleep like any other session, forking only the parent and orphaning its local child agents. Add an OrchestratorWithLocalChildren skip reason, computed via a new has_local_orchestrated_children topology helper (active, non-remote descendants), wired through the shared AutoCloudHandoffEligibility check so it covers all automatic handoff triggers and also suppresses the misleading wake discoverability prompt for these sessions. Co-Authored-By: Warp <agent@warp.dev>
|
@warp-dev-github-integration[bot] I'm starting a first review of this pull request. You can view the conversation on Warp. I completed the review and no human review was requested for this pull request. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds an auto-handoff skip reason for orchestrator sessions with active local child agents, threads that check through automatic handoff eligibility, and adds regression coverage for the topology helper and eligibility decision.
Concerns
- This changes user-perceivable auto-handoff behavior and suppresses the wake discoverability prompt, but the PR description does not include screenshots or a screen recording demonstrating the behavior end to end. Please attach visual evidence from a local desktop run or a computer-use-enabled environment; the debug URI can cover the automatic handoff path if macOS sleep itself is hard to trigger.
Verdict
Found: 0 critical, 1 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
|
Thanks for the review. On the request for visual evidence: this change has no positive UI surface to screenshot — it only changes an internal auto-handoff eligibility decision. Its two user-perceivable effects are both conditional absences that aren't faithfully reproducible in this Linux CI/cloud environment:
Because of that, the decision is verified deterministically at the exact boundary with unit tests rather than a screenshot:
|
Description
When auto-handoff-on-sleep is enabled, an in-progress, synced orchestrator session was auto-handed-off to the cloud on sleep just like any other session. That forks only the parent to the cloud and orphans its still-running local child agents.
This adds a new
AutoCloudHandoffSkipReason::OrchestratorWithLocalChildrenskip, computed by a newhas_local_orchestrated_childrentopology helper (any descendant that is a local —!is_remote_child()— and active —!ConversationStatus::is_done()— child). It is wired through the sharedAutoCloudHandoffEligibility::skip_reason, so it covers all automatic handoff triggers (MacOsSleepandUri) and also suppresses the misleading wake "you could hand this off" discoverability prompt for these sessions. User-initiated manual handoff is unaffected.Requested in the factory-client triage thread (spec approved by the reporter): https://warpdev.slack.com/archives/C0BCE7AELJ2/p1782779637596289?thread_ts=1782779637.596289&cid=C0BCE7AELJ2
Linked Issue
N/A — requested via the factory-client Slack triage thread linked above.
Testing
auto_handoff_skips_orchestrator_with_local_childreninapp/src/workspace/auto_handoff_tests.rs(fails to compile before the change; passes after) plus a no-regression assertion that the default eligible session still returnsNone.has_local_orchestrated_children_detects_active_local_children(active local child counts; finished child does not; no children does not) andhas_local_orchestrated_children_ignores_remote_children../script/formatclean;cargo clippy -p warp --all-targets --tests -- -D warningspasses; targetedcargo nextest run -p warp auto_handoff orchestrat→ 201 passed.MacOsSleeptrigger is gated on a macOS sleep event and isn't reproducible on the Linux CI runner; logic is covered by the unit tests above. A macOS reviewer can optionally confirm end-to-end via thewarp://.../auto_handoff_to_clouddebug URI / actual sleep.Agent Mode