zed-industries/zed · error
Agent panel is no longer available
Error message
Agent panel is no longer available
What it means
Raised in list_available_agents when the stored WeakEntity handle to the agent panel can no longer be upgraded — the panel entity was dropped before the request was served. This is a lifecycle sentinel for a stale handle: the panel (and typically its workspace) is gone, so agent enumeration cannot proceed. The fault is the dropped panel entity, not the request itself.
Solutions
- Retry the request from a context where the agent panel is still open
- Reopen the agent panel before calling list_agents_and_models
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/agent_ui/src/agent_panel.rs:4867 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/75efd48228a8e8a9.
Report an issue: GitHub.
Appendix: source
Thrown at crates/agent_ui/src/agent_panel.rs:4894
git_ui_core::worktree_service::create_worktree_workspace(
workspace, &action, window, None, cx,
)
})
})?;
let created = creation
.await
.context("failed to create worktree workspace")?;
// The creation flow tells us when the project had multiple
// worktrees of the same underlying repo, which it consolidates
// 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`View on GitHub (pinned to 916fc2b8cb)