Skip to content

feat: default environment/host selection and deferred auto-launch for orchestration config UI#10774

Open
cephalonaut wants to merge 2 commits into
masterfrom
matthew/orchestration-config-defaults
Open

feat: default environment/host selection and deferred auto-launch for orchestration config UI#10774
cephalonaut wants to merge 2 commits into
masterfrom
matthew/orchestration-config-defaults

Conversation

@cephalonaut
Copy link
Copy Markdown
Contributor

@cephalonaut cephalonaut commented May 12, 2026

Description

Two changes to orchestration config handling:

1. Default environment and host selection — When the orchestration config UI opens in Remote mode with no environment selected, auto-fill from the user's last-selected or most recently used environment (matching /cloud-agent behavior). Worker host defaults to "warp". Selections are persisted to settings for cross-flow consistency.

2. Deferred auto-launch with unconditional config override — Auto-launch evaluation is deferred to stream completion so the full request (including plan_id and agent_run_configs) is available. When an approved plan config exists, its model/harness/execution_mode unconditionally override the LLM's run_agents call (preserving only computer_use_enabled). This also applies to the autonomous executor path for CLI-driver agents.

Agent conversation | Plan

Testing

  • I have manually tested my changes locally with ./script/run
  • New unit tests for override_from_approved_config (6 tests covering all override/preserve scenarios)

Agent Mode

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

Co-Authored-By: Oz oz-agent@warp.dev

@cla-bot cla-bot Bot added the cla-signed label May 12, 2026
@cephalonaut cephalonaut force-pushed the matthew/orchestration-config-defaults branch 4 times, most recently from 5555a6a to 7b572e6 Compare May 12, 2026 22:39
@cephalonaut cephalonaut requested a review from advait-m May 12, 2026 22:51
@cephalonaut cephalonaut force-pushed the matthew/orchestration-config-defaults branch 2 times, most recently from c53405a to 793173a Compare May 12, 2026 23:10
@cephalonaut cephalonaut marked this pull request as ready for review May 12, 2026 23:14
@oz-for-oss
Copy link
Copy Markdown
Contributor

oz-for-oss Bot commented May 12, 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 updates orchestration config defaults and changes run_agents auto-launch to defer until stream completion while honoring approved plan config overrides.

Concerns

  • The plan-card default environment/host fill mutates only the view state; if the user does not make another edit, the approved config stored in history remains empty and the auto-launch/executor override can still launch with an empty Remote config.
  • This is a user-visible UI/behavior change, but the PR description includes no screenshot or screen recording showing the default environment/host selection and deferred launch behavior end to end. Manual testing is required for changes that can be manually tested; please include screenshots or a screen recording, or justify why visual evidence is not possible.

Verdict

Found: 0 critical, 2 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

}
if needs_env {
if let Some(default_env) = oc::resolve_default_environment_id(ctx) {
self.edit_state.set_environment_id(default_env);
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 default only updates the local view state; unless another field change calls apply_field_change, the approved config in history stays empty, so deferred auto-launch still overrides the request with an empty Remote environment/host. Persist the resolved default when filling an approved config.

Base automatically changed from matthew/associate-plan-id to master May 12, 2026 23:24
if needs_env {
if let Some(default_env) = oc::resolve_default_environment_id(ctx) {
self.edit_state.set_environment_id(default_env);
}
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.

^ following Oz comment, I think adding something like this should address it

        if filled_defaults && self.is_approved {
            self.apply_field_change(ctx);
        }

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.

Done

@cephalonaut cephalonaut force-pushed the matthew/orchestration-config-defaults branch from 793173a to add018e Compare May 13, 2026 00:19
Non-interactive agents running via the CLI driver (SDK mode) cannot
present or interact with the orchestration confirmation card. Previously
RunAgentsExecutor::should_autoexecute always returned false, causing
these agents to get stuck waiting indefinitely for user confirmation that
can never come.

Now should_autoexecute checks AppExecutionMode::is_autonomous() and
returns true for SDK/driver mode, allowing RunAgents to proceed directly
through the standard executor path without the confirmation card.

Fixes QUALITY-667

Co-Authored-By: Oz <oz-agent@warp.dev>
@cephalonaut cephalonaut force-pushed the matthew/orchestration-config-defaults branch 3 times, most recently from 8e70ad4 to c4e9131 Compare May 13, 2026 02:34
@cephalonaut cephalonaut enabled auto-merge (squash) May 13, 2026 02:36
When the orchestration config UI initializes with Remote mode and no
environment selected, auto-fill the user's last-selected or most
recently used environment — matching the /cloud-agent behavior.

- Add resolve_default_environment_id and persist_environment_selection
  helpers in orchestration_controls.rs
- Wire into apply_execution_mode_change (handles both plan card and
  confirmation card toggle)
- Wire into plan card ensure_pickers and confirmation card new/update_request
- Persist environment selections to CloudAgentSettings for cross-flow
  consistency
- Fix rebase artifact: set_orchestration_config → set_orchestration_config_for_plan

Co-Authored-By: Oz <oz-agent@warp.dev>
@cephalonaut cephalonaut force-pushed the matthew/orchestration-config-defaults branch from c4e9131 to 8da9930 Compare May 13, 2026 02:50
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