anomalyco / anomalyco/opencode
Regression in 1.18.30: every prompt crashes with TypeError in SystemPrompt.environment ("a.name") — 1.18.18 works fine
@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
- Install/update to opencode 1.18.30 on Arch Linux (official pacman package, not AUR)
- Run
opencodein any directory - Send any prompt, e.g. "hello"
- Observe: "Failed to send prompt. Unexpected server error. Check server logs for details."
- Check
~/.local/share/opencode/log/— see the TypeError above inSystemPrompt.environment - 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.