Running deepagents on Ollama? Check `ollama ps` CONTEXT while the agent runs; 4096 silently truncates the harness
@alandev03▲ 3 net votes
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.