Common Error Troubleshooting
npm / node commands blocked
Section titled “npm / node commands blocked”Symptom
CODEBUDDY_BROKER_DENYBrokered host mkdir requires an available runtime file ruleSensitive content approval timed outCause
A shim script is injected into the NODE_OPTIONS environment variable. It’s attached to the node process, not the sandbox layer.
Fix
env -u NODE_OPTIONS npm installenv -u NODE_OPTIONS npm run buildNote: disabling sandbox won’t help — the problem is in the node process, not the sandbox. Node version is irrelevant too; it’s only that variable.
MCP server won’t connect
Section titled “MCP server won’t connect”Symptom: Not connected
Check in order
- File name (
mcp.json, not.mcp.json) - Valid JSON
- Did you click Trust in the connector page? — config alone doesn’t activate
- Are
command/argscopied from official docs? Guessed fields rarely work
Still failing? Switch approach. Some MCP servers are flaky. For browser automation, a local Playwright driver with an explicit Chromium path is far more reliable.
Some domains unreachable from the sandbox
Section titled “Some domains unreachable from the sandbox”Symptom
fetch failed / 10s timeoutCertain external domains (Google properties, some archive sites) are entirely blocked in sandboxed environments.
Fix Don’t retry ten times — the result won’t change. Ask the user to paste the content, or have them download it as a text file into the workspace.
Build succeeded but the page is stale
Section titled “Build succeeded but the page is stale”Symptom: after rebuilding, the browser shows old content and search can’t find new pages.
Cause The tab cached the old page, and the search index file is content-hashed — the old page is still requesting an index file that no longer exists.
Fix: hard refresh (Cmd + Shift + R), or open a new tab.
File write failures / permission denied
Section titled “File write failures / permission denied”- Is the target directory authorized for the workspace?
- Is it a system directory (
/System,/Library,AppData)? - On macOS, did you approve the first-write prompt?
Scheduled jobs not running or producing wrong output
Section titled “Scheduled jobs not running or producing wrong output”- Does the script require interactive input? (It will hang.)
- Does it write logs to a file? (No logs = undebuggable.)
- Is the working directory correct? (Relative paths resolve differently under cron.)
- Is scraping failing silently? (Source redesign → selector matches nothing.)
Mojibake
Section titled “Mojibake”Scenario: exported CSV shows garbage characters
Fix: export as UTF-8 with BOM. Plain UTF-8 breaks in Excel with non-ASCII content.
Long sessions drifting off topic
Section titled “Long sessions drifting off topic”Cause: too much accumulated irrelevant context.
Fix: start a new session and re-supply key context. Store important conclusions in project memory first so they carry over.
General method for unfamiliar errors
Section titled “General method for unfamiliar errors”- Paste the full error — don’t paraphrase (line numbers and call chains matter)
- Ask for the cause, not just the fix — “why does this happen” beats “how do I fix it”
- Minimize the repro — three lines that reproduce it lock down the scope
- Rule out the environment — different directory, different machine