[GH-ISSUE #5600] [BUG]: Agent chat fails too fast without trying to recover #5189

Closed
opened 2026-06-05 14:52:32 -04:00 by yindo · 1 comment
Owner

Originally created by @lucabrunox on GitHub (May 8, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5600

Originally assigned to: @shatfield4 on GitHub.

How are you running AnythingLLM?

Docker (local)

What happened?

I'm asking Gemini to write an app. At some point it tries to read a file which doesn't exist, and instead of recovering trying a different path it fails the whole process.

It's easy to make it fail, just say write an app abc then modify it to do xyz, and inevitably it will hallucinate but it should have recovered. Gemini CLI for example is able to recover from mistakes and find other paths to success whenever a tool fails:

[backend] info: [AgentHandler] filesystem-write-text-file error: Parent directory does not exist: /app/server/storage/anythingllm-fs/go-mcp-cloudrun/terraform
Image

Am I missing some way to configure this behavior in AnythingLLM?

Are there known steps to reproduce?

Just say to write e.g. a golang app abc then modify it to do xyz, at some point it will try to read a non-existent file and fail instead of trying to recover.

LLM Provider & Model (if applicable)

gemini-3-flash-preview

Embedder Provider & Model (if applicable)

No response

Originally created by @lucabrunox on GitHub (May 8, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5600 Originally assigned to: @shatfield4 on GitHub. ### How are you running AnythingLLM? Docker (local) ### What happened? I'm asking Gemini to write an app. At some point it tries to read a file which doesn't exist, and instead of recovering trying a different path it fails the whole process. It's easy to make it fail, just say write an app abc then modify it to do xyz, and inevitably it will hallucinate but it should have recovered. Gemini CLI for example is able to recover from mistakes and find other paths to success whenever a tool fails: ``` [backend] info: [AgentHandler] filesystem-write-text-file error: Parent directory does not exist: /app/server/storage/anythingllm-fs/go-mcp-cloudrun/terraform ``` <img width="2138" height="1042" alt="Image" src="https://github.com/user-attachments/assets/1441609c-dae7-469d-80e7-f2327dbeb15a" /> Am I missing some way to configure this behavior in AnythingLLM? ### Are there known steps to reproduce? Just say to write e.g. a golang app abc then modify it to do xyz, at some point it will try to read a non-existent file and fail instead of trying to recover. ### LLM Provider & Model (if applicable) gemini-3-flash-preview ### Embedder Provider & Model (if applicable) _No response_
yindo added the possible buginvestigating labels 2026-06-05 14:52:32 -04:00
yindo closed this issue 2026-06-05 14:52:32 -04:00
Author
Owner

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

gemini-3-flash-preview

Google is notorious for these 400s that seemingly come at random. Will look into this because its actually not task specific.

<!-- gh-comment-id:4413954407 --> @timothycarambat commented on GitHub (May 9, 2026): > gemini-3-flash-preview Google is notorious for these 400s that seemingly come at random. Will look into this because its actually not task specific.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5189