anomalyco / anomalyco/opencode

Regression in 1.18.30: every prompt crashes with TypeError in SystemPrompt.environment ("a.name") — 1.18.18 works fine

Open
#48,645 10 comments 18 reactions 1 assignee View on GitHub

@nexxeln is already working on this.

Since Sep 12, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

After updating to opencode 1.18.30 via pacman, every single prompt fails immediately with:

Failed to send prompt. Unexpected server error. Check server logs for details.

This happens on a brand new session, on the very first message, with no tool calls or special input needed. It reproduces identically regardless of model/provider — I saw it with opencode/big-pickle and later with google/gemini-3.8-flash and google/gemini-3.1-pro-preview in the same log, so it isn't provider-specific.

The actual log shows a client-side crash before any request reaches a model:

TypeError: undefined is not an object (evaluating 'a.name')
at resolve (/$bunfs/root/chunk-13bwg24f.js:2:1659)
at a (/$bunfs/root/chunk-13bwg24f.js:2:936)
at map (native:1:11)
at (/$bunfs/root/chunk-13bwg24f.js:2:1626)
at a (/$bunfs/root/chunk-13bwg24f.js:2:1166)
at map (native:1:11)
at (/$bunfs/root/chunk-13bwg24f.js:2:1626)
at a (/$bunfs/root/chunk-13bwg24f.js:2:1166)
at map (native:1:11)
at (/$bunfs/root/chunk-13bwg24f.js:2:1390)
at SystemPrompt.environment (/$bunfs/root/chunk-5gp4k9hv.js:50:13096)
at SessionPrompt.run (/$bunfs/root/chunk-5gp4k9hv.js:50:14576)
at SessionRunState.ensureRunning (/$bunfs/root/chunk-5gp4k9hv.js:50:14545)
at SessionPrompt.loop (/$bunfs/root/chunk-5gp4k9hv.js:50:9849)
at SessionPrompt.prompt (/$bunfs/root/chunk-ct5m76jw.js:6:11695)

I ruled out my own config as the cause: my opencode.jsonc only contains { "$schema": "https://opencode.ai/config.json" }, and I also fully moved ~/.config/opencode aside (mv ~/.config/opencode ~/.config/opencode.bak) and relaunched — the crash still happened identically with a completely fresh/empty config.

Downgrading to 1.18.18 (via the cached pacman package) fixes it immediately — same machine, same everything else. This points to a regression introduced between 1.18.18 and 1.18.30.

Plugins

None

OpenCode version

1.18.30 (regression); confirmed working on 1.18.18 and 1.18.7

Steps to reproduce
  1. Install/update to opencode 1.18.30 on Arch Linux (official pacman package, not AUR)
  2. Run opencode in any directory
  3. Send any prompt, e.g. "hello"
  4. Observe: "Failed to send prompt. Unexpected server error. Check server logs for details."
  5. Check ~/.local/share/opencode/log/ — see the TypeError above in SystemPrompt.environment
  6. Downgrade to 1.18.18 (sudo pacman -U /var/cache/pacman/pkg/opencode-1.18.18-1-x86_64.pkg.tar.zst) — works fine
Screenshot and/or share link

No response

Operating System

Arch Linux (installed via official opencode pacman package)

Terminal

Standard TUI (opencode run in terminal)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.