anomalyco / anomalyco/opencode
macOS: every prompt fails with "undefined is not an object (evaluating 'a.name')"
Open
@rekram1-node is already working on this.
Since Sep 13, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
macOS: every prompt fails with undefined is not an object
OpenCode starts successfully and creates a session, but every prompt/tool
invocation fails with:
TypeError: undefined is not an object (evaluating 'a.name')
The error occurs in SystemPrompt.environment.
Environment
- OpenCode:
1.18.30 - Installation: Homebrew (
/opt/homebrew/bin/opencode) - macOS Darwin:
24.6.0 - Architecture:
arm64 - Shell:
/bin/zsh - Terminal:
xterm-256color - Model:
opencode-go/glm-5.3-flash - Plugins: none
- LSPs and formatters: disabled
Actual behavior
The prompt fails with:
TypeError: undefined is not an object (evaluating 'a.name')
at resolve (/$bunfs/root/chunk-36bwgd4p.js:2:1659)
...
at SystemPrompt.environment
at SessionPrompt.run
The error reproduces with a clean configuration:
XDG_CONFIG_HOME="$(mktemp -d)" \
XDG_DATA_HOME="$(mktemp -d)" \
opencode
Additional information
OpenCode also reports:
Failed to fetch models.dev
cause=Cause([Fail(TimeoutError)])
However, OpenCode itself starts successfully. The main issue is the
reproducible a.name TypeError when sending a prompt.
Before the update everything worked just fine.
Plugins
none
OpenCode version
1.18.30
Steps to reproduce
- Start OpenCode in any directory.
- Create a new session.
- Send any prompt.
Screenshot and/or share link
Operating System
macOS 15.7.9
Terminal
Ghostty
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.