mark3labs / mark3labs/kit

fix: Streaming stalls mid-generation with Ollama models, requires user input to resume

Open
#50 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Go
Stars
134
Forks
24
Avg merge
8h 59m
Merged PRs (30d)
23

Description

Bug Description

When using Ollama models, streaming output stalls mid-generation.
The agent loop pauses and waits for user input before continuing.
Typing anything (Enter or a short message) causes generation to resume.
Expected behaviour: streaming continues uninterrupted without user intervention.

Steps to Reproduce
1. Run kit with any Ollama model (tested: ollama/gemma4:latest, ollama/qwen3:14b)
2. Ask a question that produces a long or multi-step response
3. Observe output stops mid-generation
4. Type anything and press Enter — generation resumes
Relevant Code / Configuration
temperature: 0.6
top-k: 20
top-p: 0.95
max-tokens: 8192
thinking-level: "off"
max-steps: 50
Affected Component

Streaming / Ollama provider

Kit Version

dev (go install github.com/mark3labs/kit@latest, built 2026-05-25)

Additional Context

Ollama version: 0.30.6
Hardware: Apple M4 Mac mini
No keepalive or poll-interval flags available in kit --help.
Issue occurs consistently across multiple sessions and models.

Checklist
  • I've searched existing issues and this hasn't been reported yet
  • I've tested with the latest version of Kit

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the stall with an Ollama model using the listed generation settings, then trace the streaming/Ollama provider and agent loop involved in resuming after input. Done means long or multi-step responses continue generating without user intervention across the reported Ollama models.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, ollama
Domain
ai
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.