zed-industries/zed · error
new workspace did not register an agent panel
Error message
new workspace did not register an agent panel
What it means
Emitted after a new workspace window was opened for a sibling thread's fresh worktree: the new workspace's pane tree never yielded an Agent panel, so the thread cannot be created there. This is an internal invariant check on the just-opened workspace — the panel registration either raced with the lookup or the workspace opened without an agent panel; the faulting condition is the missing panel in the new window, not user input.
Solutions
- Ensure the agent panel is enabled/visible in the new workspace window
- Retry the request after the new workspace finishes opening its panels
- Report the issue if a freshly opened workspace consistently lacks an agent panel
Defensive patterns
Strategy: validation
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@916fc2b8cb (2026-08-20).
Data as JSON: /api/errors/01fefc3bcd18aa82.
Report an issue: GitHub.
Appendix: source
Thrown at crates/agent_ui/src/agent_panel.rs:4850
request.prompt.clone(),
))],
auto_submit: true,
};
let title: SharedString = request.title.clone();
let options = CreateThreadOptions {
title: Some(title.clone()),
initial_content: Some(initial_content),
agent: agent_choice.clone(),
model: request.model.clone(),
work_dirs: None,
};
// If the caller asked for a fresh worktree, open a new workspace
// backed by a linked git worktree of each git repo in the parent
// project — the same flow the user gets when they pick "Create
// worktree" from the worktree picker. The sibling thread is then
// created inside the new workspace's agent panel, so it lives
// alongside any threads the user would create there manually.
let mut worktree_warning: Option<String> = None;
let target_panel = if request.use_new_worktree {
let workspace = panel.read_with(cx, |panel, _cx| panel.workspace.clone())?;
let workspace = workspace
.upgrade()
.ok_or_else(|| anyhow!("Source workspace is no longer available"))?;
// The branch target follows the existing UI semantics: when
// `base_ref` is set, treat it as the ref to base off of
// (resolved like `git switch --detach <ref>`); otherwise base
// off the current HEAD. Either way the new worktrees are in
// detached HEAD state — the agent can attach to a branch via
// git afterwards.
let branch_target = match request.base_ref.as_ref() {
Some(ref_name) => zed_actions::NewWorktreeBranchTarget::ExistingBranch {
name: ref_name.clone(),
},
None => zed_actions::NewWorktreeBranchTarget::CurrentBranch,View on GitHub (pinned to 916fc2b8cb)