zed-industries/zed · warning

Thread mentions are only supported for the native agent

Error message

Thread mentions are only supported for the native agent

What it means

confirm_mention_for_thread requires a ThreadStore, which only exists when the conversation runs on Zed's native agent. External ACP agents (Claude Code, Gemini CLI, etc.) keep their own conversation histories, so Zed cannot attach a past thread as a mention and fails fast with this message.

Source

Thrown at crates/agent_ui/src/mention_set.rs:614

        // expected. We're leveraging `cx.on_next_frame` to wait 2 frames and
        // ensure that the layout has been recalculated so that the autoscroll
        // request actually shows the cursor's new position.
        cx.on_next_frame(window, move |_, window, cx| {
            cx.on_next_frame(window, move |_, _, cx| {
                editor.update(cx, |editor, cx| {
                    editor.request_autoscroll(Autoscroll::fit(), cx)
                });
            });
        });
    }

    fn confirm_mention_for_thread(
        &mut self,
        id: acp::SessionId,
        cx: &mut Context<Self>,
    ) -> Task<Result<Mention>> {
        let Some(thread_store) = self.thread_store.clone() else {
            return Task::ready(Err(anyhow!(
                "Thread mentions are only supported for the native agent"
            )));
        };
        let Some(project) = self.project.upgrade() else {
            return Task::ready(Err(anyhow!("project not found")));
        };

        let server = Rc::new(agent::NativeAgentServer::new(
            project.read(cx).fs().clone(),
            thread_store,
        ));
        let delegate =
            AgentServerDelegate::new(project.read(cx).agent_server_store().clone(), None, None);
        let connection = server.connect(delegate, project.clone(), cx);
        cx.spawn(async move |_, cx| {
            let agent = connection.await?;
            let agent = agent.downcast::<agent::NativeAgentConnection>().unwrap();
            let summary = agent

View on GitHub (pinned to bc538def45)

Solutions

  1. Switch the panel back to the native Zed agent before mentioning a thread.
  2. Hide or disable thread suggestions in the picker when thread_store is None (UI fix).
  3. Open the old thread and paste the relevant messages as a text mention instead.
Defensive patterns

Strategy: type-guard

Validate before calling

let thread_mentions_supported = self.thread_store.is_some();
// gate thread suggestions in the picker on this flag

Type guard

fn supports_thread_mentions(thread_store: &Option<Entity<ThreadStore>>) -> bool {
    thread_store.is_some() // present only for the native agent
}

Prevention

When it happens

Trigger: Selecting a thread mention in the mention picker while the active agent is an external/ACP agent, i.e. self.thread_store is None on the mention set.

Common situations: Switching the agent panel from the native Zed agent to an installed ACP agent and then trying to @-mention a previous conversation; picker UI that keeps thread suggestions visible regardless of the active agent.

Related errors


AI-assisted analysis of zed-industries/zed@bc538def45 (2026-08-16). Data as JSON: /api/errors/bf131f36a7182bbd. Report an issue: GitHub.