zed-industries/zed · error · anyhow::Error
Resuming subagent sessions is not supported
Error message
Resuming subagent sessions is not supported
What it means
Default trait-method error for ThreadEnvironment::resume_subagent. The base implementation rejects all calls with this sentinel; environments that support subagent resumption override the method with real behavior.
Solutions
- Only call resume_subagent when the concrete ThreadEnvironment documents subagent support
- Create a new subagent via create_subagent instead of resuming
- Implement resume_subagent in the environment to add support
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at crates/agent/src/thread.rs:774 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/ba70d94c2d9be921.
Report an issue: GitHub.
Appendix: source
Thrown at crates/agent/src/thread.rs:779
pub trait TerminalHandle {
fn id(&self, cx: &AsyncApp) -> Result<acp::TerminalId>;
fn current_output(&self, cx: &AsyncApp) -> Result<acp::TerminalOutputResponse>;
fn wait_for_exit(&self, cx: &AsyncApp) -> Result<Shared<Task<acp::TerminalExitStatus>>>;
fn kill(&self, cx: &AsyncApp) -> Result<()>;
fn was_stopped_by_user(&self, cx: &AsyncApp) -> Result<bool>;
}
pub trait SubagentHandle {
/// The session ID of this subagent thread
fn id(&self) -> acp::SessionId;
/// The current number of entries in the thread.
/// Useful for knowing where the next turn will begin
fn num_entries(&self, cx: &App) -> usize;
/// Runs a turn for a given message and returns both the response and the index of that output message.
fn send(&self, message: String, cx: &AsyncApp) -> Task<Result<String>>;
}
pub trait ThreadEnvironment {
fn create_terminal(
&self,
command: String,
extra_env: Vec<acp::EnvVariable>,
cwd: Option<PathBuf>,
output_byte_limit: Option<u64>,
sandbox_wrap: Option<acp_thread::SandboxWrap>,
cx: &mut AsyncApp,
) -> Task<Result<Rc<dyn TerminalHandle>>>;
fn create_subagent(&self, label: String, cx: &mut App) -> Result<Rc<dyn SubagentHandle>>;
fn resume_subagent(
&self,
_session_id: acp::SessionId,
_cx: &mut App,
) -> Result<Rc<dyn SubagentHandle>> {
Err(anyhow::anyhow!(View on GitHub (pinned to 916fc2b8cb)