remotegtmmanager

opencode not working windows 11

Sep 21st, 2026
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.04 KB | Fixit | 0 0
  1. opencode not working windows 11 - quick incident log, CLI + desktop both down same time
  2.  
  3. TICKET
  4. - what: opencode CLI (v1.18.23) and opencode Desktop (v1.18.25) both refuse to start a session
  5. - when: immediately after adding 5 custom subagent .md files to ~/.config/opencode/agents/
  6. - how bad: total, instant, every launch attempt, both apps
  7.  
  8. Q: what did the CLI say?
  9. A:
  10. Configuration is invalid at C:\Users\istiqur\.config\opencode\agents\blog-writer.md
  11. Expected object | undefined, got ["Read","Write","Edit","Grep","Glob"] tools
  12. exact file + exact field + expected type vs actual type. best error message I got all week.
  13.  
  14. Q: what did desktop say?
  15. A:
  16. [error] Failed to load sessions Error: ConfigInvalidError (x5)
  17. [error] Failed to finish bootstrap instance Error: ConfigInvalidError
  18. no file, no field. just a bare error class repeated. useless on its own.
  19.  
  20. Q: was the desktop server itself broken?
  21. A: no. main.log showed it booting clean:
  22. [info] spawning sidecar { url: 'http://127.0.0.1:11956' }
  23. [info] server ready { url: 'http://127.0.0.1:11956' }
  24. it only choked once it tried reading the bad agent files.
  25.  
  26. Q: why would 2 separate apps (different installers, different version numbers) die together?
  27. A: they're not as separate as they look. same config root on disk, same local sidecar server spun up by both at startup. break the config anywhere, both go down.
  28.  
  29. Q: root cause?
  30. A: tools: field written as a YAML list, copied from a different AI coding tool's subagent format:
  31. tools:
  32. - Read
  33. - Write
  34. - Edit
  35. opencode's schema wants a YAML map instead:
  36. tools:
  37. read: true
  38. write: true
  39. edit: true
  40. both valid YAML alone, different node types (list vs map) per yaml 1.2.2 spec. parses fine, fails schema check.
  41.  
  42. Q: how many files affected?
  43. A: all 5 - blog-writer.md, blog-seo.md, blog-reviewer.md, blog-researcher.md, blog-translator.md. not a typo, a whole batch copied wrong.
  44.  
  45. Q: the fix?
  46. A: 1 line pattern per file:
  47. tools:
  48. - - Read
  49. - - Write
  50. - - Edit
  51. + Read: true
  52. + Write: true
  53. + Edit: true
  54. no reinstall, no cache clear.
  55.  
  56. Q: how'd you verify it actually worked?
  57. A: CLI - reran opencode, 0 matches for "invalid"/"error" in output.
  58. desktop - force relaunched, checked the newest log session. almost got fooled here: first log folder I opened still showed old errors, but that session predated the fix (checked timestamp). fresh session = 0 errors in renderer.log and main.log both.
  59.  
  60. BEFORE -> AFTER
  61. CLI startup: fatal -> clean launch
  62. desktop renderer.log: 6 errors -> 0 errors
  63. desktop main.log: no errors -> no errors
  64. bootstrap: failed -> succeeded
  65.  
  66. BONUS (not the bug): opencode.json stores MCP api keys in plaintext. check your own config for the same, keep it out of git.
  67.  
  68. TAKEAWAYS
  69. - config formats don't port between AI tools automatically, even when file shape looks near-identical
  70. - 1 malformed file can take down every entry point if validation is eager + whole-config + fail-closed
  71. - CLI and GUI sharing 1 config root = shared failure modes regardless of separate installers
  72. - error quality varies wildly even inside 1 product - check the CLI first if it exists
  73. - always timestamp-check a log before trusting it during verification
  74.  
  75. full writeup: https://istiquritconsultant.com/workflow-optimization-blogs/opencode-not-working-windows-11/
  76. more postmortems: https://istiquritconsultant.com/workflow-optimization-blogs/
  77. newsletter, free, no spam: https://istiquritconsultant.com/no-spam-tech-newsletter/
  78.  
  79. find me elsewhere:
  80. Medium: https://remoteseoconsultant.medium.com/
  81. X (Twitter): https://x.com/mdistiqurrahman
  82. Dev.to: https://dev.to/remoteseoconsultant
  83. LinkedIn: https://www.linkedin.com/in/md-istiqur-rahman-rabby/
  84. CoderLegion: https://coderlegion.com/user/remoteseoconsultant
  85. Blogger: https://remoteseoconsultant.blogspot.com/
  86. Google Sites: https://sites.google.com/view/remotegtmmanager/
  87. GitHub: https://github.com/istiquritconsultant/blog-archive
  88. Hashnode: https://istiqur-it-consultant.hashnode.dev/
  89. Substack: https://istiquritconsultant.substack.com/
  90.  
Advertisement
Add Comment
Please, Sign In to add comment