Skip to content

Intermittent 60s+ delay with "timeout" status on local Ollama models (direct Ollama: 1.3s) #52431

Closed as duplicate

Description

@jeremiah-cp

Description

Environment:
OpenCode 1.18.30, opencode serve on MacBook Pro M2 Max (32GB)
Ollama with qwen3-coder:30b (21GB, 100% GPU, loaded with "Forever" keepalive)
Client via tunnel proxy to opencode serve --port 4096

Symptom:
Simple prompt ("What is 2+2? Reply with just the number.") via OpenCode to local Ollama model:
Takes 67-70 seconds
Client reports "status": "timeout"
But the answer is correct in transcript_tail (model did respond)

Same prompt:
Direct via ollama run qwen3-coder:30b: 1.354 seconds
Via OpenCode to cloud model (Zen/muse-spark-1.3-contributor-free): 11 seconds, clean "status": "idle"
What we ruled out:
Not model-specific (both qwen3-coder:30b and qwen3.6:35b-a3b affected)
Not network (cloud models work fine via same path)
Not system resources (CPU 85% idle, memory 12GB/32GB, GPU 100%)
Not server logs (clean, no errors)
Not plugins (tested with Superpowers and Ponytail removed individually and together - no change)

Plugin context:
Issue occurred with two project-scoped plugins installed:
Superpowers: ctx.session.hook("context") on every session
Ponytail: experimental.chat.system.transform on every message
Removed each individually - no change. Removed both - still slow initially. Cleared ~/.cache/opencode (5MB models.json) + restarted Ollama + restarted serve - issue became intermittent (one fast at 7s, one slow at 67s, then consistently fast at 6-17s).

Current status: Working (6-17s, idle), but root cause unknown.

Question: What in OpenCode's Ollama provider could add 60+ seconds intermittently, with the client timing out but the response eventually completing?

Bug #46506 is related

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Activity

  1. github-actions commented on Oct 1, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    • #46506: Local Ollama Qwen requests are much slower through OpenCode than through direct Ollama calls.
    • #43293: Ollama reasoning models take minutes or hang in OpenCode while direct API requests are fast.
    • #22132: A prior report of simple local Ollama prompts hanging in OpenCode while direct /v1/chat/completions requests work.
  2. jeremiah-cp commented on Oct 1, 2026

    @jeremiah-cp
    Author

    Update: The MaxListenersExceededWarning (11 listeners on EventTarget) still occurs with zero plugins installed.
    Verified:
    ~/de/opencode.json - no plugin key (clean)
    ~/.config/opencode/opencode.json - no plugin key (clean)
    Hindsight removed (separate crash issue, fixed)
    Superpowers and Ponytail removed
    The warning appears in OpenCode core with no third-party plugins loaded. Server keeps running (doesn't crash like the Hindsight case), but the warning persists.
    This suggests a listener leak in OpenCode 1.18.30 itself, not a plugin issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions