eca icon indicating copy to clipboard operation
eca copied to clipboard

Two chats, one session - buggy tool calls

Open zikajk opened this issue 9 months ago • 3 comments

To upvote this issue, give it a thumbs up. See this list for the most upvoted issues.

Describe the bug When having two chats for one workspace I noticed a strange behavior (with openai-chat but it doesn't probably make any difference).

  1. First chat finished some tool call and nothing is happening.
  2. The second chat is waiting for tool call approval
  3. Approving the tool call in the second chat will result in error: closed in the first chat.
  4. And this is the error I see in shared stderr
{:exception #error {
 :cause EOF reached while reading
 :via
 [{:type java.io.IOException
   :message closed
   :at [jdk.internal.net.http.ResponseSubscribers$HttpResponseInputStream current ResponseSubscribers.java 448]}
  {:type java.io.EOFException
   :message EOF reached while reading
   :at [jdk.internal.net.http.Http2Connection$Http2TubeSubscriber onComplete Http2Connection.java 1885]}]
 :trace
 [[jdk.internal.net.http.Http2Connection$Http2TubeSubscriber onComplete Http2Connection.java 1885]
  [jdk.internal.net.http.common.SSLTube$DelegateWrapper onComplete SSLTube.java 276]
  [jdk.internal.net.http.common.SSLTube$SSLSubscriberWrapper complete SSLTube.java 440]
  [jdk.internal.net.http.common.SSLTube$SSLSubscriberWrapper onComplete SSLTube.java 541]
  [jdk.internal.net.http.common.SubscriberWrapper checkCompletion SubscriberWrapper.java 474]
  [jdk.internal.net.http.common.SubscriberWrapper$DownstreamPusher run1 SubscriberWrapper.java 334]
  [jdk.internal.net.http.common.SubscriberWrapper$DownstreamPusher run SubscriberWrapper.java 259]
  [jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask run SequentialScheduler.java 182]
  [jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask run SequentialScheduler.java 149]
  [jdk.internal.net.http.common.SequentialScheduler$SchedulableTask run SequentialScheduler.java 207]
  [jdk.internal.net.http.common.SequentialScheduler runOrSchedule SequentialScheduler.java 280]
  [jdk.internal.net.http.common.SequentialScheduler runOrSchedule SequentialScheduler.java 233]
  [jdk.internal.net.http.common.SubscriberWrapper outgoing SubscriberWrapper.java 232]
  [jdk.internal.net.http.common.SSLFlowDelegate$Reader processData SSLFlowDelegate.java 540]
  [jdk.internal.net.http.common.SSLFlowDelegate$Reader$ReaderDownstreamPusher run SSLFlowDelegate.java 283]
  [jdk.internal.net.http.common.SequentialScheduler$LockingRestartableTask run SequentialScheduler.java 182]
  [jdk.internal.net.http.common.SequentialScheduler$CompleteRestartableTask run SequentialScheduler.java 149]
  [jdk.internal.net.http.common.SequentialScheduler$SchedulableTask run SequentialScheduler.java 207]
  [java.util.concurrent.ThreadPoolExecutor runWorker ThreadPoolExecutor.java 1144]
  [java.util.concurrent.ThreadPoolExecutor$Worker run ThreadPoolExecutor.java 642]
  [java.lang.Thread run Thread.java 1583]]}}

To Reproduce

  • It is hard to reproduce this one. It looks like it is happening only when one chat has finished tool call and wants to advance while the second chat waits for approval. I hope the error will be helpful enough.

Expected behavior

One chat can't influence the second.

zikajk avatar Feb 09 '26 11:02 zikajk

Oh this one is weird and I wonder if the conection closed is a timeout and not related to 2 chats..., we already handle everything via chat-id so It's hard to see a way of this conflicting 🤔

ericdallo avatar Feb 09 '26 14:02 ericdallo

Yeah, I also don't understand it but it happened twice just right after I approved tool in second chat. Can be coincidence.

zikajk avatar Feb 09 '26 14:02 zikajk

I will keep an eye on that

ericdallo avatar Feb 09 '26 15:02 ericdallo