Adds two built-in agent tools, behind the staff-only `create-thread-tool` feature flag, that let the agent spawn independent sibling threads: - **`create_thread`** creates a new thread with a title and initial prompt. It runs on the user's behalf and shows up in the agent sidebar like a thread the user started themselves, but it runs in the background — the active thread is never interrupted — and it does **not** report results back to the caller. (Use `spawn_agent` when you want the results.) - **`list_agents_and_models`** enumerates the configured agents and, for the native agent, the available models, so the agent can pick a cheaper/faster model for bulk work. The motivating stress test was "spawn 100 threads that each write a haiku, using Haiku instead of Opus." By default the sibling shares the parent's project and worktree. If `use_new_worktree` is set, `create_thread` instead opens a new background workspace backed by fresh linked git worktrees of the project's repos — the same flow you get from the worktree picker's "Create worktree" — and starts the thread there. The new workspace opens as a background tab so it doesn't pull you away from what you're doing. A few notes on the design: - The `agent` crate can't depend on the UI, so there's a `SiblingThreadHost` trait that `agent_ui::AgentPanel` implements and installs on the `NativeAgent`. Tool calls in a native-agent thread route through it. - Sibling threads go through the same `create_agent_thread` → `ConversationView` path as the user-facing "new thread" action, so eviction, persistence, and sidebar rendering match user-created threads. - An explicit `agent`/`model` override doesn't clobber the panel's selected agent or the last-used-agent preference — those are snapshotted and restored around the call. - The worktree path reuses the existing "Create worktree" machinery rather than reimplementing it; the agent flow just opens the new workspace in the background instead of activating it. A couple of things I left out or want to call out: - There's no tool to operate on an already-created sibling by session id. The success payload deliberately omits it, since the session is populated asynchronously and nothing consumes it yet. - When a project has multiple worktrees that are linked worktrees of the *same* underlying repo, they collapse into a single new worktree (they resolve to the same target path). The tool returns a warning in that case rather than failing — and this also fixes a latent collision the manual "Create worktree" flow would hit in the same situation. Release Notes: - N/A
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager (macOS/Linux/Windows).
Other platforms are not yet available:
- Web (tracking discussion)
Developing Zed
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
Zed source code is licensed primarily under GPL-3.0-or-later, with Apache-2.0 components where marked.
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Sponsorship
Zed is developed by Zed Industries, Inc., a for-profit company.
If you’d like to financially support the project, you can do so via GitHub Sponsors. Sponsorships go directly to Zed Industries and are used as general company revenue. There are no perks or entitlements associated with sponsorship.