[GH-ISSUE #3666] [BUG]: @agent invocation immediately exits with “Agent session complete” #2364

Closed
opened 2026-02-22 18:29:21 -05:00 by yindo · 3 comments
Owner

Originally created by @heinrihs-s on GitHub (Apr 17, 2025).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3666

How are you running AnythingLLM?

Docker (local)

What happened?

Invoking the @agent function (via chat prompt) immediately prints:

Agent @agent invoked. Swapping over to agent chat. Type /exit to exit agent execution loop early.
Agent session complete.

and then returns to the normal chat prompt—no actions or errors beyond that, and no indication of which step failed.

Attached are screenshots of chat and configuration.

Image
Image
Image
Image

Are there known steps to reproduce?

No response

Originally created by @heinrihs-s on GitHub (Apr 17, 2025). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/3666 ### How are you running AnythingLLM? Docker (local) ### What happened? Invoking the @agent function (via chat prompt) immediately prints: > Agent @agent invoked. Swapping over to agent chat. Type /exit to exit agent execution loop early. > Agent session complete. and then returns to the normal chat prompt—no actions or errors beyond that, and no indication of which step failed. Attached are screenshots of chat and configuration. ![Image](https://github.com/user-attachments/assets/e7a5ac54-2109-49e2-b613-6caf3b804d28) ![Image](https://github.com/user-attachments/assets/fa3aa158-56e9-4a5b-b0b8-a10cffbc2ff0) ![Image](https://github.com/user-attachments/assets/363c80e0-5793-4fc6-a869-fdee2e7e9afe) ![Image](https://github.com/user-attachments/assets/da614f8a-57f1-437a-9b2c-5a8169f50664) ### Are there known steps to reproduce? _No response_
yindo added the possible bug label 2026-02-22 18:29:21 -05:00
yindo closed this issue 2026-02-22 18:29:21 -05:00
Author
Owner

@timothycarambat commented on GitHub (Apr 17, 2025):

Docker (local)

This is not a bug, you are most likely running your Docker container behind NGINX/Apache Server and forgot to add the websocket rule in the server config so it wont upgrade your requests

Relevant comments in past issues:

Solution

https://github.com/Mintplex-Labs/anything-llm/issues/1379#issuecomment-2112829193
https://github.com/Mintplex-Labs/anything-llm/issues/1379#issuecomment-2144028207
https://github.com/Mintplex-Labs/anything-llm/issues/2248

@timothycarambat commented on GitHub (Apr 17, 2025): > Docker (local) This is not a bug, you are most likely running your Docker container behind NGINX/Apache Server and forgot to add the websocket rule in the server config so it wont upgrade your requests Relevant comments in [past issues:](https://github.com/Mintplex-Labs/anything-llm/issues?q=is%3Aissue%20state%3Aclosed%20nginx%20websocket) [Solution](https://github.com/Mintplex-Labs/anything-llm/issues/2248#issuecomment-2339405618) https://github.com/Mintplex-Labs/anything-llm/issues/1379#issuecomment-2112829193 https://github.com/Mintplex-Labs/anything-llm/issues/1379#issuecomment-2144028207 https://github.com/Mintplex-Labs/anything-llm/issues/2248
Author
Owner

@timothycarambat commented on GitHub (Apr 17, 2025):

Since you are in Docker, you can open up the chrome inspector and see the frontend error easily if that WSS issue is the problem. Other than that, grabbing the container logs would also indicate any other issues that might exist - however those would manifest as a visible error as a reply and not silently exit

@timothycarambat commented on GitHub (Apr 17, 2025): Since you are in Docker, you can open up the chrome inspector and see the frontend error easily if that WSS issue is the problem. Other than that, grabbing the container logs would also indicate any other issues that might exist - however those would manifest as a visible error as a reply and not silently exit
Author
Owner

@ml-w commented on GitHub (Jul 20, 2025):

Sorry for digging this up, I am encountering the same error.

In my case, sever is also Docker container routed through another port instead of 3001 by XXX:3001 during run, but it's not behind a nginx proxy. I've also tried the log but it gives nothing more than 'sent_chat' message. I am not sure how I can enable debug-level log as well, for some reason I can't find how to do it for docker containers. The chrome network shows a 'agent-animation.webm' GET request but nothing more. I have tried several models, include local models through lm-studio and online openrouter without success.

Any help is appreciated!

@ml-w commented on GitHub (Jul 20, 2025): Sorry for digging this up, I am encountering the same error. In my case, sever is also Docker container routed through another port instead of 3001 by XXX:3001 during run, but it's not behind a nginx proxy. I've also tried the log but it gives nothing more than 'sent_chat' message. I am not sure how I can enable debug-level log as well, for some reason I can't find how to do it for docker containers. The chrome network shows a 'agent-animation.webm' GET request but nothing more. I have tried several models, include local models through lm-studio and online openrouter without success. Any help is appreciated!
yindo changed title from [BUG]: @agent invocation immediately exits with “Agent session complete” to [GH-ISSUE #3666] [BUG]: @agent invocation immediately exits with “Agent session complete” 2026-06-05 14:46:08 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#2364