Zed 1.22 Lets AI Agents Pick Their Own Models Mid-Session

Zed 1.22 lets the built-in agent spawn subagents on different models, adds automatic context compaction, and dynamically fetches OpenCode models without app updates.

·
·
Zed 1.22 Lets AI Agents Pick Their Own Models Mid-Session
  • Zed 1.22 ships per-spawn model selection for subagents via the spawn_agent tool.
  • Each subagent card shows which model it is using, enabling mixed-model orchestration.
  • Subagents can now compact their own context automatically for longer tasks.
  • OpenCode Zen and Go models are fetched dynamically, no Zed update required.
  • BYOK support added for GPT-6.1 Sol using an OpenAI API key.
  • Breaking change: ctrl-alt-w now closes the dock, may conflict with existing binds.

Zed 1.22 adds per-subagent model routing

Zed 1.22 expands the editor’s native multi-agent workflow. The release lets the main agent choose a model whenever it spawns a subagent, enables context compaction for long-running workers, and dynamically loads OpenCode’s Zen and Go model catalogs.

One session, several models

The spawn_agent tool now accepts an optional model parameter. When supplied, that parameter selects the model for the new subagent. When omitted, Zed uses the configured subagent model or falls back to the parent agent’s model. Each subagent card displays the model currently in use.

Per-spawn routing lets developers reserve a strong reasoning model, such as Claude Opus or GPT-6 Astra, for planning and review while assigning searches, edits, test runs, and other parallel work to Haiku, Flash, or a local model. That separation can reduce latency and API costs during sessions with several workers.

Contributor itsfuad’s implementation pull request was tested by discovering available model IDs and launching five subagents concurrently. The test mixed ChatGPT subscription models and free OpenRouter models within one parent thread.

Long-running workers retain momentum

Zed now enables context compaction for subagents. File contents, tool output, and conversation history can eventually fill a model’s context window, preventing the worker from continuing. Compaction replaces older history with a shorter summary, preserving room for subsequent steps without expanding the model’s underlying context limit.

Combined with model routing, compaction supports longer planner-worker sessions in which subagents can complete multi-step tasks without frequent restarts. Developers previously had to manage much of that lifecycle through external orchestration code.

OpenCode catalogs update dynamically

Zed now retrieves OpenCode’s Zen and Go model catalogs from the network. Newly listed models can appear in the picker without a Zed binary update or the next weekly release. The editor also resolves OpenCode models more efficiently, reducing lookup latency when switching providers during a session.

Other changes to check

  • Bring your own key for GPT-6.1 Sol: An OpenAI API key can now authenticate direct access to Sol without a subscription tier.
  • New xAI default: Grok 4.7 is now the default xAI model for SuperGrok users.
  • Switchable diff layouts: Diffs opened from the command line can toggle between unified and split views.
  • New dock shortcut: ctrl-alt-w now closes the dock. Because this is a breaking keybinding change, existing custom mappings may conflict with it.

A built-in planner-worker loop

Model routing and context compaction bring a basic planner-worker pattern into the editor. A primary model can decompose work and review results while lower-cost subagents handle repository searches, file-level refactors, edits, and tests in parallel. Each worker remains visible in the same thread with its active model identified.

Frameworks such as LangGraph and CrewAI still provide broader control over workflows, state, and deployment. Zed 1.22 covers the common interactive case directly inside a coding session. The release is available from the stable releases page and through Zed’s in-app updater.

Trending
  • No trending articles

Comments

avatar

Next Reads