[BUG]: AnythingLLM Desktop Windows backend crashes on parens in path

Author: the-stanelyCreated Sep 24, 2026Updated Sep 25, 2026
Labelspossible bugDesktop

How are you running AnythingLLM?

AnythingLLM desktop app

What happened?

Windows username containing parentheses → AnythingLLM agent/background process → Bree path validation rejects valid path → job.path undefined → fork(undefined) → backend crash.

Tested with 1.15.0, 1.16.1 and 1.16.2,

Backend logged error: TypeError [ERR_INVALID_ARG_TYPE]: The "modulePath" argument must be of type string or an instance of Buffer or URL. Received undefined

Issue was fixed locally in "user\AppData\Local\Programs\AnythingLLM\resources\backend\node_modules@mintplex-labs\bree\src\job-builder.js" as follows:

const { join } = require('node:path'); +const fs = require('node:fs');

...

  • if (isValidPath(path)) {
  • if (isValidPath(path) || fs.existsSync(path)) { job.path = path;

Note the fix could be AI slop. ChatGPT found the location of the bug, github-copilot fixed it. ChatGPT reviewed the fix and said,

One qualification: I wouldn't necessarily call that the ideal upstream fix. existsSync() proves the path exists, but it bypasses whatever security/format restrictions isValidPath() was intended to enforce.

It's working for me now.

Are there known steps to reproduce?

Run AnythingLLM in a Windows user account with parentheses. Backend quickly crashes and there's no listener on port 3001.

LLM Provider & Model (if applicable)

No response

Embedder Provider & Model (if applicable)

No response

Source: Mintplex-Labs/anything-llm