Post

OpenCode Not Working, stopped my CLI and my Desktop app in the exact same second — two completely separate apps, different installers, different version numbers, both dead at once, zero warning. The cause was one file. The fix was one line. Full thread below 🧵

I'd added five custom subagents to #OpenCode, copied straight from a different AI coding tool I already use daily. Same surface shape: Markdown, YAML frontmatter, a tools: field. Looked identical. Wasn't. Closed my terminal, reopened it minutes later — nothing. Instant refusal, every attempt.

Opened OpenCode Desktop next, assuming the terminal was glitching. Same failure — a genuinely separate app, its own installer, its own version number. Two apps, same instant, same failure. The CLI's error was excellent though: exact file, exact field, exactly what it expected vs. what it got.

Desktop's own log told me almost nothing — a bare "ConfigInvalidError," repeated five times, no file or field named. This is the real shape of OpenCode Not Working: both apps share one config folder and one local server at startup. Break the config anywhere, both go down.

The actual bug - tools: written as a YAML list, when OpenCode's schema wants a map instead — tool name to boolean. Both are valid YAML on their own, just different shapes. All five files I'd added carried the identical mistake, not a stray typo, a whole batch copied wrong from the wrong source.

Fix was one line per file — convert each list to a map, save, relaunch. No reinstall, no cache clear. I almost fooled myself during verification too: checked Desktop's logs right after, still saw old errors, then noticed that log session predated my fix. Stale evidence, not a failed fix.

0 reposts0 likes

5,078 newsletter subscribers actually voted on this story — it won with 69%, ahead of a GPU driver crash and a WSL memory leak. Full OpenCode Not Working postmortem, every log and diff, is linked here: x.com/mdistiqurrah... — worth five minutes if you run more than one AI coding tool side by side.