Skip to content

[QUALITY-569] Stage 1: orchestrate tool (client)#9628

Merged
cephalonaut merged 1 commit intomasterfrom
matthew/orchestration-tool-2
May 4, 2026
Merged

[QUALITY-569] Stage 1: orchestrate tool (client)#9628
cephalonaut merged 1 commit intomasterfrom
matthew/orchestration-tool-2

Conversation

@cephalonaut
Copy link
Copy Markdown
Contributor

@cephalonaut cephalonaut commented Apr 30, 2026

Description

Client-side implementation of the RunAgents orchestration tool, paired with server PR https://github.com/warpdotdev/warp-server/pull/10809.

What

  • RunAgentsCardView: confirmation card UI with inline editor for model, harness, environment, host, and execution mode (Local/Cloud)
  • RunAgentsExecutor: executor that dispatches accepted requests, spawning child agent conversations via StartAgentExecutor
  • Cancel handling: card subscribes to FinishedAction events so Ctrl+C (both card-level and terminal-level) shows the cancelled state
  • Harness support: Oz, Claude, Gemini, Codex with brand icons; local-dev host gated on Channel::Local
  • Spawning card: in-flight "Spawning N agents..." status while children are being launched
  • Proto adoption: RunAgents request/result types, Harness oneof shape, StartAgentV2 advertised alongside Orchestrate

Demo

https://www.loom.com/share/dacad55f436b42d29191bf54461ab3cf

Testing

  • Manual validation of accept, reject (Ctrl+C), edit/discard, picker interactions, local and cloud execution modes
  • Existing tests updated for new harness list and import ordering

Server API dependencies

Agent Mode

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

Co-Authored-By: Oz [email protected]

@cla-bot cla-bot Bot added the cla-signed label Apr 30, 2026
@cephalonaut cephalonaut force-pushed the matthew/orchestration-tool-2 branch from 29f24a6 to 9acff38 Compare May 2, 2026 04:18
@cephalonaut cephalonaut requested a review from advait-m May 2, 2026 05:26
@cephalonaut cephalonaut marked this pull request as ready for review May 2, 2026 05:26
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 2, 2026

@cephalonaut

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 adds the client-side RunAgents orchestration flow, including the confirmation card, executor fan-out through StartAgent, result conversion, and supporting UI/dropdown changes.

Concerns

  • The workspace is left pinned to a developer-local ../warp-proto-apis path, which will break builds outside that machine until the dependency is replaced with a shared git/registry pin.
  • Local third-party harness orchestration can bypass the existing parent run_id validation, so local Claude/OpenCode launches can be dispatched with missing parent linkage.
  • Local harness preparation/pane-creation failures can create an error conversation without linking it back to the pending StartAgent request, leaving the RunAgents aggregate waiting indefinitely.

Verdict

Found: 0 critical, 3 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 Cargo.toml Outdated
# /Users/matthew/src/orchestration-tool-2/warp-proto-apis (commit f308712 on
# branch matthew/orchestration-tool-2). Will be swapped to a registry / git
# rev pin once warp-proto-apis PR #299 lands and a release is cut.
warp_multi_agent_api = { path = "../warp-proto-apis/apis/multi_agent/v1/gen/rust" }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This active [patch] points Cargo at a developer-local sibling checkout, so CI/release builds without ../warp-proto-apis will fail to resolve warp_multi_agent_api. Keep this commented out or pin the generated proto crate to a git/registry revision before merging.

continue;
}
};
if matches!(run_execution_mode, RunAgentsExecutionMode::Remote { .. })
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] Local third-party harnesses also require a parent run_id, but this guard only rejects missing run_id for remote mode; claude/opencode local RunAgents requests reach StartAgentExecutor::dispatch with None, bypassing the validation in StartAgentExecutor::execute. Reject non-Oz local harnesses when parent_run_id is missing before dispatching.

);
});
} else {
create_error_child_agent_conversation(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ [IMPORTANT] This failure path creates an error child conversation but never calls record_new_conversation_request_complete or sends an error to the pending StartAgentExecutor request. Since StartedNewConversation is now ignored, the receiver can wait forever and the RunAgents card remains spawning; return the error conversation id and record request_id, or fail the pending request directly.

Copy link
Copy Markdown
Member

@advait-m advait-m left a comment

Choose a reason for hiding this comment

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

this is awesome! Tried out the branch myself - looking good!

Few comments to address, but approving to unblock. Feel free to ping if I can be helpful for another look/more testing!

Comment on lines +435 to +437
let picker_border_color_warpui: warpui::elements::Fill =
Fill::Solid(ColorU::new(0x29, 0x29, 0x29, 0xff)).into();
let picker_font_color = ColorU::new(0xe3, 0xe2, 0xdf, 0xff);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This breaks on light theme I believe - example with marble theme (text is unreadable):

Image Image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Screenshot 2026-05-04 at 2 50 39 PM

Fixed

Comment on lines +517 to +520
Harness::Oz,
Harness::Claude,
Harness::Gemini,
Harness::Codex,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this only be Oz, Claude and OpenCode for now?

If I try Gemini I get a hang, which makes sense I think given we don't support it as a harness for multi-harness currently (I think)?

Image

I'm getting an infinite "Spawning agents" message here (with Gemini + Local)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Separately, we might want to fix the error case (with that "Spawning" message) for edge cases like the user selects CC but doesn't have claude installed on their machine? (haven't tried this yet myself, just thinking of other things that we might hit)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Did a quick fix to add a timeout at least. Will file an linear to see if we can get a fast fail in there.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

sounds good!

Comment thread Cargo.toml
Comment on lines 509 to 512
@@ -511,7 +506,3 @@ tink-hybrid = { git = "https://github.com/warpdotdev/tink-rust", branch = "warpd

tikv-jemallocator = { git = "https://github.com/warpdotdev/jemallocator.git", rev = "2ee30bfdf7059223b54810e4ea6c666f0a379e0b" }
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we want to remove this? Should leave this in, just commented

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oops - fixed

@cephalonaut cephalonaut force-pushed the matthew/orchestration-tool-2 branch 2 times, most recently from 6c7be3a to 4ed836b Compare May 4, 2026 19:20
…ew fixes

Implements the client-side orchestration tool (RunAgents) including:
- Confirmation card with inline editor (model/harness/env/host pickers)
- RunAgentsExecutor with per-child dispatch, 30s spawn timeout
- RunAgentsCardView as a standalone View with keybindings
- StartAgentConversation helpers extracted for reuse
- Theme-aware picker colors (surface_overlay_1 bg, surface_2 border,
  composited text contrast) matching Figma mocks
- Gemini removed from harness picker (unsupported for multi-agent)
- Cargo.toml warp-proto-apis patch section restored

Co-Authored-By: Oz <[email protected]>
@cephalonaut cephalonaut force-pushed the matthew/orchestration-tool-2 branch from 4ed836b to ff84142 Compare May 4, 2026 19:55
@cephalonaut cephalonaut merged commit 888c302 into master May 4, 2026
24 checks passed
@cephalonaut cephalonaut deleted the matthew/orchestration-tool-2 branch May 4, 2026 20:16
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