Agent Manager

The Agent Manager is a control panel for running and orchestrating multiple Kilo Code agents, with support for parallel worktree-isolated sessions.

The Agent Manager is a full-panel editor tab built directly into the extension. All sessions share the single kilo serve backend process. It supports:

  • Multiple parallel sessions, each in its own git worktree
  • A diff/review panel showing changes vs. the parent branch
  • Dedicated VS Code integrated terminals per session
  • Setup scripts and .env auto-copy on worktree creation
  • Session import from existing branches, external worktrees, or GitHub PR URLs
  • "Continue in Worktree" to promote a sidebar session to the Agent Manager

Opening the Agent Manager

  • Keyboard shortcut: Cmd+Shift+M (macOS) / Ctrl+Shift+M (Windows/Linux)
  • Command Palette: "Kilo Code: Open Agent Manager"
  • Click the Agent Manager icon in the sidebar toolbar

The panel opens as an editor tab and stays active across focus changes.

Working with Worktrees

Each Agent Manager session runs in an isolated git worktree on a separate branch, keeping your main branch clean.

Creating a New Worktree Session

  1. Click New Worktree or press Cmd+Shift+W to create a new worktree
  2. Enter a branch name (or let Kilo generate one)
  3. Type your first message to start the agent

A new git worktree is created from your current branch. The agent works in isolation β€” your main branch is unaffected.

Multi-Version Mode

You can run up to 4 parallel implementations of the same prompt across separate worktrees:

  1. Click the multi-version button and enter a prompt
  2. Optionally assign different models to each version
  3. Kilo creates one worktree + session per version and runs them in parallel

Importing Existing Work

  • From a branch: Import an existing git branch as a worktree
  • From a GitHub PR URL: Paste a PR URL to import it as a worktree
  • From an external worktree: Import a worktree that already exists on disk
  • Continue in Worktree: From the sidebar chat, promote the current session to a new Agent Manager worktree

Sending Messages, Approvals, and Control

  • Continue the conversation: Send a follow-up message to the running agent
  • Approvals: The Permission Dock shows tool approval prompts β€” approve once, approve always, or deny
  • Cancel: Sends a cooperative stop signal to the agent
  • Stop: Force-terminates the session and marks it as stopped

Diff / Review Panel

Press Cmd+Alt+D to toggle the diff panel. It shows a live-updating diff between the worktree and its parent branch.

  • Select files and click Apply to Main Branch to merge changes
  • Conflicts are surfaced with a resolution dialog
  • Supports unified and split diff views

Terminals

Each session has a dedicated integrated terminal. Press Cmd+Alt+T to focus the terminal for the active session.

Setup Scripts

Place an executable script at .kilo/setup-script in your project root. It runs automatically whenever a new worktree is created (useful for npm install, env setup, etc.). .env files are also auto-copied from the main repo.

Session State and Persistence

Agent Manager state is persisted in .kilo/agent-manager.json. Sessions, worktrees, and their order are restored on reload.

Keyboard Shortcuts (Agent Manager Panel)

ShortcutAction
Cmd+Shift+MOpen Agent Manager
Cmd+Shift+WNew worktree
Cmd+Shift+OImport/open worktree
Cmd+Shift+XClose current worktree
Cmd+NNew tab (session) in worktree
Cmd+WClose current tab
Cmd+Alt+[ / ]Previous / next worktree
Cmd+Alt+, / .Previous / next tab in worktree
Cmd+Alt+TShow terminal for current session
Cmd+Alt+DToggle diff panel
Cmd+Alt+?Show keyboard shortcuts
Cmd+1 … Cmd+9Jump to worktree/session by index

Troubleshooting

  • "Please open a folder…" error β€” the Agent Manager requires a VS Code workspace folder
  • "Cannot use parallel mode from within a git worktree" β€” open the main repository (where .git is a directory), not a worktree checkout
  • Worktree creation fails β€” ensure Git is installed and the workspace is a valid git repository