Skip to content

v1.18.30: every prompt fails with TypeError (undefined layer node in Effect layer assembly during SystemPrompt.environment) — works on v1.18.20 #48803

Closed

Description

@tintinnkt

Description

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.

Reproduction

macOS 15 (Darwin 27.0.0, arm64, Homebrew install):

opencode run "say hi"   # v1.18.30 -> UnknownError; log shows the TypeError above
# same command with v1.18.20 binary -> works

Environment

  • opencode 1.18.30 (Homebrew, 1.18.30_1), macOS arm64 (Apple Silicon)
  • Provider: zai-coding-plan (GLM), 7 MCP servers configured
  • Logs show sporadic one-off occurrences of the same error on earlier versions (~1/month since July), but v1.18.30 makes it 100% reproducible.

Happy to provide full logs or test a fix build.

Activity

  1. github-actions commented on Sep 13, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. fenio commented on Sep 13, 2026

    @fenio

    Current version is completely unusable under MacOS

  3. DanCanCos commented on Sep 14, 2026

    @DanCanCos

    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.

  4. YurBoiDanny commented on Sep 15, 2026

    @YurBoiDanny

    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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions