Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
docs: Document external agent thread imports (#58242)
Ben Brandt2961f5ae23ff
diff --git a/docs/src/ai/external-agents.md b/docs/src/ai/external-agents.mdindex 81a4ee5d3da..8660cf7594f 100644--- a/docs/src/ai/external-agents.md+++ b/docs/src/ai/external-agents.md@@ -235,6 +235,24 @@ This can be useful if you're in the middle of developing a new agent that speaksIt's also possible to customize environment variables for registry-installed agents like Claude Agent, Codex, and Gemini CLI by using their registry names (`claude-acp`, `codex-acp`, `gemini`) with `"type": "registry"` in your settings.+## Importing Threads {#importing-threads}++Zed can import existing threads from your external agent so they show up in your [Thread History](./agent-panel.md#multiple-threads) alongside the rest of your threads. This is useful when you've been working with Claude Agent, Codex, or another agent elsewhere and want to continue those conversations in Zed.++### Starting an Import++Open the Threads Sidebar with {#kb multi_workspace::ToggleWorkspaceSidebar} and open Thread History by clicking the clock icon at the bottom of the sidebar (or run {#action agents_sidebar::ToggleThreadHistory} from the Command Palette). Then click the **Import Threads** button (the download icon) in the Thread History toolbar.++This opens the **Import External Agent Threads** dialog, which lists every external agent you have configured. Choose the agents you want to import from, then click **Import Threads**. Zed connects to each selected agent, retrieves its sessions over [ACP](https://agentclientprotocol.com), and adds any that aren't already in your history. When the import finishes, a notification reports how many threads were added.++### What to Expect++- **The agent must be configured in Zed.** Only agents you've already set up (see the sections above and [Add More Agents](#add-more-agents)) appear in the dialog.+- **Imported threads are archived.** They're added to Thread History as archived entries; open one to restore it and continue where you left off. See [Managing Multiple Threads](./agent-panel.md#multiple-threads).+- **Only threads tied to a project folder are imported.** Sessions that an agent reports without an associated working directory are skipped.+- **Re-importing is safe.** Threads you've already imported are skipped, so you can run the import again later to pick up new sessions without creating duplicates.+- **Local and remote projects are supported.** Threads are gathered from the agents available in your current local and [remote](../remote-development.md) projects.+## Debugging AgentsWhen using external agents in Zed, you can access the debug view via {#action dev::OpenAcpLogs} from the Command Palette.