Skip to content

[BUG]: Agent chat fails too fast without trying to recover #5600

@lucabrunox

Description

@lucabrunox

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

Metadata

Metadata

Assignees

Labels

investigatingCore team or maintainer will or is currently looking into this issuepossible bugBug was reported but is not confirmed or is unable to be replicated.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions