zed-industries/zed · error · anyhow::Error
new workspace did not register an agent panel
Error message
new workspace did not register an agent panel
What it means
Error "new workspace did not register an agent panel" thrown in zed-industries/zed.
Source
Thrown at crates/agent_ui/src/agent_panel.rs:4823
// into one new worktree — flag it so the calling agent knows
// the result may not reflect every source worktree's state.
if created.consolidated_worktrees {
worktree_warning = Some(
"The project contained multiple worktrees backed by the same git \
repository, so they were consolidated into a single new worktree. \
The new thread's worktree is based on one of them and may not \
reflect the exact state of the others."
.to_string(),
);
}
// Locate the agent panel on the new workspace. We rely on
// the panel having registered by the time
// `create_worktree_workspace` returns — `open_worktree_workspace`
// explicitly awaits `take_panels_task` and the initial scan.
created
.workspace
.read_with(cx, |workspace, cx| workspace.panel::<AgentPanel>(cx))
.ok_or_else(|| anyhow!("new workspace did not register an agent panel"))?
.downgrade()
} else {
panel.clone()
};
// Both the source panel and any newly-opened worktree workspace
// live in the same OS window (the new workspace is a tab on the
// existing MultiWorkspace), so the original window handle is
// still the right context for the `create_thread_with_options`
// call regardless of which panel ends up the target.
let target_window = window;
// We deliberately don't wait for the new thread's session to
// become available here: there are currently no agent tools that
// operate on sibling threads by session ID, so requiring one would
// just introduce a race for no benefit.
let resolved_agent_id = target_window.update(cx, |_root, window, cx| {
target_panel.update(cx, |panel, cx| {
panel.create_thread_with_options(View on GitHub (pinned to bc538def45)
When it happens
Trigger: Thrown at crates/agent_ui/src/agent_panel.rs:4823 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16).
Data as JSON: /api/errors/01fefc3bcd18aa82.
Report an issue: GitHub.