-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Add Parallel Agents documentation #53535
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
dafc6a6
Add Parallel Agents docs and update AI overview and agent panel
macraig acb5a33
Tweak parallel agents docs based on feedback
macraig 249a4e7
Tiny edits
katie-z-geer 038b59c
Update parallel agents docs for accuracy
macraig 2ed667b
New UI updates and some tweaking
macraig 85b77a2
Merge remote-tracking branch 'origin/main' into docs/parallel-agents
macraig aa8513f
further tweaks
macraig a7ba97d
fix ToggleArchive naming error
macraig 36b63c6
Merge remote-tracking branch 'origin/main' into docs/parallel-agents
macraig 44548f3
update to reflect latest UI changes
macraig 4e302ff
Merge branch 'main' into docs/parallel-agents
maxbrunsfeld 01f7c2a
Rephrase description of archiving, update archive action
maxbrunsfeld 23101c6
small tweak
macraig 90de4fb
update multi-project workspace section
macraig 5f7599f
more tweaks
macraig 391d2f1
Merge remote-tracking branch 'origin/main' into docs/parallel-agents
macraig 4957f5a
Add hooks
macraig 5c145f9
Merge branch 'main' into docs/parallel-agents
macraig aaeb941
Merge remote-tracking branch 'origin/main' into docs/parallel-agents
macraig 21af262
Merge remote-tracking branch 'origin/docs/parallel-agents' into docs/…
macraig 50e351a
Tweak wording for projects and folders
macraig f3dcbed
Update docs/src/tasks.md
macraig 91d76a1
Clarify worktrees are part of the same project
macraig ea5cba7
Merge remote-tracking branch 'origin/docs/parallel-agents' into docs/…
macraig 05deb86
Merge remote-tracking branch 'origin/main' into docs/parallel-agents
macraig cf6718e
Apply suggestions from code review
macraig 8c85923
Update agent-panel.md
macraig 6cbcbd6
Merge branch 'main' into docs/parallel-agents
macraig 5e29bc5
Merge branch 'main' into docs/parallel-agents
macraig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| --- | ||
| title: Parallel Agents - Zed | ||
| description: Run multiple agent threads concurrently using the Threads Sidebar, manage them across projects, and isolate work using Git worktrees. | ||
| --- | ||
|
|
||
| # Parallel Agents | ||
|
|
||
| Parallel Agents lets you run multiple agent threads at once, each working independently with its own agent, context window, and conversation history. The Threads Sidebar is where you start, manage, and switch between them. | ||
|
|
||
| Open the Threads Sidebar with {#kb multi_workspace::ToggleWorkspaceSidebar}. | ||
|
|
||
| > **Note:** From version 0.233.0 onward, the Agent Panel and Threads Sidebar are on the left by default. The Project Panel, Git Panel, and other panels move to the right, keeping the thread list and conversation next to each other. To rearrange panels, right-click any panel icon. | ||
|
|
||
| ## Threads Sidebar {#threads-sidebar} | ||
|
|
||
| The sidebar shows your threads grouped by project. Each project gets its own section with a header. Threads appear below with their title, status indicator, and which agent is running them. Threads running in linked Git worktrees appear under the same project as their main worktree. See [Worktree Isolation](#worktree-isolation). | ||
|
|
||
| To focus the sidebar without toggling it, use {#kb multi_workspace::FocusWorkspaceSidebar}. To search your threads, press {#kb agents_sidebar::FocusSidebarFilter} while the sidebar is focused. | ||
|
|
||
| ### Switching Threads {#switching-threads} | ||
|
|
||
| Click any thread in the sidebar to switch to it. The Agent Panel updates to show that thread's conversation. | ||
|
|
||
| For quick switching without opening the sidebar, use the thread switcher: press {#kb agents_sidebar::ToggleThreadSwitcher} to cycle forward through recent threads, or hold `Shift` while pressing that binding to go backward. This works from both the Agent Panel and the Threads Sidebar. | ||
|
|
||
| ### Thread History {#threads-history} | ||
|
|
||
| To remove a thread from the sidebar, you can archive it by hovering over it and clicking the archive icon that appears. You can also select a thread and press {#kb agent::ArchiveSelectedThread}. Running threads cannot be moved to history until they finish. | ||
|
|
||
| The Thread History view holds all your threads, including ones that you have archived. Toggle it with {#kb agents_sidebar::ToggleThreadHistory} or by clicking the clock icon in the sidebar bottom bar, next to the sidebar toggle. | ||
|
|
||
| To restore a thread, open Thread History and click the thread you want to bring back. Zed moves it back to the thread list and opens it in the Agent Panel. If the thread was running in a Git worktree that was removed, Zed restores the worktree automatically. | ||
|
|
||
| To permanently delete a thread, open Thread History, hover over the thread, and click the trash icon. This removes the thread's conversation history and cleans up any associated worktree data. Deleted threads cannot be recovered. | ||
|
|
||
| You can search your threads in history; search will fuzzy match on thread titles. | ||
|
|
||
| ### Importing External Agent Threads {#importing-threads} | ||
|
|
||
| If you have external agents installed, Zed will detect whether you have existing threads and invite you to import them into Zed. Once you open Thread History, you'll find an import icon button in the Thread History toolbar that lets you import threads at any time. Clicking on it opens a modal where you can select the agents whose threads you want to import. | ||
|
|
||
| ## Running Multiple Threads {#running-multiple-threads} | ||
|
|
||
| Each thread runs independently, so you can send a prompt, open a second thread, and give it a different task while the first continues working. To scope a new thread to a specific project, hover over that project's header in the Threads Sidebar and click the `+` button, or use {#action agents_sidebar::NewThreadInGroup} from the keyboard. See [Creating New Threads](./agent-panel.md#new-thread) for the other entry points. | ||
|
|
||
| Each thread can use a different agent, so you can run Zed's built-in agent in one thread and an [external agent](./external-agents.md) like Claude Code or Codex in another. | ||
|
|
||
| ## Multiple Projects {#multiple-projects} | ||
|
|
||
| The Threads Sidebar can hold multiple projects at once. Each project gets its own group with its own threads and conversation history. | ||
|
|
||
| To add another project to the sidebar, click the **Add Project** button (open-folder icon) in the sidebar bottom bar. The popover that opens lists your recent projects and also provides **Add Local Folders** and **Add Remote Folder** buttons at the bottom. | ||
|
|
||
| ### Multi-Root Folder Projects {#multi-root-folder-projects} | ||
|
|
||
| A single project can contain multiple folders (a multi-root folder project). Agents can then read and write across all of those folders in a single thread. There are two ways to set one up: | ||
|
|
||
| - **From the sidebar:** Click the **Add Project** button, choose **Add Local Folders**, and select multiple folders in the file picker. They open together as one multi-root project. | ||
| - **From the title bar:** Click the project picker (the leftmost project name). For any local entry in the recent projects list, hover it and click the folder-with-plus icon (**Add Folder to this Project**) to merge that project's folders into the current project. | ||
|
|
||
| ## Worktree Isolation {#worktree-isolation} | ||
|
|
||
| If two threads might edit the same files, start one in a new Git worktree to give it an isolated checkout. | ||
|
|
||
| Worktrees are managed from the title bar. Click the worktree picker (to the right of the project picker) to switch between existing worktrees or create a new one. New worktrees are created in a detached HEAD state, so you won't accidentally share a branch between worktrees. | ||
|
|
||
| Once you're in a new worktree, use the branch picker next to the worktree picker to create a new branch or check out an existing one. If the branch you pick is already checked out in another worktree, the current worktree stays in detached HEAD until you choose a different branch. | ||
|
|
||
| After the agent finishes, review the diff and merge the changes through your normal Git workflow. If the thread was running in a linked worktree and no other active threads use it, moving the thread to Thread History saves the worktree's Git state and removes it from disk. Restoring the thread from history restores the worktree. | ||
|
|
||
| ## See Also {#see-also} | ||
|
|
||
| - [Agent Panel](./agent-panel.md): Manage individual threads and configure the agent | ||
| - [External Agents](./external-agents.md): Use Claude Code, Gemini CLI, and other agents | ||
| - [Tools](./tools.md): Built-in tools available in each thread | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.