Skip to content

[Bug]: Stream stalled mid tool-call #18019

Closed as not planned
Closed as not planned

Description

@hosonfung

Bug Description

Hermes still meeting Stream stalled mid tool-call issure when it write larger file. Already fix according to other issue, but still same problem

Image

Steps to Reproduce

  1. ask hermes to create a diagram about local AI meeting notes
  2. Hermes start to research
  3. Hermes start to create diagram
  4. Hermes crash

Expected Behavior

  1. ask hermes to create a diagram about local AI meeting notes
  2. Hermes start to research
  3. Hermes start to create diagram
  4. Herems create diagram successfully

Actual Behavior

  1. ask hermes to create a diagram about local AI meeting notes
  2. Hermes start to research
  3. Hermes start to create diagram
  4. Hermes cannot create diagram and prompt error

Affected Component

CLI (interactive chat)

Messaging Platform (if gateway-related)

No response

Debug Report

Debug report saved locally. Here's a summary of what it contains:

    Environment:
    - Version: 0.11.0 (2026.4.23) [9a145406]
    - OS: Linux 6.6.87.2-microsoft-standard-WSL2 x86_64
    - Python: 3.11.15, OpenAI SDK: 2.32.0
    - Profile: default, Hermes home: ~/.hermes

    Model/Provider:
    - Model: qwen35, Provider: custom (https://xxxxxx/v1/)

    API Keys: None of the standard provider keys are set (using custom provider)

    Features:
    - Toolsets: hermes-cli
    - MCP servers: 0
    - Memory: built-in
    - Gateway: running (systemd user, pid 5904)
    - Platforms: Telegram
    - Cron jobs: 0
    - Skills: 92

    Config overrides: display.streaming: True

    Notable issues from agent.log:
    - Several 404 errors for model qwen35 not found on the custom endpoint (sessions 20260501_001241_79e6a0, 48c3de26b9fc, 3fe820701396) — these happened around 00:19-00:23 when the model name may have been temporarily unavailable or misrouted
    - One API timeout (session c6a923c0cf7e at 00:34 — request timed out after 3 retries)
    - Vision tool errors: "Invalid image source" when an invalid URL/path was provided (22:50)
    - Context length detection failing for qwen35 — defaulting to 256,000 tokens
    - Gateway polling conflicts early on (22:31) from multiple bot instances, but resolved after restart
    - One "Message is too long" Telegram approval failure at 23:15 (fell back to text approval)

    Gateway log: Clean startup at 22:33, Telegram connected and stable since. No user allowlist configured (warning present).

    The full debug report was generated and displayed inline — nothing was uploaded externally since you used --local

Operating System

wsl in win11

Python Version

No response

Hermes Version

No response

Additional Logs / Traceback (optional)

Root Cause Analysis (optional)

No response

Proposed Fix (optional)

No response

Are you willing to submit a PR for this?

  • I'd like to fix this myself and submit a PR

Activity

  1. added
    type/bugSomething isn't working
    P2Medium — degraded but workaround exists
    comp/agentCore agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint
    on Apr 30, 2026
  2. alt-glitch commented on Apr 30, 2026

    @alt-glitch

    Likely duplicate of #15886 — same root cause: large tool-call payloads exceed stale-stream timeout. Fix PR #17392 is open.

  3. alt-glitch commented on Apr 30, 2026

    @alt-glitch

    Likely duplicate of #15886 — same root cause: large tool-call payloads exceed stale-stream timeout. Fix PR #17392 is open.

  4. michaelmanly commented on Apr 30, 2026

    @michaelmanly

    It seems this points to a openai streaming problem. Running npx ai-doctor could help. It can fix broken sse and flush handling with stronger stream completion guards.

  5. unclemusclez commented on May 1, 2026

    @unclemusclez

    i'm also experiencing this on qwen3.6 models with openai compatible endpoints. gemma4 seemed to be running fine.

  6. ajeetfancode commented on May 26, 2026

    @ajeetfancode

    is there any update on this issue?

  7. kshitijk4poor commented on Sep 24, 2026

    @kshitijk4poor

    Closing as a duplicate of #15886 — please follow that issue.

    Already labelled duplicate; alt-glitch triage points to #15886 (large tool-call payload exceeds stale-stream timeout), same 'Stream stalled mid tool-call' error on a custom OpenAI-compatible endpoint, v0.11.0. Report has no logs beyond a screenshot and the debug-report summary; no distinct claim. #15886 is cached in the sweep and is the canonical tracker; main now retries transient mid-tool-call drops (chat_completion_helpers.py L3447-3464, 'Connection dropped mid tool-call; reconnecting').

    If this still reproduces on the latest release, please reopen with the version and a log excerpt.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existsarea/streamingStreaming responses: gateway delivery, provider wirecomp/agentCore agent runtime: loop, agent_init, prompt builder, context-compression, responses endpointduplicateThis issue or pull request already existstype/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions