anomalyco / anomalyco/opencode

TUI crash: undefined is not an object (evaluating 'a.background.a')

Open
#41,556 2 comments 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Aug 10, 2026.

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

Description

Description

The opencode TUI crashed with an unexpected error.

Error: undefined is not an object (evaluating 'a.background.a')

Environment

  • opencode version: 1.18.11
  • OS: macOS 25.5.0 (arm64)
  • Terminal: ghostty 1.3.1

Steps to Reproduce

Reported automatically from the opencode crash screen. (TUI was in normal use when it crashed.)

Stack Trace

TypeError: undefined is not an object (evaluating 'a.background.a')
    at nr (/$$bunfs/root/chunk-k157avrj.js:2:99335)
    at cr (/$$bunfs/root/chunk-k157avrj.js:2:105115)
    at fa (/$$bunfs/root/chunk-k157avrj.js:2:104527)
    at <anonymous> (/$$bunfs/root/chunk-k157avrj.js:2:122379)
    at mJ (/$$bunfs/root/chunk-g290w9zp.js:2:9650)
    at p (/$$bunfs/root/chunk-g290w9zp.js:2:9431)
    at F (/$$bunfs/root/chunk-g290w9zp.js:2:3993)
    at init (/$$bunfs/root/chunk-k157avrj.js:2:121883)
    at provider (/$$bunfs/root/chunk-k157avrj.js:2:116982)
    at b (/$$bunfs/root/chunk-g290w9zp.js:2:6673)
    at children (/$$bunfs/root/chunk-k157avrj.js:2:117118)
    at <anonymous> (/$$bunfs/root/chunk-g290w9zp.js:2:14138)
    at mJ (/$$bunfs/root/chunk-g290w9zp.js:2:9650)
    at p (/$$bunfs/root/chunk-g290w9zp.js:2:9431)
    at F (/$$bunfs/root/chunk-g290w9zp.js:2:3993)
    at vJ (/$$bunfs/root/chunk-g290w9zp.js:2:7957)
    at b (/$$bunfs/root/chunk-g290w9zp.js:2:6673)
    at <anonymous> (/$$bunfs/root/chunk-g290w9zp.js:2:14080)
    at mJ (/$$bunfs/root/chunk-g290w9zp.js:2:9650)
    at p (/$$bunfs/root/chunk-g290w9zp.js:2:9431)
    at dJ (/$$bunfs/root/chunk-g290w9zp.js:2:3567)
    at <anonymous> (/$$bunfs/root/chunk-g290w9zp.js:2:14072)
    at b (/$$bunfs/root/chunk-g290w9zp.js:2:6673)
    at <anonymous> (/$$bunfs/root/chunk-g290w9zp.js:2:19878)
    at mJ (/$$bunfs/root/chunk-g290w9zp.js:2:9650)
    at p (/$$bunfs/root/chunk-g290w9zp.js:2:9431)
    at F (/$$bunfs/root/chunk-g290w9zp.js:2:3993)
    at b (/$$bunfs/root/chunk-g290w9zp.js:2:6673)
    at children (/$$bunfs/root/chunk-k157avrj.js:2:117118)
    at <anonymous> (/$$bunfs/root/chunk-g290w9zp.js:2:14138)
    at mJ (/$$bunfs/root/chunk-g290w9zp.js:2:9650)
    at p (/$$bunfs/root/chunk-g290w9zp.js:2:9431)
    at F (/$$bunfs/root/chunk-g290w9zp.js:2:3993)
    at vJ (/$$bunfs/root/chunk-g290w9zp.js:2:7957)
    at b (/$$bunfs/root/chunk-g290w9zp.js:2:6673)
    at <anonymous> (/$$bunfs/root/chunk-g290w9zp.js:2:14080)
    at mJ (/$$bunfs/root/chunk-g290w9zp.js:2:9650)
    at p (/$$bunfs/root/chunk-g290w9zp.js:2:9431)
    at dJ (/$$bunfs/root/chunk-g290w9zp.js:2:3567)
    at <anonymous> (/$$bunfs/root/chunk-g290w9zp.js:2:14072)
    at b (/$$bunfs/root/chunk-g290w9zp.js:2:6673)
    at <anonymous> (/$$bunfs/root/chunk-g290w9zp.js:2:19878)
    at mJ (/$$bunfs/root/chunk-g290w9zp.js:2:9650)
    at p (/$$bunfs/root/chunk-g290w9zp.js:2:9431)
    at ZJ (/$$bunfs/root/chunk-g290w9zp.js:2:11057)
    at rJ (/$$bunfs/root/chunk-g290w9zp.js:2:11931)
    at yZ (/$$bunfs/root/chunk-g290w9zp.js:2:11333)
    at w (/$$bunfs/root/chunk-g290w9zp.js:2:11238)
    at e (/$$bunfs/root/chunk-k157avrj.js:2:113598)
    at <anonymous> (/$$bunfs/root/chunk-0585s4am.js:2:22331)
    at processTicksAndRejections (native:7:39)

Additional Context

Custom agent color configuration in opencode.json:

"agent": {
  "build": { "color": "secondary" },
  "plan": { "color": "warning" },
  "advise": { "color": "accent" },
  "explore": { "color": "success" },
  "general": { "color": "error" }
}

The crash appears to originate from the TUI rendering layer (Ink/React reconciler) when trying to access a .background property on what is likely a color/theme value that is undefined.

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.