[GH-ISSUE #5570] [BUG]: File System Access - irratic #5171

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

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

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

Hi,

is this feature working?, or is there specific document notes on how to use it?
LLM: deepseek, v4-flash

do we need to specify the full path in the chat everytime?

@agent what's in the Documents Folder?

Agent is thinking...
{"name":"filesystem-list-directory","arguments":{"path":"Documents"}}
Parsed Tool Call: filesystem-list-directory({"path":"Documents"})
@agent is executing filesystem-list-directory tool { "path": "Documents" }
@agent: Listing directory Documents
Error: ENOENT: no such file or directory, scandir 'C:\Users\xxxxxxx\OneDrive\Documents\Documents'
Agent is thinking...
Done thinking.

It seems like the system is trying to access a subfolder named "Documents" within your main "Documents" folder, which doesn't exist. To see the actual contents of your main Documents folder, try accessing 'C:\Users\xxxxxx\OneDrive\Documents' directly, without the extra "\Documents" at the end.

Unfortunately, I don't have the ability to access your file system or provide a list of files in your Documents folder. The error message indicates that the system is looking for a "Documents" subfolder within the Documents folder, rather than the main Documents folder.

@agent what's in the C:\Users\xxxxxx\OneDrive\Documents folder
Assembling Tool Call: filesystem-list-directory({"path": "C:\Users\peter\OneDrive\Documents"})
@agent is executing filesystem-list-directory tool { "path": "C:\Users\peter\OneDrive\Documents" }
@agent: Listing directory C:\Users\peter\OneDrive\Documents
Found 27 items in C:\Users\peter\OneDrive\Documents
Error encountered while running: The agent model failed to respond: 400 The reasoning_content in the thinking mode must be passed back to the API.

Could not respond to message.
The agent model failed to respond: 400 The reasoning_content in the thinking mode must be passed back to the API.

@agent list the contents of C:\Users\xxxx\OneDrive\Documents

Assembling Tool Call: filesystem-list-directory({"path": "C:\Users\xxxx\OneDrive\Documents", "includeSizes": true})
@agent is executing filesystem-list-directory tool { "path": "C:\Users\xxxx\OneDrive\Documents", "includeSizes": true }

@agent: Listing directory C:\Users\peter\OneDrive\Documents
Found 27 items (19 files, 8 directories) in C:\Users\peter\OneDrive\Documents
Error encountered while running: The agent model failed to respond: 400 The reasoning_content in the thinking mode must be passed back to the API.

Could not respond to message.
The agent model failed to respond: 400 The reasoning_content in the thinking mode must be passed back to the API.

made a mistake in path... then fixed it, but ALLM didn't take the new request
Image

Are there known steps to reproduce?

No response

LLM Provider & Model (if applicable)

No response

Embedder Provider & Model (if applicable)

No response

Originally created by @ohromeo on GitHub (May 3, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5570 ### How are you running AnythingLLM? AnythingLLM desktop app ### What happened? Hi, is this feature working?, or is there specific document notes on how to use it? LLM: deepseek, v4-flash do we need to specify the full path in the chat everytime? **@agent what's in the Documents Folder?** Agent is thinking... {"name":"filesystem-list-directory","arguments":{"path":"Documents"}} Parsed Tool Call: filesystem-list-directory({"path":"Documents"}) @agent is executing `filesystem-list-directory` tool { "path": "Documents" } @agent: Listing directory Documents Error: ENOENT: no such file or directory, scandir 'C:\Users\xxxxxxx\OneDrive\Documents\Documents' Agent is thinking... Done thinking. It seems like the system is trying to access a subfolder named "Documents" within your main "Documents" folder, which doesn't exist. To see the actual contents of your main Documents folder, try accessing 'C:\Users\xxxxxx\OneDrive\Documents' directly, without the extra "\Documents" at the end. Unfortunately, I don't have the ability to access your file system or provide a list of files in your Documents folder. The error message indicates that the system is looking for a "Documents" subfolder within the Documents folder, rather than the main Documents folder. @agent what's in the C:\Users\xxxxxx\OneDrive\Documents folder Assembling Tool Call: filesystem-list-directory({"path": "C:\\Users\\peter\\OneDrive\\Documents"}) @agent is executing `filesystem-list-directory` tool { "path": "C:\\Users\\peter\\OneDrive\\Documents" } @agent: Listing directory C:\Users\peter\OneDrive\Documents Found 27 items in C:\Users\peter\OneDrive\Documents Error encountered while running: The agent model failed to respond: 400 The `reasoning_content` in the thinking mode must be passed back to the API. Could not respond to message. The agent model failed to respond: 400 The `reasoning_content` in the thinking mode must be passed back to the API. **@agent list the contents of C:\Users\xxxx\OneDrive\Documents** Assembling Tool Call: filesystem-list-directory({"path": "C:\\Users\\xxxx\\OneDrive\\Documents", "includeSizes": true}) @agent is executing `filesystem-list-directory` tool { "path": "C:\\Users\\xxxx\\OneDrive\\Documents", "includeSizes": true } @agent: Listing directory C:\Users\peter\OneDrive\Documents Found 27 items (19 files, 8 directories) in C:\Users\peter\OneDrive\Documents Error encountered while running: The agent model failed to respond: 400 The `reasoning_content` in the thinking mode must be passed back to the API. Could not respond to message. The agent model failed to respond: 400 The `reasoning_content` in the thinking mode must be passed back to the API. made a mistake in path... then fixed it, but ALLM didn't take the new request <img width="1085" height="733" alt="Image" src="https://github.com/user-attachments/assets/d5f9d3b2-7a0f-44f7-8a2d-680c1def2bac" /> ### Are there known steps to reproduce? _No response_ ### LLM Provider & Model (if applicable) _No response_ ### Embedder Provider & Model (if applicable) _No response_
yindo added the possible bug label 2026-06-05 14:52:27 -04:00
yindo closed this issue 2026-06-05 14:52:27 -04:00
Author
Owner

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

Error encountered while running: The agent model failed to respond: 400 The reasoning_content in the thinking mode must be passed back to the API.

Fixed already in #5527 - workaround if needed: https://github.com/Mintplex-Labs/anything-llm/issues/5523#issuecomment-4316797794

<!-- gh-comment-id:4371282879 --> @timothycarambat commented on GitHub (May 4, 2026): > Error encountered while running: The agent model failed to respond: 400 The reasoning_content in the thinking mode must be passed back to the API. Fixed already in #5527 - workaround if needed: https://github.com/Mintplex-Labs/anything-llm/issues/5523#issuecomment-4316797794
Author
Owner

@gurodrigues commented on GitHub (May 4, 2026):

For anyone still encountering this error on v1.12.1+ with deepseek-v4-pro or deepseek-v4-flash:

PR #5527 added the missing model names to the #isThinkingModel list, but the actual reasoning_content field from DeepSeek API responses was still being lost during agent tool-call loops. The synthesized empty reasoning_content: "" was being sent back instead of the actual content.

PR #5579 fixes the root cause by capturing and threading reasoning_content through the full agent pipeline (stream capture → tool metadata → chat history → next-turn API call).

<!-- gh-comment-id:4375541232 --> @gurodrigues commented on GitHub (May 4, 2026): For anyone still encountering this error on v1.12.1+ with `deepseek-v4-pro` or `deepseek-v4-flash`: PR #5527 added the missing model names to the `#isThinkingModel` list, but the actual `reasoning_content` field from DeepSeek API responses was still being lost during agent tool-call loops. The synthesized empty `reasoning_content: ""` was being sent back instead of the actual content. PR #5579 fixes the root cause by capturing and threading `reasoning_content` through the full agent pipeline (stream capture → tool metadata → chat history → next-turn API call).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5171