ollama - 💡(How to fix) Fix gemma4: <channel|> token sometimes emitted after tool call and unprocessed, causing further issue [4 comments, 1 participants]

Official PRs (…)
ON THIS PAGE

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15943Fetched 2026-05-04 04:58:31
View on GitHub
Comments
4
Participants
1
Timeline
9
Reactions
0
Participants
Timeline (top)
commented ×4closed ×2cross-referenced ×1labeled ×1
RAW_BUFFERClick to expand / collapse

What is the issue?

I have noticed that, when calling function, it appears gemma4:26b often (if not always) leaves a "thought <channel|>" before emitting the response, which I suspect might be the cause it doesn’t manage to exit thinking context when it should a few messages afterward.

Logs from an instrumented version of ollama.

Relevant log output

conversation.md

log.txt

OS

Linux

GPU

Nvidia

CPU

AMD

Ollama version

0.0.0 (938ca6e274a9b5546e05674813124ac370b95f69 , including all the changes from 0.22.1)

Using Zed as client

extent analysis

TL;DR

The issue might be resolved by investigating and addressing the "thought <channel>" message left by gemma4:26b, which could be preventing the thinking context from exiting properly.

Guidance

  • Review the provided log files (conversation.md and log.txt) to understand the sequence of events leading up to the issue.
  • Investigate the gemma4:26b function to determine why it leaves a "thought <channel>" message and how this might be related to the failure to exit the thinking context.
  • Consider adding additional logging or instrumentation to the gemma4:26b function to gather more information about its behavior.
  • Look into the ollama version (0.0.0, including changes from 0.22.1) to see if there are any known issues or changes that could be contributing to this problem.

Notes

The issue seems to be related to a specific function (gemma4:26b) and its interaction with the thinking context, but without more information about the function's implementation or the specific requirements of the thinking context, it's difficult to provide a more detailed solution.

Recommendation

Apply workaround: Since the root cause is not immediately clear, it's recommended to apply a workaround by investigating and addressing the "thought <channel>" message issue, rather than upgrading to a potentially fixed version (which is not mentioned in the issue).

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

ollama - 💡(How to fix) Fix gemma4: <channel|> token sometimes emitted after tool call and unprocessed, causing further issue [4 comments, 1 participants]