Skip to content

Agents window: Compare multiple implementation attempts #335085

Description

Compare multiple implementation attempts in the Agents window

The Agents window supports multi-chat sessions, peer-chat forks, isolated worktrees, and reviewing changes beside a conversation. However, after exploring more than one approach, users must manually inspect each chat and diff to determine which implementation is better.

Add a Compare Attempts workflow that runs or selects multiple approaches to the same task and presents their outcomes in a code-oriented comparison.

Proposed experience

Add a Compare Agents toggle to the new-session input alongside the existing harness and model controls.

  • When the toggle is off, the current single-harness behavior is unchanged.
  • When the toggle is on, the harness picker becomes multi-select and the send action indicates how many attempts will run, for example Run 3 Attempts.
  • The model remains a single shared selection. Only harnesses that advertise that model are eligible; incompatible harnesses are disabled with an explanation.
  • The prompt, workspace, starting branch or commit, permission level, and isolation configuration are shared across all attempts.

Submitting the prompt fans it out to one new session per selected harness. The sessions are placed in a comparison group so they can be tracked together, while a failure to start one harness does not discard successful attempts.

Each attempt:

  • receives the same prompt and starts from the same repository state;
  • runs in a separate session and isolated worktree;
  • uses one selected harness and the shared model;
  • remains independently reviewable and editable.

Once at least two attempts have results, VS Code offers a comparison view containing:

  • a concise implementation summary for each attempt;
  • changed files and diff size;
  • test, build, lint, and diagnostic results;
  • unresolved errors or warnings;
  • elapsed time and usage;
  • notable architectural or behavioral differences;
  • overlapping, conflicting, and attempt-specific changes.

The user can then:

  • Use attempt A or Use attempt B;
  • open the diffs side by side;
  • send feedback to one attempt;
  • ask an agent to Synthesize the best of both into a new attempt;
  • discard the unused worktrees.

Why this belongs in the Agents window

This makes existing multi-session and worktree support useful as a deliberate workflow rather than just additional tabs. The Agents window can provide a stronger experience than a generic best-of-N response because it understands source control state, diagnostics, tests, diffs, and editor navigation.

It also gives users a concrete way to use parallel agents without introducing a separate multi-session dashboard.

Related approaches

Cursor 2.2 introduced multi-agent judging, which evaluates parallel agent runs after they finish, recommends a solution, and explains the selection. This validates the need for a decision step on top of parallel execution. The VS Code opportunity is to make the underlying code evidence inspectable and support user-controlled synthesis rather than stopping at a winner recommendation.

OpenAI Codex has a Best of N feature that generates multiple responses for one task so users can explore alternatives and choose an approach. The Codex app also supports parallel agents in isolated worktrees and reviewing and commenting on each agent's diff.

This proposal is not a request for exact parity. VS Code can provide a more code-native comparison by combining its multi-chat sessions, worktrees, diff editors, diagnostics, test results, and usage data into one decision surface. The distinguishing workflow is comparing validated implementation outcomes, then selecting or synthesizing them without manually reconciling separate chats.

Suggested initial scope

An initial version could:

  1. Add comparison mode to the new-session input.
  2. Let the user select two or more compatible harnesses and one shared model.
  3. Fan out the same request into a separate worktree-isolated session for each harness.
  4. Keep the resulting sessions together as a comparison group.
  5. Compare summaries, changed files, diff statistics, diagnostics, validation results, elapsed time, and usage.
  6. Open the chosen attempt's diff and worktree.

Automatic synthesis, applying the winner, and worktree cleanup could follow later.

Acceptance criteria

  • One submission can launch two or more harness-specific sessions for comparison.
  • VS Code clearly indicates whether their starting repository state differs.
  • Validation results distinguish passed, failed, not run, and unknown.
  • Selecting an attempt does not silently overwrite the user's current working tree.
  • Unselected attempts remain available until the user explicitly discards them.
  • The workflow is keyboard accessible and supports any selected harness that provides the shared model and isolated worktrees.

Activity

  1. added
    feature-request
    chat-review
    multi-chat-sessions
    on Sep 8, 2026
  2. TylerLeonhardt commented on Sep 11, 2026

    @TylerLeonhardt
    Member

    Related: #329648 tracks making create_session provider-aware, including explicit provider selection for Claude and Codex. This is related to this proposal’s multi-harness fan-out, where each comparison attempt targets a selected harness.

  3. added a commit that references this issue on Sep 23, 2026
  4. added
    unreleased
    on Sep 23, 2026
  5. vs-code-engineering commented on Sep 23, 2026

    @vs-code-engineering
    Contributor

    Sharing media and context from merged PR #335498 for verification:

    Adds sessions.chat.compareAgents.enabled off by default

    Image

    Summary

    • add Run Multiple Agents... to the agent picker behind the off-by-default sessions.chat.compareAgents.enabled experiment
    • configure independent attempts with provider-local agents and models, including repeated agent/model combinations with stable attempt IDs
    • preserve setup selections while the picker is dismissed and clear them only after a successful submission
    • launch attempts directly in isolated worktrees, then run a visible Judge after the attempts finish
    • require the Judge to review every diff, inspect available evidence, and run missing targeted validation without modifying attempts
    • record privacy-safe telemetry for attempt duration, the models used, and the model selected by the Judge; correlate provider-native OTel spans for token analysis
    • present a recommendation-first comparison result with explicit review, synthesis, and cleanup actions

    UX

    1. Select Run Multiple Agents... in the agent picker.
    2. Add or remove attempt rows and choose an agent and provider-local model for each attempt.
    3. Optionally expand Evaluation to choose the Judge agent and model.
    4. Select Run N Attempts. Each attempt runs in parallel in its own isolated worktree.
    5. The comparison parent summarizes progress and becomes Comparison · Review ready when the Judge submits a verdict.
    6. The Judge result leads with the recommended attempt and rationale. A collapsed Attempt time and token usage disclosure shows each attempt's elapsed time and provider-reported input-plus-output tokens.
    7. Select Focus Winning Session to open the recommended attempt, or use its dropdown to focus another attempt. Selecting the comparison group header opens all available attempts in a tiled grid.

    The prompt and attached context are frozen when the comparison launches. Judge recommendations remain advisory. Synthesis and worktree cleanup are always explicit, and no attempt is automatically applied or deleted.

    Reviewer notes

    Comparison records are provider-neutral and persisted in profile storage. Setup is represented as an array of uniquely identified attempts rather than a map keyed by harness, allowing different models from one harness or repeated runs of the same configuration.

    Model identifiers remain provider-local and the UI displays provider-owned model labels. There is intentionally no equivalent-model-across-providers behavior.

    Attempts, the Judge, and explicit synthesis are ordinary sibling sessions in one comparison group. The Judge is the automatic machine-review stage; Review Recommended Attempt is the explicit human verification stage. New verdicts distinguish attempt-reported validation, Judge-run validation, and unavailable evidence. Existing persisted verdicts remain compatible.

    Validation

    • npm run transpile-client
    • npm run typecheck-client
    • targeted ESLint and repository stylelint for changed Sessions files
    • npm run valid-layers-check
    • focused comparison tool, orchestration, sidebar, setup, accessibility, and telemetry tests
    • live Agents window validation with a persisted completed comparison
    • git diff --check

    Architecture flow

    flowchart LR
        Setup[Choose attempt agents/models<br/>and Judge] -->|Run in parallel| Attempts[Attempts<br/>isolated worktrees]
        Attempts -->|All terminal| Judge[Judge session<br/>review every diff]
        Judge -->|1. readAttemptComparison| Evidence[Bounded cross-attempt manifest]
        Evidence -.->|2. get_session_context<br/>for deeper transcript evidence| Judge
        Judge -.->|3. targeted tests/build/lint<br/>when evidence is missing| Validation[Validation evidence]
        Validation --> Judge
        Judge -->|4. completeAttemptComparison<br/>exactly once| Results[Recommendation<br/>provenance and conflicts]
        Results -->|Review Recommended Attempt| Review[Attempt session<br/>and Changes editor]
        Results -->|Optional| Synthesis[Synthesis session]
    
    Loading

    Comparison telemetry records only attempt elapsed time, model configuration, and the Judge selection. Provider-native OTel chat spans supply token consumption for analysis. Neither path records cost or task content.

    Comparison telemetry

    Comparison telemetry records one elapsed-time event when an attempt's first turn becomes terminal and one model-outcome event after the Judge submits a verdict. Provider-native OTel chat spans carry token usage. The OTel trace anchor and both VS Code events use the same hashed comparison ID and successful-attempt index, so the datasets can be correlated without copying provider token counts into VS Code telemetry. It does not include prompts, responses, diffs, file paths, commands, workspace details, validation outcomes, or cost. Provider IDs are reduced to bounded categories (default-copilot, local-agent-host, remote-agent-host, or other).

    Event What we log Why
    agents/sessionComparisonAttemptCompleted Hashed comparison ID; attempt index; and elapsed milliseconds from session creation until the first turn becomes terminal. Measure first-turn elapsed time, then join to the model outcome event or provider-native OTel trace by hashed comparison ID and attempt index.
    Provider-native OTel chat spans gen_ai.usage.input_tokens and gen_ai.usage.output_tokens on chat spans in the attempt trace; the trace anchor carries the hashed comparison ID and attempt index. Analyze token consumption consistently across Copilot, Claude, and Codex without duplicating provider-owned usage into VS Code telemetry.
    agents/sessionComparisonModelOutcome Hashed comparison ID; attempt index and count; bounded provider category, agent ID, and resolved or configured model ID for the attempt; whether the Judge recommended it; and the Judge's bounded provider category, agent ID, and resolved or configured model ID. Measure which model and harness combinations participate in comparisons and their Judge-selection rate, including how results vary by Judge configuration.

    Joining the two VS Code events and the provider-native OTel trace supports aggregate questions such as which models are compared most often, which are selected most often by the Judge, and how first-turn time or token consumption correlates with that selection. Because task content is intentionally omitted, these are directional correlations rather than claims about model quality for a particular task category.

    Judge tools

    Tool What it does Added for this flow?
    readAttemptComparison Gives the Judge one bounded manifest of every attempt, worktree, changed file summary, and exact transcript target. Yes
    get_session_context Lets the Judge inspect one attempt conversation when deeper evidence is needed. No, reused an existing tool
    standard validation tools Let the Judge run missing targeted tests, builds, lint, or diagnostics in the attempt worktrees. No, reused existing tools
    completeAttemptComparison Records one structured recommendation, conflicts, per-attempt findings, validation states, and evidence provenance. Yes

    Source PR: #335498

  6. added
    insiders-released
    verification-needed
    and removed
    unreleased
    on Sep 24, 2026
  7. removed
    insiders-released
    on Sep 25, 2026
  8. added
    unreleased
    insiders-released
    and removed
    unreleased
    on Sep 30, 2026
  9. removed
    verification-needed
    on Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

agents-windowchat-reviewfeature-requestinsiders-releasedmulti-chat-sessionson-testplan

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions