Parent: #398
Depends on: Context Builder core selection and assembly model.
Goal
Let Smart-mode orchestration attach a distinct curated context payload to each planned worktree session instead of launching every agent with only a prompt string.
Implementation Notes
Target areas:
OrchestrationSession in WorktreeOrchestrationTool.swift
MultiSessionLaunchViewModel.launchOrchestrationSessions
- Smart plan review UI in
MultiSessionLaunchView
Extend OrchestrationSession with an optional contextSelection or equivalent Codable payload. During launch, assemble the context for each session and pass it through the contextBlock launch path introduced by the Context Builder core issue.
Keep the first version pragmatic:
- allow empty context to preserve current behavior
- support manual attachment/curation per session if the UI exists
- otherwise support a simple default selection hook without blocking launch
- show token estimate per session if token estimates are available
Acceptance Criteria
- A Smart plan can launch multiple sessions with different context blocks.
- Sessions with no context payload launch exactly as they do today.
- Plan decoding remains backward compatible for older plans with no context field.
- Plan review shows whether each session has context attached.
Tests
Add model decoding tests for old/new OrchestrationSession payloads and view-model tests that assembled context is passed to startNewSessionInHub per session.
Parent: #398
Depends on: Context Builder core selection and assembly model.
Goal
Let Smart-mode orchestration attach a distinct curated context payload to each planned worktree session instead of launching every agent with only a prompt string.
Implementation Notes
Target areas:
OrchestrationSessioninWorktreeOrchestrationTool.swiftMultiSessionLaunchViewModel.launchOrchestrationSessionsMultiSessionLaunchViewExtend
OrchestrationSessionwith an optionalcontextSelectionor equivalent Codable payload. During launch, assemble the context for each session and pass it through thecontextBlocklaunch path introduced by the Context Builder core issue.Keep the first version pragmatic:
Acceptance Criteria
Tests
Add model decoding tests for old/new
OrchestrationSessionpayloads and view-model tests that assembled context is passed tostartNewSessionInHubper session.