Skip to content

Parallel multi-model chat: child lanes + Lanes focus#123

Closed
arul28 wants to merge 3 commits intomainfrom
cursor/multiple-model-prompt-lanes-bb23
Closed

Parallel multi-model chat: child lanes + Lanes focus#123
arul28 wants to merge 3 commits intomainfrom
cursor/multiple-model-prompt-lanes-bb23

Conversation

@arul28
Copy link
Copy Markdown
Owner

@arul28 arul28 commented Apr 3, 2026

Summary

Adds optional parallel model mode on the Work tab new chat draft. When enabled, the user configures two or more distinct models (each with its own model, reasoning tier, permission mode, Codex execution mode where applicable). Submitting one prompt:

  1. Calls agentChat.suggestLaneName (same model stack as auto-title) to derive a short shared task prefix from the prompt (or from an attachment-only description when there is no text).
  2. Creates a child lane per model under the current lane with names {prefix}-{codex|claude|cursor|…}.
  3. Creates a chat session per child lane with the matching controls and sends the same prompt (optional project context docs still apply when toggled).
  4. Attachments: The same file and image attachments are send to every child session (max 12 total per launch, PARALLEL_CHAT_MAX_ATTACHMENTS). @ search, upload, paste, and drag-drop behave like single-chat. If the draft is empty but attachments exist, a short default user line is sent so the backend always gets non-empty text.
  5. Opens each new session in the project work tabs and sets each child lane’s work pane to that session.
  6. Navigates to /lanes?laneIds=…&workFocus=1 so all new lanes are selected and the Work pane is emphasized via a dedicated tiling preset (layout version v6).

UX notes

  • Parallel mode only appears when no chat session is active (Work new-chat draft with forceDraftMode).
  • While a parallel launch runs, the composer is disabled and status shows progress.
  • Parallel UI: card layout, Parallel models entry row, clearer configure/remove/add-model actions.

Technical

  • New IPC: ade.agentChat.suggestLaneNameagentChatService.suggestLaneNameFromPrompt.
  • Lanes URL: laneIds (comma-separated) for multi-column selection; workFocus=1 triggers work-emphasis tiling when the listed lanes match the visible split.
Open in Web Open in Cursor 

- Add IPC suggestLaneName for AI-derived lane name prefixes from the prompt
- Work new-chat draft: optional parallel mode with per-model configure (model, reasoning, permissions, Codex execution mode)
- On send: create child lanes per model, open chats, send prompt, navigate to Lanes with multi-select
- Lanes: laneIds + workFocus query for split columns and work-emphasis tiling (layout v6)

Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ade Ready Ready Preview, Comment Apr 4, 2026 2:55pm

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 3, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bf883b93-f754-405f-ae49-df1358aa5cba

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cursor/multiple-model-prompt-lanes-bb23

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

- Allow images in parallel mode (same refs sent to every child session); cap via PARALLEL_CHAT_MAX_IMAGES
- Filter @ picker to images; file input accept=image/*; validate paste/drop
- Refined parallel launch card, entry button, send enables with images-only prompt
- Steer fallback includes attachment paths; image-only send uses short default line

Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
- Replace image-only parallel rules with same file/image support as single chat
- Cap parallel attachments via PARALLEL_CHAT_MAX_ATTACHMENTS (12)
- Naming seed and empty-message default text cover mixed attachments

Co-authored-by: Arul Sharma <arul28@users.noreply.github.com>
@arul28 arul28 closed this Apr 5, 2026
arul28 added a commit that referenced this pull request Apr 23, 2026
- orchestratorService: drop redundant ADE_CLI_AGENT_GUIDANCE prepend in
  augmentedPrompt; buildFullPrompt already injects it into the system prompt
  for mission-tooling workers, so the double-injection wasted context.
- adeActions registry.graph_state: ignore caller-supplied projectId and always
  key by runtime.projectId — closes the cross-project read/write escalation.
- adeActions registry.layout/tiling_tree/graph_state set: reject non-plain-
  object payloads in addition to missing keys (allow explicit null to clear).
- adeActions registry CTO-only: gate usage.poll alongside start/stop/forceRefresh.
- prService.upsertRow: no longer adopts rows matching by repo/PR number across
  lanes unless caller passes allowRepoPrAdoption. Only duplicate-PR recovery
  in createFromLane opts in; linkToLane + refresh stay lane-scoped.
- prService.getRowByNumber: accepts optional repo owner/name; throws on
  cross-repo ambiguity so bare "#123" locators surface conflicts instead of
  silently picking the most-recently-updated row.
- main.ts: autoUpdateService is initialized before rpcRuntime construction so
  the embedded socket RPC captures a live instance instead of null.
- cli.ts VALUE_CARRIER_FLAGS: prune boolean-only flags
  (--delete-source, --delete-source-lane, --include-ignored, --unresolved).
- agentChatService: decouple ADE_CLI_AGENT_GUIDANCE from shouldInjectLaneDirective.
  Providers without persistent system-prompt guidance (Codex/OpenCode/Cursor)
  now get the block on every launch, even resumed sessions.
- providerOrchestratorAdapter.test: accept the now-always-augmented worker
  prompt via expect.stringContaining("diagnose the failing check") instead of
  an exact-equality assertion.

Addresses 3134403033, 3134403054, 3134403060, 3134403076, 3134443870,
3134443879, 3134503369, 3134503423, 3134504179, 3134504183, 3134504190,
3134504196. Fixes the providerOrchestratorAdapter test that failed on CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
arul28 added a commit that referenced this pull request Apr 23, 2026
* fix: ADE CLI/PR workflow and integration lane ownership

- Expand ADE CLI RPC, bootstrap, and command surface; add shared adeCliGuidance for agent prompts.

- Wire desktop orchestrator, chat, CTO, and main for PR/CLI behavior.

- Derive integration scratch lanes from missing merge-into id; avoid misclassifying adopted lanes in cleanup.

Made-with: Cursor

* ship: iteration 1 — align CLI workspaceRoot with explicit project root

When --project-root or ADE_PROJECT_ROOT fixes the project root, default workspaceRoot to that path unless ADE_WORKSPACE_ROOT/--workspace-root is set (fixes capy-ai review thread).

Made-with: Cursor

* fix: rebase onto main, review follow-ups, CI terminal test

- Resolve adeRpcServer/bootstrap/cli conflicts with adeActions registry + headless services.

- prService: clear pr_group_members when PR row moves lanes; tighter duplicate-PR message match.

- CLI: route computer/artifact/setting aliases; safer hasHelpFlag after value-taking flags.

- Orchestrator: log augmented startup preview when ADE CLI guidance is prepended.

- main.ts: drop duplicate AdeRuntime passthrough keys.

- TerminalView test: real timers + waitFor for webgl fallback flake.

Made-with: Cursor

* ship: iteration 2 — review follow-ups + CLI audit fixes

- adeRpcServer / adeActions registry: role-gate CTO-only methods (linear_credentials
  set/clear, github set/clear token, update.quitAndInstall, flow_policy.save/rollback,
  linear_sync.runSyncNow/resolveQueueItem, linear_ingress.ensureRelayWebhook,
  budget.updateConfig, feedback.submitPreparedDraft, usage.start/stop/forceRefresh)
  so agent-role callers cannot invoke them via run_ade_action.
- layout.set / tiling_tree.set / graph_state.set reject calls with missing payload
  key instead of persisting default {}/null, preventing accidental UI state wipe.
- create_pr_from_lane threads baseBranch through prService.draftDescription so
  auto-drafted title/body describe the actual target branch.
- Integration lane provenance: only flag as "adopted" when
  preferred_integration_lane_id === integration_lane_id; mismatched scratch lanes
  stay "ade-created" so cleanup/delete works.
- promptInspector: dedup ADE_CLI_AGENT_GUIDANCE block.
- agentChatService: skip first-user-message guidance injection for Claude
  sessions (system prompt already carries it).
- cli hasHelpFlag: expand valueCarrierFlags to cover all ~120 value-taking
  long-flags so --help after a pending value flag is treated as the value.

Addresses review comments 3134159150, 3134159153, 3134159164, 3134196314,
3134196316, 3134196319, 3134196322, 3134196340. Fixes 3 failing adeRpcServer
tests around dynamic ADE actions listing.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ship: iteration 3 — sync ade action schema to registry, plug PR-row handoff gap

- adeActions registry: export ADE_ACTION_DOMAIN_NAMES as source of truth;
  AdeActionDomain derived from it.
- adeRpcServer: list_ade_actions/run_ade_action schema enums now pull from
  ADE_ACTION_DOMAIN_NAMES, removing ~25 domains that were advertised but not
  backed by the registry (agent_tools, ade_cli, dev_tools, sync, etc.) and
  adding the missing automations/issue entries.
- prService.upsertRow: when reusing a PR row across lanes, null out
  integration_proposals.linked_pr_id alongside the pr_group_members cleanup so
  old integration workflows don't silently track the new lane's PR status.
- cli.ts hasHelpFlag: add "-q" to valueCarrierFlags (used by files search /
  memory search).

Addresses review comments 3134268111, 3134268114, 3134268121, 3134268125.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ship: iteration 4 — review follow-ups

- prService.findExistingPrForBranch: drop `|| Boolean(candidate?.draft)`.
  GitHub keeps draft=true on closed drafts, so the OR could prefer a closed
  draft over a later open PR. state==="open" is sufficient.
- cli.ts VALUE_CARRIER_FLAGS: add -m, --max-rounds / --rounds, --max-log-bytes,
  --max-prompt-chars, --recent-limit; drop --text (global output flag, broke
  `lanes list --text --help`).
- cli.test.ts: regression for `--text --help` ordering.
- cli.ts findAdeManagedWorktreeRoot / findProjectRoots: canonicalize with
  fs.realpathSync.native so symlinked worktree paths still match.
- coordinatorAgent.ts: drop ADE_CLI_AGENT_GUIDANCE injection — coordinator
  delegates to workers and has no terminal tool, so the guidance misled it.
- main.ts buildAdeActionRuntimeForAutomations: forward keybindingsService,
  onboardingService, feedbackReporterService, usageTrackingService,
  budgetCapService, autoUpdateService so desktop automations can dispatch
  the new action domains.

Addresses review comments 3134349765, 3134365534, 3134365536, 3134365659,
3134365660, 3134365668. 3134365535 already addressed in iter 3.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* ship: iteration 4 (post-rebate) — post-merge review follow-ups + CI fix

- orchestratorService: drop redundant ADE_CLI_AGENT_GUIDANCE prepend in
  augmentedPrompt; buildFullPrompt already injects it into the system prompt
  for mission-tooling workers, so the double-injection wasted context.
- adeActions registry.graph_state: ignore caller-supplied projectId and always
  key by runtime.projectId — closes the cross-project read/write escalation.
- adeActions registry.layout/tiling_tree/graph_state set: reject non-plain-
  object payloads in addition to missing keys (allow explicit null to clear).
- adeActions registry CTO-only: gate usage.poll alongside start/stop/forceRefresh.
- prService.upsertRow: no longer adopts rows matching by repo/PR number across
  lanes unless caller passes allowRepoPrAdoption. Only duplicate-PR recovery
  in createFromLane opts in; linkToLane + refresh stay lane-scoped.
- prService.getRowByNumber: accepts optional repo owner/name; throws on
  cross-repo ambiguity so bare "#123" locators surface conflicts instead of
  silently picking the most-recently-updated row.
- main.ts: autoUpdateService is initialized before rpcRuntime construction so
  the embedded socket RPC captures a live instance instead of null.
- cli.ts VALUE_CARRIER_FLAGS: prune boolean-only flags
  (--delete-source, --delete-source-lane, --include-ignored, --unresolved).
- agentChatService: decouple ADE_CLI_AGENT_GUIDANCE from shouldInjectLaneDirective.
  Providers without persistent system-prompt guidance (Codex/OpenCode/Cursor)
  now get the block on every launch, even resumed sessions.
- providerOrchestratorAdapter.test: accept the now-always-augmented worker
  prompt via expect.stringContaining("diagnose the failing check") instead of
  an exact-equality assertion.

Addresses 3134403033, 3134403054, 3134403060, 3134403076, 3134443870,
3134443879, 3134503369, 3134503423, 3134504179, 3134504183, 3134504190,
3134504196. Fixes the providerOrchestratorAdapter test that failed on CI.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants