Skip to content

Fix dormant Claude wake message race#11079

Merged
kjankov merged 4 commits into
masterfrom
katarina/wakeup-fix
May 18, 2026
Merged

Fix dormant Claude wake message race#11079
kjankov merged 4 commits into
masterfrom
katarina/wakeup-fix

Conversation

@kjankov
Copy link
Copy Markdown
Contributor

@kjankov kjankov commented May 15, 2026

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:

  • threads wake-triggering message metadata through the dormant wake path and persists the wake cursor before relaunch
  • primes the Claude parent-bridge state before the resumed wake command runs
  • retries message hydration during immediate read-after-event lag
  • adds focused regression coverage for the wake path and hydrator retries

Linked Issue

N/A

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

Testing

  • cargo fmt -- --check

  • cargo clippy --workspace --exclude warp_completer --all-targets --tests -- -D warnings

  • cargo clippy -p warp_completer --all-targets --tests -- -D warnings

  • cargo nextest run -p warp dormant_claude_wake_consumer_stops_on_first_target_event

  • cargo nextest run -p warp persist_event_cursor_keeps_the_max_sequence_and_updates_history_model

  • cargo nextest run -p warp handle_event_batch_persists_max_seq_to_history_model

  • cargo nextest run -p warp prepare_local_wake_command_rehydrates_transcript_with_self_managed_listener

  • cargo nextest run -p warp prime_parent_bridge_state_for_wake_clears_acked_output_and_surfaces_new_message

  • cargo nextest run -p warp read_message_with_timeout_

  • I have manually tested my changes locally with ./script/run

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent 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

Co-Authored-By: Oz <oz-agent@warp.dev>
@cla-bot cla-bot Bot added the cla-signed label May 15, 2026
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 15, 2026

@kjankov

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 /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

Copy link
Copy Markdown
Contributor

@oz-for-oss oz-for-oss Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 HttpStatusError as transient, but the public API response helpers often discard HTTP status into ClientError or 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

Comment thread app/src/ai/agent_events/message_hydrator.rs Outdated
Co-Authored-By: Oz <oz-agent@warp.dev>
@kjankov kjankov requested a review from cephalonaut May 16, 2026 00:09
Copy link
Copy Markdown
Contributor

@cephalonaut cephalonaut left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review comments from local branch review.

Comment thread app/src/ai/blocklist/orchestration_event_streamer.rs Outdated
Comment thread app/src/ai/agent_sdk/driver/harness/claude_code/wake_driver.rs Outdated
Comment thread app/src/ai/blocklist/controller.rs Outdated
kjankov and others added 2 commits May 17, 2026 14:10
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
@kjankov kjankov enabled auto-merge (squash) May 18, 2026 02:25
@kjankov kjankov merged commit 95d3873 into master May 18, 2026
25 checks passed
@kjankov kjankov deleted the katarina/wakeup-fix branch May 18, 2026 02:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants