-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Open
Description
Summary
Currently, the main Kilo Code sidebar panel (ClineProvider) executes tasks strictly sequentially. Users must wait for one task to complete before starting another. While the Agent Manager already supports parallel execution with git worktrees, this capability is not available in the main extension panel.
This feature request proposes bringing parallel task execution with git worktrees to the main extension panel.
Current Behavior
Main Extension Panel (ClineProvider)
- Single task at a time: Only one task can be active (
clineStackLIFO structure) - Sequential subtasks: Parent tasks are suspended when child tasks run via orchestrator
- No worktree support: All work happens in the main workspace
- Blocking workflow: Users must wait for task completion before starting new work
Agent Manager (existing capability)
- Parallel sessions: Multiple agent sessions can run simultaneously
- Git worktrees: Each session runs in an isolated worktree (
.kilocode/worktrees/) - Process isolation:
RuntimeProcessHandlerforks separateagent-runtimeprocesses - Branch-based workflow: Changes are committed to separate branches for later merge
Proposed Feature
Enable the main extension panel to:
- Run multiple tasks in parallel using git worktrees for isolation
- Continue working while background tasks execute
- Switch between active tasks without losing context
- Merge results from parallel branches when tasks complete
Technical Context
Relevant Files (Main Panel)
src/core/webview/ClineProvider.ts- Task stack management, single-task enforcementsrc/core/task/Task.ts- Task execution loop, delegation logic
Relevant Files (Agent Manager - reference implementation)
src/core/kilocode/agent-manager/WorktreeManager.ts- Git worktree operationssrc/core/kilocode/agent-manager/RuntimeProcessHandler.ts- Process forkingsrc/core/kilocode/agent-manager/AgentRegistry.ts- Session tracking
Key Considerations
- Rate limiting is already global (
Task.lastGlobalApiRequestTime) - would need per-session handling - UI would need to show multiple active tasks and allow switching
- Worktree cleanup on task completion/cancellation
- Session persistence for recovery after extension restart
Use Cases
- Multi-bug fixing: Work on multiple unrelated bugs simultaneously
- Exploration: Let one task explore an approach while manually working on another
- Review while waiting: Start a new task while reviewing results from a previous one
- Parallel refactoring: Run multiple refactoring tasks on different parts of codebase
Related
- PR Parallel agents #3355 - Original parallel agents implementation (CLI)
- PR Add Agent Manager for multi-agent orchestration #4151 - Agent Manager for multi-agent orchestration
- PR Agent manager: Allow spawning multiple non-interactive agent versions on git worktrees #4380 - Multi-version worktree support in Agent Manager
- PR Migrate Agent Manager from CLI to agent-runtime architecture #5263 - Migration to agent-runtime architecture
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Intake