Zed Adds Ctrl+F Search to AI Agent Threads, Tested on 919k-Token Chats
Zed merges Ctrl+F search into its AI agent panel, letting you grep long conversations with regex, case, and whole-word toggles

- Merged: Zed's PR #57231 adds Ctrl+F / Cmd+F search to the AI agent panel, landing in preview next week.
- Full search bar: Supports regex, case-sensitive, and whole-word toggles with next/prev navigation via Enter, Shift+Enter, F3, and chevron buttons.
- Live results: Search updates in real time as the agent streams new messages, with a debounce only during streaming (not while typing).
- Expanded coverage: Maintainer extended search to cover tool calls, plans, and thought blocks when those sections are expanded.
- Limitations: Collapsed tool output, raw JSON, and terminal scrollback are not indexed; very long user messages may not scroll to the exact match.
- Free feature: Available on Zed's free plan across macOS, Linux, and Windows; no extra cost.
If you have ever scrolled through a 200-message Zed agent thread hunting for that one function name the model mentioned three prompts ago, you know the pain. PR #57231 just landed in Zed's main branch and fixes exactly that: a full search bar inside the agent panel, triggered by the same Ctrl+F / Cmd+F shortcut you already use everywhere else in the editor.
What just shipped
The PR adds a search bar to the agent panel, triggered by Ctrl+F (Cmd+F on macOS), that lets users grep the currently-loaded thread without leaving the agent panel.
It is scoped to the active thread only , not cross-thread or cross-agent , and it searches visible content: user messages, assistant message chunks, and tool-call labels.
The search bar is a custom component built specifically for the agent panel. Because the agent panel is not a standard workspace item, the existing BufferSearchBar + SearchableItem plumbing used by code editors does not apply. Instead, the new bar reuses Zed's SearchQuery for parsing and the same toggle button visuals as the buffer search bar, so it feels immediately familiar.
What it can do
- Next/prev navigation via
Enter/Shift+Enter,F3/Shift+F3, or the chevron buttons in the bar - Case-sensitive, whole-word, and regex toggles , same
Alt+C/Alt+W/Alt+Rshortcuts as the buffer search bar on Linux/Windows - Inline highlights on both markdown-rendered assistant messages and past user messages (routed through the inner
Editor's background highlight API) - Live results during streaming , the bar subscribes to thread updates and refreshes matches as the agent writes new content, with a debounce while text streams in
- Regex error display , a red label appears below the input when your regex is malformed, rather than silently returning zero results
- Independent state from the workspace pane's
BufferSearchBar, both bars can be open simultaneously with different queries
The Zed maintainer who reviewed the PR moved search scanning off the main thread, removed input debounce when typing, and expanded search coverage so it now covers tool calls, plans, and thoughts when those blocks are expanded. A separate performance PR also landed to speed up highlight rendering in the markdown component, which is what made it possible to drop the typing debounce entirely.
What it intentionally skips
The bar does not index everything. Collapsed tool-call output, raw tool-call JSON, terminal scrollback, and collapsed thinking blocks are all excluded. This is a deliberate trade-off: searching inside collapsed content produced large match counts with no visible highlights, which is user-hostile , so only labels are searched for collapsed blocks, since labels are always visible.
There are also a couple of known rough edges worth knowing about:
- Navigating to a match inside a very long user message scrolls the message's top into view, but the actual hit may still be off-screen if the message is taller than the viewport. The maintainer flagged this as high-risk to fix due to the editor scrolling logic involved, and deferred it to a follow-up PR.
- Search highlights inside markdown table cells can be visually offset by a few characters in columns beyond the first , a pre-existing bug in Zed's markdown renderer, not introduced by this PR.
- Plain-text search does not match across triple-backtick fences, since the fence characters live in the markdown source.
Why this matters beyond the headline
The agent panel is where you interact with AI for longer, multi-step tasks, and it shows tool calls as they happen, giving full visibility into what the model is doing. As those threads grow , especially with Zed's parallel agents feature, which lets you run multiple AI agents simultaneously in the same editor window, each working on a different part of your codebase , the inability to search them was becoming a real usability bottleneck. A 919k-token thread (close to the context limit) with over 2,100 regex matches was used during testing, and navigation happened at keyboard autorepeat speed.
The implementation is also a notable example of AI-assisted open-source contribution. The commits were authored by Claude Opus, with the contributor coordinating seven logical commits covering the initial implementation, unit tests, UX fixes, and live streaming support. The Zed maintainer then took the branch, moved computation to a background thread, expanded search coverage, and fixed scrolling bugs before merging.
Availability and cost
The PR merged into main on June 18, and Zed announced it will land in the preview channel next week.
The full editor, including AI features, is available on a free plan covering macOS, Linux, and Windows.
The search feature itself carries no additional cost , it is a core editor capability, not a paid add-on.
To try it once it hits preview, open any agent thread and press Ctrl+F (or Cmd+F on macOS). Dismiss with Esc or the X button, and focus returns automatically to the message input so you can keep typing without an extra click.