Fix dormant Claude wake message race#11079
Conversation
Co-Authored-By: Oz <oz-agent@warp.dev>
|
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 threads wake-message metadata through the dormant Claude wake flow, primes the parent bridge before relaunch, persists wake cursors, and adds retry coverage for immediate message hydration lag.
Concerns
- The new message-read retry classifier treats errors without a typed
HttpStatusErroras transient, but the public API response helpers often discard HTTP status intoClientErroror a generic anyhow error. Permanent read failures such as auth/authorization/validation errors can now retry until the fetch timeout and be reported as timeouts instead of failing immediately.
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
Co-Authored-By: Oz <oz-agent@warp.dev>
cephalonaut
left a comment
There was a problem hiding this comment.
Review comments from local branch review.
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
Description
Fix a race in the dormant local Claude child wake flow where the child could resume before the triggering lead-agent message was readable and surfaced.
This change:
Linked Issue
N/A
ready-to-specorready-to-implement.Testing
cargo fmt -- --checkcargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warningscargo clippy -p warp_completer --all-targets --tests -- -D warningscargo nextest run -p warp dormant_claude_wake_consumer_stops_on_first_target_eventcargo nextest run -p warp persist_event_cursor_keeps_the_max_sequence_and_updates_history_modelcargo nextest run -p warp handle_event_batch_persists_max_seq_to_history_modelcargo nextest run -p warp prepare_local_wake_command_rehydrates_transcript_with_self_managed_listenercargo nextest run -p warp prime_parent_bridge_state_for_wake_clears_acked_output_and_surfaces_new_messagecargo nextest run -p warp read_message_with_timeout_I have manually tested my changes locally with
./script/runAgent Mode
Artifacts
CHANGELOG-BUG-FIX: Fixed a race where dormant local Claude child sessions could resume before the triggering lead-agent message was surfaced.
Co-Authored-By: Oz oz-agent@warp.dev