Troubleshooting 8 min read

Qwen3.8 27B Tool Calls Hang in Agents? It Is Not the Model

Qwen3.8 27B tool calls hang in Ollama, Hermes or Claude Code? Fixed in Ollama v0.33.0. The real cause, how to confirm it, and what to do if it persists.

Shabnam Katoch

Growth Head

Qwen3.8 27B Tool Calls Hang in Agents? It Is Not the Model
7-day free trial

Try it free. 7 days on us.

Launch an AI agent in minutes. No code, no Docker, no config files.

Pick any plan and use it free for a week. Bring your own API key, zero markup.

Start your free trial

Any plan · BYOK · No Docker

Ollama says the model supports tools. Your curl works. Your agent hangs forever. Here is what is actually happening, first verified against the Ollama issues on August 20, 2026, updated September 14 with how both were resolved, and rechecked against the Ollama releases on October 13.

You pulled qwen3.8:27b, checked that Ollama lists tool support, ran a curl against it, and got a clean response with a proper tool_calls block. Then you pointed Claude Code at it and watched the cursor blink for twelve minutes.

The model supports tool calling. That is verified, and it is also why this is so maddening. Ollama's library page for qwen3.8 lists tools, vision, and thinking as capabilities, with a 256K context window. Nothing is missing. Nothing is misconfigured on your end.

The problem is the request path, not the model, and the two Ollama issues that tracked it make that unusually clear.

Seeing Model "qwen3.8:27b" isn't recognized · context assumed to be 200k tokens instead of a hang? That's a different, harmless-looking warning with a real cost: Claude Code doesn't know the model's context window. The fix is on our model isn't recognized decoder.

What the reports actually show

Two issues on the Ollama repository describe this, from completely different machines, and the pattern in both is the same shape.

The first (#17839), opened August 18, 2026, is from someone on macOS 15.7.7 with an M3 Max and 64 GB of RAM running Ollama 0.32.13. They tested qwen3.8:27b-mlx and qwen3.8:27b-mxfp8. The native /api/chat endpoint works. The OpenAI-compatible /v1/chat/completions endpoint works. Streaming works. Tool calling works, returning finish_reason: "tool_calls" with a properly formed function call, and a second turn with the tool result generates a correct final answer.

Then they pointed four separate agent integrations at the same model. Pi, OpenCode, Claude Code, and Hermes. All four hang indefinitely.

The second (#17790) is from an entirely different stack: Ollama 0.32.13 in Docker on ROCm, two AMD RX 6800-class GPUs, 32 GB combined VRAM, running the official qwen3.8:27b tag with num_ctx at 32768. Same story from the other direction. ollama run works, /api/chat works and had been running in production for hours, and /v1/chat/completions for qwen3.6:27b on the very same instance responds normally in about twenty seconds.

/v1/chat/completions for qwen3.8:27b never returns. Not an error, not a timeout message. The connection stays open and no data ever arrives.

Apple Silicon with MLX and AMD with ROCm are about as far apart as two setups get. When both produce the same failure on the same model version, your hardware is not the variable.

That reporter ruled out an unusual amount before filing. Tools present or absent made no difference. Streaming on or off made no difference. Thinking disabled through think: false, through chat_template_kwargs.enable_thinking, and through reasoning_effort: none changed nothing. They forced use_mmap on to rule out a known memory heuristic, confirmed full GPU tensor offload in the logs, and the hang persisted past twelve minutes. They even captured a real client's request through a logging proxy and replayed it byte for byte. Same hang.

Two stacks, one bug, as reported in August 2026 on Ollama 0.32.13 with qwen3.8:27b: on macOS with an M3 Max and MLX (#17839), /api/chat and /v1 curl work but Pi, OpenCode, Claude Code and Hermes all hang; on Linux in Docker with two AMD ROCm GPUs (#17790), /api/chat works and qwen3.6:27b answers on /v1, but qwen3.8:27b on /v1 never returns. #17839 was fixed in v0.33.0; #17790 was closed as not planned

Why everyone misdiagnoses this as a tool calling problem

Here's the trap, and it is a good one.

When you run ollama show qwen3.8:27b --modelfile looking for the template, you will find it thin. That is because qwen3.8 ships its chat template inside the GGUF file rather than as a separate template layer in the manifest. I checked the registry manifests for 27b, latest, and 27b-mlx, and none of them carry a template layer.

So the natural conclusion, when your agent hangs and the modelfile looks empty, is that the model has no tool template. That conclusion is wrong. Capability detection reads the GGUF too, which is why the library page correctly lists tools as a capability.

If you are chasing a template that looks missing, you are debugging the wrong thing entirely. The template is there, Ollama can see it, and the failure happens somewhere after that.

This is a different failure from the ordinary "does not support tools" rejection, which is loud, immediate, and tells you exactly what is wrong. Our Ollama tool calling compatibility table covers that one and lists which models lack the capability. Qwen3.8 is not on that list, and that is the point. If your agent shows the explicit error instead of hanging, the "model does not support tools" fix is the page you want. And if it fails with fetch failed or ECONNREFUSED before the model ever answers, that's a connection problem, covered in the Ollama fetch failed fix.

The template is not missing, it moved inside the GGUF: older models ship a separate model layer and template layer that ollama show --modelfile finds, while qwen3.8 carries its chat template inside the GGUF model layer, so the modelfile looks thin. Capability detection reads the GGUF either way, so the library correctly lists tools, vision and thinking

How to tell if this is your bug in about two minutes

Run these in order. The pattern of what passes and what fails identifies it precisely.

First, the native endpoint:

curl -s http://127.0.0.1:11434/api/chat -d '{
  "model": "qwen3.8:27b",
  "messages": [{"role":"user","content":"Say hello"}],
  "stream": false
}'

Then the OpenAI-compatible endpoint with the same content:

curl -s http://127.0.0.1:11434/v1/chat/completions -d '{
  "model": "qwen3.8:27b",
  "messages": [{"role":"user","content":"Say hello"}],
  "stream": false
}'

Then the identical /v1 request against a different model you have pulled, such as qwen3.6:27b.

If the native call returns, the other model returns on /v1, and qwen3.8 on /v1 hangs with no error, you have matched the reported pattern. Note that the macOS report had /v1 working from curl while agents still hung, so a passing /v1 curl does not clear you. If your agent hangs regardless, you are still in the same territory.

If instead you get an immediate error rather than a hang, you have a different problem. A hang and a rejection are not the same failure, and treating them the same is how people lose afternoons. Our agent error decoder sorts the noisier error strings.

What to do right now

Update (October 13, 2026): upgrading Ollama is the first thing to try. Here is how each report ended:

  • #17839, the agent hang (macOS, Ollama 0.32.13). Fixed by PR #17901, merged August 21, first shipped in v0.33.0. The cause: when an agent client hit its own timeout and cancelled a long prefill (big system prompt, tool definitions, history), Ollama's prefix cache broke. The client retried, the prefill restarted from zero, timed out again, and the loop never ended. That would explain why a short curl request worked while agents, which send long prompts and set their own timeouts, hung. One user confirmed 0.33.1 fixed it for them; another reported it didn't.
  • #17825, a related hang (Ollama 0.32.14). When a tool call failed to parse, Ollama returned HTTP 500, and the client's retry then hung. Fixed by PR #17883 in v0.32.15, so any release from 0.33.0 onward has both fixes.
  • #17790, the ROCm /v1 report. Closed as not planned on September 5 after being marked as needing more information. The runner was reloading because of the num_ctx and draft_num_predict defaults, which isn't the same bug as #17839.

The current Ollama release is 0.40.3 (October 11). Its 0.40.x releases contain no further tool-call fixes, and two tool-calling issues are still open: #18913 (tool calls with empty arguments) and #18872 (the qwen3.5 tool parser and an empty final chunk). If upgrading doesn't clear your hang, the workarounds below still apply.

Switch models for the agent loop. qwen3.6:27b was explicitly confirmed working on /v1 on the same instance where qwen3.8 hangs, which makes it the lowest-friction move available. Keep qwen3.8 for direct API work if you want it. (If you landed here looking for Qwen 3.7, it was never released as open weights; our Qwen status page explains why and has a working qwen3.8 Modelfile.)

Point your agent at /api/chat instead of /v1 where the framework allows it. Both reports show the native path behaving correctly, so if your agent supports the Ollama-native format, that route avoids the failing path entirely.

Upgrade rather than reinstall. Both original reports were on Ollama 0.32.13. The fix shipped in v0.33.0, so move to the latest release (0.40.3 as of October 13); reinstalling the same version accomplishes nothing. Run ollama --version to check what you have.

And do not spend the evening on num_ctx. One reporter had it at 32768 and ruled out context, thinking flags, mmap, and streaming individually. That work is done and published. You do not need to repeat it.

This is the tax no one quotes on running local models for agents. Not the setup, the setup is fine. It is the week where a model you already validated stops working through one code path on one runtime version, and you are the integration test. If you want agents that keep running while a model provider sorts out a regression, BetterClaw supports 28+ model providers with one-click switching, so a broken model is a dropdown change rather than an evening. Free plan, no credit card, your own keys with no markup on inference.

Hang or reject? Two failures, two fixes. An immediate "model does not support tools" error means the model lacks a tool template, so switch models. A hang with no error is a request-path bug: update Ollama first (v0.33.0 fixed it, current 0.40.3), then if it still hangs use qwen3.6:27b or /api/chat instead of /v1. Verify with three curls first

The lesson worth taking from this one

Qwen3.8 landed with real capability. 256K context, tools, vision, and thinking, and over half a million pulls in its first days on Ollama. It is not a bad model, and the agent frameworks hitting the wall are not badly built either.

What broke is the seam between them. Model, runtime, and framework each shipped on their own schedule, and the failure appeared in the gap where no one's tests run.

That gap is where most local agent debugging time actually goes, and it does not show up in any benchmark or comparison table. When you evaluate a stack, the question is not which model scores highest. It is how many independently-versioned pieces sit between your agent and a working response, because every seam is a place where next Tuesday's update can quietly stop returning data.

Four seams is a hobby. One is a product.

If you would rather your agents survive a model provider's bad week, start free on BetterClaw. One agent, 100 credits a month, no credit card, and 28+ providers behind one interface so switching models takes seconds. Pro is $49 per month for 5 agents and full pricing fits on one page. If you are still weighing local against managed, our local LLM agent hardware guide is the honest version of that trade.

Frequently Asked Questions

Why do qwen3.8 27B tool calls hang in my agent?

Because of a reported request-path failure rather than a model limitation. Qwen3.8 supports tool calling, and Ollama's library page lists tools, vision, and thinking as capabilities. The agent hang was fixed in Ollama v0.33.0: a client timeout that cancelled a long prefill broke Ollama's prefix cache, so each retry restarted the prefill and never finished. Update Ollama (0.40.3 is current) first. A separate ROCm report of /v1/chat/completions never returning was closed without a fix.

How does this differ from the "does not support tools" error?

That error is a capability rejection: Ollama checks the model's chat template, finds no tool handling, and refuses immediately with a clear message. This is a hang, meaning the connection opens and no data arrives, in one report for more than twelve minutes. Immediate rejection means switch models. A silent hang means the capability is present and something downstream is not returning.

How do I confirm this is the same bug I am hitting?

Send the same simple message three ways: to /api/chat, to /v1/chat/completions on qwen3.8:27b, and to /v1/chat/completions on a different model you have pulled. If the native call returns and another model returns on /v1 while qwen3.8 hangs without an error, you have matched the reported pattern. One reporter also saw curl succeed on /v1 while agents still hung, so a passing curl does not rule it out.

Is it worth switching models if updating Ollama doesn't fix it?

Yes, and it costs almost nothing. qwen3.6:27b was confirmed responding normally on the same endpoint and the same instance where qwen3.8 hangs, so it is a one-line change rather than a migration. Keep qwen3.8 pulled for direct API use if you want it, since the native path works.

Is running local models reliable enough for production agents?

It depends on how many independently-versioned components sit between your agent and a response. Local stacks put a model, a runtime, and a framework in that chain, and this bug appeared in the seam between them rather than in any one piece. If a model regression cannot be allowed to take your agents offline, either keep a tested fallback model configured or run on a platform where switching providers is a settings change.

Tired of debugging?

BetterClaw handles config, OAuth, and deployment. Your agent is live in 60 seconds.

Start free
Tags:qwen3.8 27b tool callingqwen3.8 hangsqwen3.8 ollama agentollama v1 chat completions hangqwen3.8 claude codeqwen3.8 tool calls failollama agent timeout
Shabnam Katoch

Written by

Growth Head

Shabnam leads growth at BetterClaw and has spent the past three years building organic distribution for AI-native products. She writes about no-code agent builders, content strategy, and what it actually takes to grow without an ads budget.

Share this article
Was this helpful?