You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
v1.18.30: every prompt fails with TypeError (undefined layer node in Effect layer assembly during SystemPrompt.environment) — works on v1.18.20 #48803
Since upgrading to v1.18.30, every prompt fails with a TypeError during system-prompt assembly. The same config works perfectly on v1.18.20 (verified by A/B testing both binaries with an identical ~/.config/opencode/opencode.jsonc).
Error
TypeError: undefined is not an object (evaluating 'a.name')
at resolve (/$bunfs/root/chunk-36bwgd4p.js:2:1659)
at a (/$bunfs/root/chunk-36bwgd4p.js:2:936)
at map (native:1:11)
at <anonymous> (/$bunfs/root/chunk-36bwgd4p.js:2:1626)
at a (/$bunfs/root/chunk-36bwgd4p.js:2:1166)
at map (native:1:11)
at <anonymous> (/$bunfs/root/chunk-36bwgd4p.js:2:1626)
at a (/$bunfs/root/chunk-36bwgd4p.js:2:1166)
at map (native:1:11)
at <anonymous> (/$bunfs/root/chunk-36bwgd4p.js:2:1390)
at SystemPrompt.environment (/$bunfs/root/chunk-n59f7cwr.js:50:13096)
at SystemPrompt.environment (definition) (/$bunfs/root/chunk-n59f7cwr.js:4:14254)
at SessionPrompt.run (/$bunfs/root/chunk-n59f7cwr.js:50:14576)
...
CLI output:
Error: {
"name": "UnknownError",
"data": { "message": "Unexpected server error. Check server logs for details.", "ref": "err_..." }
}
Analysis
The crashing frame is Effect-TS layer-graph assembly. The bundled code contains resolve:(a)=>s.get(a.name)??a (layer-node resolution), and the crash means the visit callback received an undefined layer node — i.e. some service layer in 1.18.30 has an undefined entry in its dependencies.
It happens during SystemPrompt.environment → location-service boot for the session directory. The log repeatedly shows booting location services.
I could not reproduce any config dependency: the crash persists with (a) all plugins removed, (b) all MCP servers removed, (c) a fresh XDG_DATA_HOME/XDG_CONFIG_HOME, and (d) env -i with a minimal environment. This suggests the broken layer dependency is unconditional on this platform.
Same issue. MacOS M-series. Reinstalling didn't help, running lower version worked. Interestingly, uninstalling with brew and installing 1.18.30 from the tap as recommended in the Readme with brew install anomalyco/tap/opencode works perfectly fine, too.
Reacted by Daniel Gordon, Pranav and Henning Schaefer
Same issue. MacOS M-series. Reinstalling didn't help, running lower version worked. Interestingly, uninstalling with brew and installing 1.18.30 from the tap as recommended in the Readme with brew install anomalyco/tap/opencode works perfectly fine, too.
Thanks, this worked for me as well on my macbook (m4)
Activity
github-actions commentedon Sep 13, 2026
This issue might be a duplicate of existing issues. Please check:
TypeError: undefined is not an object (evaluating 'a.name')crash inSystemPrompt.environmenton v1.18.30, LinuxSystemPrompt.environment, confirmed working on earlier versionsfenio commentedon Sep 13, 2026
Current version is completely unusable under MacOS
DanCanCos commentedon Sep 14, 2026
Same issue. MacOS M-series. Reinstalling didn't help, running lower version worked. Interestingly, uninstalling with brew and installing 1.18.30 from the tap as recommended in the Readme with
brew install anomalyco/tap/opencodeworks perfectly fine, too.YurBoiDanny commentedon Sep 15, 2026
Thanks, this worked for me as well on my macbook (m4)