Claude Code Subagents and Web Search Through Ollama in 2026: Zero MCP Config, the Models That Auto-Spawn Agents, and the Sign-In Catch

claude-codeollamasubagentsweb-searchlocal-llmsetup-guideai

TL;DR: Claude Code’s two most Anthropic-flavored features — parallel subagents and built-in web search — work when the backend is Ollama instead of Anthropic, with no MCP servers and no third-party API keys. One command (ollama launch claude --model glm-5:cloud) wires all of it. The catch nobody’s headline mentions: web search and cloud models both require a free ollama.com account, and the auto-spawning behavior is tuned for three big cloud models, not the 14B model on your GPU.

  • What you’ll be able to do after this guide: run a Claude Code session against Ollama where the model spawns parallel subagents for file search, code exploration, and research — and searches the live web — without touching an MCP config or an Anthropic API key.
  • What you’ll need: Ollama v0.16.2 or newer (current stable is v0.32.5, July 27, 2026), a free ollama.com account for web search and cloud models, and — for the local path — a GPU with 24 GB+ VRAM and a tool-calling model.
  • What you’ll avoid: the three failure modes that make people conclude this doesn’t work — a model that never triggers subagents, the silent 4K context truncation, and the un-signed-in web search prompt.

Honest take: This is the cheapest way to get the real Claude Code multi-agent workflow — not a knockoff — running without an Anthropic bill. But be honest with yourself about which half you’re using: subagents and search are wired for Ollama’s cloud models (GLM-5, MiniMax-M2.5, Kimi-K2.5), which means your prompts leave the machine. If you came here for fully local, you’ll get subagents with an asterisk and web search that still transits ollama.com. For most solo devs, the cloud-model route on Ollama’s free tier is the right trade.

First, the timeline — because most write-ups get it wrong

Subagents and web search in Claude Code via Ollama are widely miscredited to Ollama’s v0.32 release wave from July 2026. The actual shipping order, straight from the GitHub release history:

  • v0.16.0 (February 12, 2026) introduced the ollama launch command and added GLM-5 and MiniMax-M2.5 to the library.
  • v0.16.2 (February 14, 2026) wired web search into ollama launch claude for cloud models — and, notably, added a settings toggle to disable cloud models entirely for privacy-sensitive machines.
  • The official announcement followed mid-February: subagents running “tasks in parallel, such as file search, code exploration, and research, each in their own context,” with “no MCP servers to configure or API keys required.”
  • v0.17.1 (February 24, 2026) extended web search to any tool-capable model, and v0.17.4 (February 27) fixed tool-call indices in parallel tool calls — the plumbing subagents depend on.

What v0.32.0 (July 11, 2026) actually shipped was the standalone interactive agent — running bare ollama now drops you into Ollama’s own coding agent. Related, but a different product. The July releases matter to this setup for one reason: v0.32.1 (July 16) made web search and fetch prompt you to run ollama signin, which is the error most new users hit first, and v0.32.3 (July 23) restored Claude Code Channels and fixed Anthropic-protocol thinking streams. If you tried this in the spring and it felt flaky, the v0.32.3+ plumbing is meaningfully better.

So: five months of maturity, not a launch-week experiment. That’s the good news buried in the version numbers.

What “subagents” means here — and why no MCP server is involved

Claude Code has a built-in Task tool: give the main agent a complex job and it can delegate pieces to subagents, each running in its own isolated context window, in parallel. Against Anthropic’s API, that’s a Fable or Sonnet orchestrating smaller Claude instances. Against Ollama, the same tool calls hit Ollama’s Anthropic-compatible /v1/messages endpoint — supported since v0.14.0 in January 2026 — and Ollama answers them with whatever model you configured. Nothing about this is an extension or a plugin; it’s the stock Claude Code agent loop pointed at a different server. That’s why there’s no MCP server to install: subagents and search ride the protocol Claude Code already speaks. (If you want Ollama’s search in other MCP clients, that’s a separate, documented Python MCP server route — you don’t need it here.)

The per-model behavior is where expectations need calibrating. Per the announcement, three models trigger subagents on their own when a task warrants it: MiniMax-M2.5, GLM-5, and Kimi-K2.5 — all large MoE models served from Ollama’s cloud. Every other model can still use subagents, but you have to ask: phrases like “use subagents,” “spawn subagents,” or “create subagents” in your prompt force the behavior. That phrasing is not optional politeness — leave a mid-size local model to its own judgment and it will grind through a repo-wide survey serially in one context until it drowns.

The five-minute setup

With Ollama installed and current (ollama -v should print 0.32.x):

ollama signin
ollama launch claude --model glm-5:cloud

ollama signin opens a browser to authenticate your free ollama.com account — this is the “no API keys” fine print. You’re not managing a search-provider key or an Anthropic key, but cloud models and web search both authenticate against your Ollama account. Skip this step and the first search attempt errors out asking for it.

ollama launch claude does the rest: sets ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY, and ANTHROPIC_BASE_URL for the session, installs Claude Code if it’s missing, and starts it pointed at Ollama. You get the normal Claude Code banner with your Ollama model on the model line. We walked through the plumbing — including the manual env-var path for dotfiles and remote GPU boxes — in the Claude Code + Ollama setup guide; everything there still applies.

Then give it a task that deserves parallelism:

> Survey this codebase: use subagents to map the auth flow, the DB layer,
  and the API routes in parallel, then summarize how a request travels.

With a subagent-native model you’ll see Claude Code’s task list fan out — several Task(...) entries running concurrently, each with its own context, reporting back to the orchestrator. Web search needs even less ceremony: ask anything past the model’s training cutoff (“what changed in the MCP spec finalized July 28, 2026?”) and the model issues a search tool call; Ollama runs the search server-side and returns results inline. No provider choice, no key, no config block.

The models that matter, as of August 3, 2026:

ModelCloud tagSubagentsNotes
GLM-5glm-5:cloudAuto-triggersStrongest coder of the trio on our earlier GLM-5.2 testing
MiniMax-M2.5minimax-m2.5:cloudAuto-triggersThe model Ollama’s own demo uses
Kimi-K2.5kimi-k2.5:cloudAuto-triggersBiggest context appetite of the three
qwen3-coder (local)qwen3-coder:30bOn request onlyMoE, 3B active; needs “use subagents” phrasing + 64K context
devstral (local)devstral:24bOn request onlyDense 24B; the dependable local tool-caller pick from our goose and Zed guides

Web search: what’s actually happening under the hood

Ollama’s search is a first-party API: POST https://ollama.com/api/web_search and POST https://ollama.com/api/web_fetch, documented in the web search docs. Standalone use requires an API key from your account; inside ollama launch claude, the wiring and auth are handled for you after ollama signin. Ollama doesn’t publish which upstream search index powers it, and the docs don’t commit to hard free-tier numbers — the launch materials promised “a generous free tier” for individual accounts with higher limits on paid plans, and no cap change has been announced since.

The part privacy-minded readers should sit with: web search transits ollama.com even when your model is 100% local. The search executes on Ollama’s servers, not your machine — that’s unavoidable for a web search, but it means “local setup with web search” is not an air-gapped setup. Your code can stay home; your queries don’t. If that matters, the v0.16.2-era settings toggle that disables cloud features entirely is the honest configuration, and you give up search.

The local-model reality check

Ollama’s Claude Code integration docs list subagents, web search, and web fetch as working against local models, and they do — with three practical limits we hit immediately.

Parallelism is a cloud feature in practice. Three subagents against Ollama’s cloud genuinely run concurrently on Ollama’s GPUs. Three subagents against one local GPU contend for the same weights and KV cache; requests queue, and “parallel” becomes “interleaved.” The workflow still helps — each subagent’s isolated context prevents the main thread from bloating — but don’t expect wall-clock magic from a single RTX 3090-class card. Our sister site’s VRAM-by-model guide covers what hardware actually serves a 24B–30B tool-caller comfortably.

The failure you’ll actually hit: subagents that never spawn. Point Claude Code at qwen3-coder:30b with default settings and ask it to map a codebase, and the likely result is zero Task calls — the model reads files serially until it loses the plot. The mechanics are predictable: Ollama’s VRAM-scaled default context sits at 4K on sub-24GB cards, Claude Code’s system prompt plus tool schemas eat that alive, and a starved model stops attempting structured tool calls. Two changes fix it: the explicit “spawn subagents” phrasing, and a bigger window, set server-wide:

OLLAMA_CONTEXT_LENGTH=65536 ollama serve

Ollama’s own integration guide recommends 64K+ for Claude Code. The silent-truncation failure mode — agent re-reads the same file, forgets instructions mid-task — is the same one we documented in the num_ctx deep dive, and it’s deadlier with subagents because every spawned agent inherits the same starved window.

The hybrid pattern worth stealing. Claude Code resolves subagent models independently of the main model via CLAUDE_CODE_SUBAGENT_MODEL, which “overrides the per-invocation model parameter and the subagent definition’s model frontmatter.” That enables a cost-shaped split: a cloud model as orchestrator with a local model doing subagent grunt work, or the reverse — local orchestrator, cloud subagents only when research needs frontier judgment. Set ANTHROPIC_DEFAULT_HAIKU_MODEL to a small local model too, or Claude Code’s background tasks will 404 hunting for a Haiku your Ollama doesn’t have — trap #2 from our base setup guide.

What it costs

Ollama FreeOllama Pro ($20/mo)Claude Pro ($20/mo)
Cloud modelsLight usage, 1 concurrent modelHigher limits, 3 concurrentn/a — Claude models only
Web searchFree-tier allocationHigher limitsIncluded
Subagent qualityGLM-5-classGLM-5-classSonnet/Opus-class
Your code goes toOllama’s cloud (or nowhere, local)Ollama’s cloudAnthropic

Ollama’s cloud meters by GPU utilization rather than tokens, with usage windows that reset on roughly 5-hour session and weekly cycles per independent breakdowns — Ollama’s own pricing page doesn’t publish hard caps, so treat the free tier as “enough for evaluation and light daily use, not for an agent farm.” The genuinely free path remains local models at unlimited usage — Ollama itself stays MIT-licensed and self-hostable, a point aifoss.dev’s Ollama review covers from the FOSS angle. And if you want cloud-class throughput with full control of the box, renting a GPU and self-hosting Ollama on RunPod splits the difference — your endpoint, your models, hourly billing.

For orchestration patterns once you have parallel agents running — what to fan out, what to keep serial — the playbook in our parallel-agents guide applies unchanged here.

Verdict

Use the cloud-model route. ollama launch claude --model glm-5:cloud after ollama signin delivers the closest thing to the real Claude Code multi-agent experience that exists without an Anthropic subscription, and GLM-5’s auto-spawning behavior is the difference between subagents you use and subagents you demo once. Go local-only if privacy is the requirement, not the preference — you’ll keep subagents-on-request and lose search, and that’s a fair trade for an air gap. The setup that loses: paying $20/month to Ollama and expecting Sonnet-class judgment. If you’re spending $20 either way and don’t need local models at all, Claude Pro with real Claude models is still the stronger agent.

FAQ

Do I need an MCP server for web search in this setup? No. Inside ollama launch claude, search is wired through Ollama’s Anthropic-compatible endpoint automatically. The Python MCP server exists for wiring Ollama search into other MCP clients — see our MCP server roundup for when that’s worth doing.

Is “no API keys required” actually true? Half. There’s no third-party key to create or paste, but web search and cloud models require a free ollama.com account via ollama signin. Direct API use of the search endpoints outside the launch flow does use a key from your account settings.

Do subagents work with a fully local model? Yes, per Ollama’s integration docs — but you must prompt for them (“use subagents”), the model must tool-call reliably (devstral and qwen3-coder are the safe picks), and you need a 64K+ context window. Auto-triggering is documented only for MiniMax-M2.5, GLM-5, and Kimi-K2.5 on Ollama’s cloud.

Does web search work offline or with cloud models disabled? No. Search executes on ollama.com’s servers. Disabling cloud features for privacy also removes search.

Which Ollama version do I need? Anything v0.16.2+ technically works; run current stable (v0.32.5, July 27, 2026) — v0.32.3 fixed Anthropic-protocol thinking streams and restored Claude Code Channels, both of which this workflow leans on.

Sources

Last updated August 3, 2026. Pricing, usage limits, and model availability change frequently; verify current state on the official pages before subscribing.

Was this article helpful?