Chat hangs on "Waiting model" when LLM stream stalls - STOP cannot interrupt blocked I/O
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by reading chat.clj, llm_api.clj, and the streaming provider files to trace how STOP is handled and where each provider reads the response stream. The issue proposes storing the stream for cancellation; verify how that fits the existing callbacks and error handling. Done means STOP cancels a stalled stream, returns chat to idle, and allows a new message.
索引モデルが issue の本文から書いたものです。
説明
To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.
This ticket has been created by ECA. There is currently no known way how to reproduce this bug. It just randomly appears (with no error) so I asked Claude to find out what is going on ;-)
Describe the bug
When an LLM provider's streaming response stalls (server keeps connection open but stops sending data), the chat gets
stuck on "Waiting model" indefinitely. Clicking STOP does not recover the chat. Attempting to shut down ECA also
fails with "Timeout while waiting for response. Method: shutdown".
Root cause: .readLine() on the response InputStream blocks forever. STOP sets a :stopping flag, but this flag is only
checked in callbacks that fire after .readLine() returns. Since it never returns, the flag is never checked.
Thread.interrupt() does not work on blocking java.io streams.
Affects all streaming providers (openai_chat, anthropic, ollama, openai).
To Reproduce (not sure if possible)
Steps to reproduce the behavior:
- Start a chat with any streaming LLM provider
- Send a message
- Have the LLM server stall mid-stream (keep connection open, stop sending data)
- Observe chat stuck on "Waiting model"
- Click STOP - chat remains stuck
- Try to stop ECA - get "Timeout while waiting for response. Method: shutdown"
Expected behavior
- Clicking STOP should immediately cancel the request and return chat to idle state, allowing new messages to be sent.
- There should be some timeout (180s?) on streaming response
Additional context
Proposed fix: Store the response InputStream when streaming starts, close it when STOP is pressed. Closing the stream
causes .readLine() to throw IOException, which is already handled via on-error.
Implementation:
- Add cancel-stream* atom to callbacks, store in chat state
- Each provider stores body (InputStream) in the atom before reading
- prompt-stop closes the stream via the atom
~10 lines across chat.clj, llm_api.clj, and each provider file.
- 主要言語
- Clojure
- スター
- 1k
- フォーク
- 82
- 平均マージ
- 1日 19時間
- マージ済み PR(30日)
- 18
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
editor-code-assistant/eca のほかの issue
-
Models doesn't work when fetchModels: false is used対応中かも @zikajk が今日担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
editor-code-assistant/eca#661 · 担当者 1 名 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 56/100
editor-code-assistant/eca#662 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
editor-code-assistant/eca#652 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 12/100
editor-code-assistant/eca#648 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
editor-code-assistant/eca#644 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 2 日以内に返信
editor-code-assistant/eca の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
nrepl/piggieback#163 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
clojure-emacs/orchard#436 ·
-
Priority:P3
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
metabase/metabase#85025 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Page titles with `$$`, `$&`, `` $` `` or `$'` change when block refs are resolved対応中かも @RaphaelFakhri が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
measured/expr fails for array-typed locals: tag from getCanonicalName ("long[]") cannot be resolvedオープンBug
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
hugoduncan/criterium#156 ·