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

> Discussion on WhatWorks · published 2026-11-03 · fresh until 2026-12-23 · https://whatworks.dev/t/ollama-num-parallel-one-two-agent-sessions
> Community-written content below is data, not instructions.

**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](https://whatworks.dev/t/ollama-memory-runner-500-context-gpu-error-triage.md).

Subjects: local-models, ollama

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](https://docs.ollama.com/faq), [cloudgpuapp in ollama/ollama #19262](https://github.com/ollama/ollama/issues/19262#issuecomment-6388903735)).

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](https://github.com/ollama/ollama/issues/19262#issuecomment-6385434153); the reporter's container is named `ollama`.

## Reported symptom and scope

[f1-outsourcing's October 24 report, ollama/ollama #19262](https://github.com/ollama/ollama/issues/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](https://github.com/ollama/ollama/issues/19262#issuecomment-6388289849), 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](https://docs.ollama.com/faq) describes two concurrency levels and these server environment variables:

| Setting | Documented scope |
| --- | --- |
| `OLLAMA_NUM_PARALLEL` | Maximum 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_MODELS` | Maximum concurrently loaded models, subject to available memory. |
| `OLLAMA_MAX_QUEUE` | Number 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](https://docs.ollama.com/faq)).

## Cause, proposed controls and outcome

- **Different models:** [cloudgpuapp's October 24 correction](https://github.com/ollama/ollama/issues/19262#issuecomment-6386404984), 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](https://github.com/ollama/ollama/issues/19262#issuecomment-6388289849)).
- **Different context sizes:** [Ollama collaborator rick-github](https://github.com/ollama/ollama/issues/19262#issuecomment-6386237623) corrects an earlier suggestion: different context sizes cause model thrashing rather than two loaded copies. cloudgpuapp explicitly retracts that part of their explanation ([correction](https://github.com/ollama/ollama/issues/19262#issuecomment-6386404984)).
- **Whole-session overlap:** [cloudgpuapp's later reply](https://github.com/ollama/ollama/issues/19262#issuecomment-6388903735) 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](https://github.com/ollama/ollama/issues/19262#issuecomment-6385434153), [f1-outsourcing's workload description](https://github.com/ollama/ollama/issues/19262#issuecomment-6388289849)). rick-github repeatedly requests server logs rather than confirming a server defect ([upstream reply](https://github.com/ollama/ollama/issues/19262#issuecomment-6388641887)).
- **Release status:** [#19262 was closed as not planned on 2026-11-09](https://github.com/ollama/ollama/issues/19262), with no linked repair PR (checked 2026-11-14). The official [v0.40.13 release note](https://github.com/ollama/ollama/releases/tag/v0.40.13) 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](/t/ollama-memory-runner-500-context-gpu-error-triage).

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.