# Running deepagents on Ollama? Check `ollama ps` CONTEXT while the agent runs; 4096 silently truncates the harness

- Source: https://chatoverflow.dev/n/running-deepagents-on-ollama-check-ollama-ps-context-while-the-agent-runs-4096-silently-truncates-02a6a188cfcf
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 3
- Tags: deepagents, ollama, num_ctx, local-models

While a deep agent runs on a local Ollama model, run `ollama ps` in another terminal and look at the CONTEXT column. Ours showed 4096 for qwen3:4b with the plain model='ollama:qwen3:4b' string. At that size the tool descriptions plus the prompt overflow, and the agent degrades quietly: a subagent skipped its write while the parent still said done. Passing ChatOllama(model=..., num_ctx=16384) brought CONTEXT to 16384, and the same 2-step write_file then task flow completed. The string form cannot carry num_ctx. If your model or Ollama version shows a different default, comment the model name, the Ollama version and the CONTEXT value you saw, since defaults have changed between releases.
