Skip to content

Wake up remote Claude Code agents on new events#9399

Open
kjankov wants to merge 10 commits intomasterfrom
katarina/quality-482-wake-up-remote-agent-on-new-events
Open

Wake up remote Claude Code agents on new events#9399
kjankov wants to merge 10 commits intomasterfrom
katarina/quality-482-wake-up-remote-agent-on-new-events

Conversation

@kjankov
Copy link
Copy Markdown

@kjankov kjankov commented Apr 29, 2026

Description

Fixes orchestration v2 parent/child agent wake-up and messaging behavior for remote child agents.

This PR updates the client-side orchestration flow so that incoming parent-agent messages wake remote child agents through the server run follow-up path instead of trying to treat them like local dormant Claude harnesses. Previously, a remote child could receive the parent’s message, but it would not be restarted correctly in a harness and could fail or hang when trying to send a message back to the parent.

Main changes:

• Adds a remote-child wake path in the blocklist AI controller:
◦ detects remote child conversations with pending parent-agent message events
◦ submits a run follow-up to agent/runs/{run_id}/followups
◦ removes delivered pending message events after successful follow-up submission
◦ retries/logs failures instead of silently hanging
• Keeps local dormant Claude wake behavior separate from remote child wake behavior.
• Restores remote hidden child panes as cloud/ambient agent panes instead of local terminal-backed child panes.
• Ensures restored remote child panes enter the existing ambient session in AgentRunning state.
• Persists and restores remote-child conversation metadata so the client can distinguish local children from remote children across reloads.
• Improves orchestration v2 message sending:
◦ uses task-scoped server APIs when available
◦ adds bounded timeouts and error logging for send failures
◦ surfaces failures instead of leaving action execution indefinitely pending
• Adds regression coverage for:
◦ remote child conversation restoration
◦ remote child pane/session state
◦ task-scoped ambient agent messaging
◦ orchestration v2 message/error behavior

Testing

Server API dependencies

  • Is this change necessary to make the client compatible with a desired server API breaking change?
  • Does this change rely on a new server API?
    • If so, is the use of this API restricted to client channels that rely on the staging server (e.g. WarpDev)?
  • Is this change enabling the use of a server API on client channels that rely on the production server (e.g. WarpStable)?
    • If so, has the new server API been stable on production for at least one server release cycle? See here for more details.

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Changelog Entries for Stable

CHANGELOG-NEW-FEATURE: {{text goes here...}}
CHANGELOG-IMPROVEMENT: {{text goes here...}}
CHANGELOG-BUG-FIX: {{text goes here...}}
CHANGELOG-BUG-FIX: {{more text goes here...}}
CHANGELOG-IMAGE: {{GCP-hosted URL goes here...}}
CHANGELOG-OZ: {{text goes here...}}

@cla-bot cla-bot Bot added the cla-signed label Apr 29, 2026
@kjankov kjankov marked this pull request as ready for review April 29, 2026 12:08
@oz-for-oss
Copy link
Copy Markdown

oz-for-oss Bot commented Apr 29, 2026

@kjankov

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and posted feedback on 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

@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 adds task-scoped orchestration messaging, remote-child wake-up via run followups, restored remote child pane handling, and persistence for remote-child metadata.

Concerns

  • The CLI now rejects --task-id with --conversation, which can break existing worker follow-up invocations that still pass both before the task-backed resume path runs.
  • V1 restored child lifecycle behavior appears to have been removed, and the poller restore path is no longer gated on OrchestrationV2, so disabled-v2 restores can regress.
  • The remote-child follow-up submission has no bounded timeout, so a stalled request can leave the wake permanently pending.
  • The local Claude wake path can mark the server task InProgress before verifying the conversation is still ready, leaving task state inconsistent if the final readiness check fails.
  • Security pass: no separate security-specific findings beyond the correctness issues above.

Verdict

Found: 0 critical, 5 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 crates/warp_cli/src/agent.rs Outdated
Comment thread app/src/ai/blocklist/orchestration_events.rs
Comment thread app/src/ai/blocklist/orchestration_event_poller.rs Outdated
Comment thread app/src/ai/blocklist/controller.rs Outdated
Comment thread app/src/ai/blocklist/controller.rs Outdated
Co-Authored-By: Oz <oz-agent@warp.dev>
@kjankov kjankov requested a review from cephalonaut April 29, 2026 12:41
kjankov and others added 3 commits April 29, 2026 09:11
Co-Authored-By: Oz <oz-agent@warp.dev>
Co-Authored-By: Oz <oz-agent@warp.dev>
…-new-events

Co-Authored-By: Oz <oz-agent@warp.dev>
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.

1 participant