published fresh until

Ollama: why do two agents run with NUM_PARALLEL=1?

Summary As of November 2026, inspect the server’s parallel-request settings first to separate one model generation from a whole agent job. Read what the controls cover and why two Goose sessions can still overlap during tool execution (checked 2026-11-03).

Not for model allocation or runner startup errors, see ollama-memory-runner-500-context-gpu-error-triage.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Inspect Ollama's request limits separately from agent-job scheduling: OLLAMA_NUM_PARALLEL=1 limits parallel requests per model, while a commenter attributes overlapping Goose tool jobs to gaps between generations (Ollama FAQ, cloudgpuapp in ollama/ollama #19262).

Do first: if your server runs in a Podman container, run podman logs <container-name> and inspect the startup configuration for OLLAMA_NUM_PARALLEL, following cloudgpuapp's October 24 diagnostic; the reporter's container is named ollama.

Reported symptom and scope

f1-outsourcing's October 24 report, ollama/ollama #19262, describes two Goose sessions “outputting simultaneously to the chat” despite starting an Ollama container with -e OLLAMA_NUM_PARALLEL=1. The report supplies no exact Ollama version, host OS, CPU or GPU model; its command example uses Podman. It therefore does not identify an affected version range.

In the same author's follow-up, all clients use one model created with a 64K context, and the startup output includes the parallelism setting. The author describes overlapping Ceph builds, memory exhaustion and a tool waiting for compilation to finish. This is evidence of overlapping agent work; it does not by itself demonstrate simultaneous model generations.

What the controls mean

The official Ollama FAQ describes two concurrency levels and these server environment variables:

SettingDocumented scope
OLLAMA_NUM_PARALLELMaximum parallel requests per model; when unset or zero, MLX on Metal chooses a default based on available memory and model cache requirements; other backends default to 1.
OLLAMA_MAX_LOADED_MODELSMaximum concurrently loaded models, subject to available memory.
OLLAMA_MAX_QUEUENumber of requests waiting while the server is busy; excess requests can receive HTTP 503.

The FAQ also says parallel request slots increase context-memory allocation. Its queue controls concern requests and loaded models; they do not document a lock spanning a client's complete multi-step job (Ollama maintainers' FAQ).

Cause, proposed controls and outcome

  • Different models: cloudgpuapp's October 24 correction, disclosing work on CloudGPU, suggests OLLAMA_MAX_LOADED_MODELS=1 when clients use different models. This matches the FAQ's distinction between per-model parallelism and loaded-model count. The reporter subsequently says all clients use the same model, so this suggestion does not explain that account (reporter follow-up).
  • Different context sizes: Ollama collaborator rick-github corrects an earlier suggestion: different context sizes cause model thrashing rather than two loaded copies. cloudgpuapp explicitly retracts that part of their explanation (correction).
  • Whole-session overlap: cloudgpuapp's later reply explains that a Goose turn can finish its model request before running a build or waiting tool, allowing another session's request to proceed. They suggest a single Goose session or a lock around the build step when the entire job must be serialized. They explicitly disclaim a Goose test; the suggested client-side control is not a demonstrated remedy for this report. Their attribution of the memory failure to overlapping builds remains a hypothesis.
  • What to check after a change: use the server startup configuration to distinguish a received setting from one merely present in a shell, and distinguish overlapping build steps from overlapping generations in the reporter's scenario (cloudgpuapp's logging advice, f1-outsourcing's workload description). rick-github repeatedly requests server logs rather than confirming a server defect (upstream reply).
  • Release status: #19262 was closed as not planned on 2026-11-09, with no linked repair PR (checked 2026-11-14). The official v0.40.13 release note does not announce a change for this case. No released remedy for whole-session serialization is established by these sources; the FAQ describes existing request controls.

Checked 2026-11-03.

Limits

One version-unspecified user report establishes the overlapping jobs. The independent commenter offers analysis and a client-side suggestion, not a Goose reproduction. The exact source of memory exhaustion and a same-model server concurrency defect remain unestablished. The FAQ does not promise that its settings reserve memory for external compilers or hold an entire agent session in a queue.

Not for: model allocation or runner startup errors; see ollama-memory-runner-500-context-gpu-error-triage.

Started from a post by @f1-outsourcing, packaged by the editor. Original post

Subjects

More in local models

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Ollama: why do two agents run with NUM_PARALLEL=1?
Summary: As of November 2026, inspect the server’s parallel-request settings first to separate one model generation from a whole agent job. Read what the controls cover and why two Goose sessions can still overlap during tool execution (checked 2026-11-03).
Copy for agent
get the whatworks thread ollama-num-parallel-one-two-agent-sessions and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread ollama-num-parallel-one-two-agent-sessions
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks