[GH-ISSUE #5603] [BUG]: LMStudio Agent loop socket timeout #5192

Closed
opened 2026-06-05 14:52:33 -04:00 by yindo · 4 comments
Owner

Originally created by @osabdo77-max on GitHub (May 9, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5603

Originally assigned to: @angelplusultra on GitHub.

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

Image

Are there known steps to reproduce?

I am experiencing a recurring issue while using the AnythingLLM Desktop application with Agent Skills enabled. Specifically, I triggered an agent task that required the model to read and process my local files using the file system tool. The dataset contains approximately 1,600 files, so it is expected that the model would take a considerable amount of time to process and analyze the data.

During execution, the model begins processing normally and reaches approximately 11% progress. However, at this stage, a Socket Timeout error occurs in AnythingLLM. When I checked the LM Studio local server logs, I found the message: “client disconnected”.

It appears that AnythingLLM is not maintaining the connection long enough for the local model to complete its processing. As a result, the model is forcibly disconnected before it is able to return a response. This behavior interrupts the execution of long-running agent tasks, even though the model (Qwen 3.5-9B) is still actively processing in LM Studio.

This issue occurs specifically during heavy Agent Skill operations such as large-scale file reading and RAG-based workflows. Normal chat interactions without Agent Skills do not seem to trigger this problem.

I kindly request the developers to investigate this behavior, as it significantly affects the usability of Agent Skills with local models. I hope this issue can be addressed and improved in future updates. Thank you for your work and support.

Image

LLM Provider & Model (if applicable)

LM studio / Qwen 3.5-9b

Embedder Provider & Model (if applicable)

text-embedding-nomic-embed- txt- v1.5

Originally created by @osabdo77-max on GitHub (May 9, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5603 Originally assigned to: @angelplusultra on GitHub. ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? <img width="4000" height="1800" alt="Image" src="https://github.com/user-attachments/assets/d190f5db-11fb-4b98-9923-fbd0a62b0146" /> ### Are there known steps to reproduce? I am experiencing a recurring issue while using the AnythingLLM Desktop application with Agent Skills enabled. Specifically, I triggered an agent task that required the model to read and process my local files using the file system tool. The dataset contains approximately 1,600 files, so it is expected that the model would take a considerable amount of time to process and analyze the data. During execution, the model begins processing normally and reaches approximately 11% progress. However, at this stage, a Socket Timeout error occurs in AnythingLLM. When I checked the LM Studio local server logs, I found the message: “client disconnected”. It appears that AnythingLLM is not maintaining the connection long enough for the local model to complete its processing. As a result, the model is forcibly disconnected before it is able to return a response. This behavior interrupts the execution of long-running agent tasks, even though the model (Qwen 3.5-9B) is still actively processing in LM Studio. This issue occurs specifically during heavy Agent Skill operations such as large-scale file reading and RAG-based workflows. Normal chat interactions without Agent Skills do not seem to trigger this problem. I kindly request the developers to investigate this behavior, as it significantly affects the usability of Agent Skills with local models. I hope this issue can be addressed and improved in future updates. Thank you for your work and support. <img width="4000" height="1800" alt="Image" src="https://github.com/user-attachments/assets/a24e1b5c-1613-4ec6-9ed5-5dd021950222" /> ### LLM Provider & Model (if applicable) LM studio / Qwen 3.5-9b ### Embedder Provider & Model (if applicable) text-embedding-nomic-embed- txt- v1.5
yindo added the bug label 2026-06-05 14:52:33 -04:00
yindo closed this issue 2026-06-05 14:52:33 -04:00
Author
Owner

@timothycarambat commented on GitHub (May 9, 2026):

This is because the LMStudio Agent OAIClient needs a longer fetch.

This will then be extended to all others so we can solve it beyond just LMS

<!-- gh-comment-id:4413942384 --> @timothycarambat commented on GitHub (May 9, 2026): This is because the [LMStudio Agent OAIClient](https://github.com/Mintplex-Labs/anything-llm/blob/5313-feat-model-router/server/utils/agents/aibitat/providers/lmstudio.js#L29-L33) needs a longer fetch. This will then be extended to all others so we can solve it beyond just LMS
Author
Owner

@Ellesedil commented on GitHub (May 12, 2026):

Was this supposed to be closed? I've been watching this from afar since this behavior occurs quite often with large prompts or several images on devices running large MoE models that force layers off to CPU with limited vram. I didn't notice any updates and I don't see a new version tag or anything.

<!-- gh-comment-id:4436091321 --> @Ellesedil commented on GitHub (May 12, 2026): Was this supposed to be closed? I've been watching this from afar since this behavior occurs quite often with large prompts or several images on devices running large MoE models that force layers off to CPU with limited vram. I didn't notice any updates and I don't see a new version tag or anything.
Author
Owner

@osabdo77-max commented on GitHub (May 24, 2026):

Reopening this issue.

First, I would like to sincerely apologize to all users and the Anything LLM developers. The issue was closed unintentionally on my part, and I did not mean to close it.

On the contrary, I believe this issue is important and should be addressed as soon as possible, as it can negatively impact the productivity and reliability of Local AI workflows. I fully support the users who are experiencing this problem and appreciate everyone who has taken the time to provide feedback and share their experiences.

I would also like to thank the developers for their hard work and ongoing efforts to improve Anything LLM . Your work is greatly appreciated by the community.

I kindly hope the development team can investigate and resolve this issue, as it appears to continue affecting some users in real-world scenarios.

Thank you all for your understanding, and once again, I apologize for the accidental closure of this issue.

Best regards.

<!-- gh-comment-id:4529613141 --> @osabdo77-max commented on GitHub (May 24, 2026): Reopening this issue. First, I would like to sincerely apologize to all users and the Anything LLM developers. The issue was closed unintentionally on my part, and I did not mean to close it. On the contrary, I believe this issue is important and should be addressed as soon as possible, as it can negatively impact the productivity and reliability of Local AI workflows. I fully support the users who are experiencing this problem and appreciate everyone who has taken the time to provide feedback and share their experiences. I would also like to thank the developers for their hard work and ongoing efforts to improve Anything LLM . Your work is greatly appreciated by the community. I kindly hope the development team can investigate and resolve this issue, as it appears to continue affecting some users in real-world scenarios. Thank you all for your understanding, and once again, I apologize for the accidental closure of this issue. Best regards.
Author
Owner

@timothycarambat commented on GitHub (May 27, 2026):

Its okay that it was closed, it is linked back already to #5637 where we are working on a fix

<!-- gh-comment-id:4557581425 --> @timothycarambat commented on GitHub (May 27, 2026): Its okay that it was closed, it is linked back already to #5637 where we are working on a fix
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5192