anomalyco / anomalyco/opencode

Android/Bionic: Bun 1.4.1 splitting:true causes a.name crash

Open
#49,262 1 comment 2 reactions 1 assignee View on GitHub

@kitlangton is already working on this.

Since Sep 16, 2026.

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

Description

Description

Totally not AI-generated

OpenCode 1.18.31 on Android/Bionic crashes before the provider call when compiled with Bun 1.4.1 and splitting:true.

Observed failure:
TypeError: undefined is not an object (evaluating 'a.name')

Affected endpoints:

  • /api/reference → 500
  • /api/agent → 500

A/B results:

  • Bun 1.4.0 compiled build: PASS
  • Bun 1.4.1, splitting:true: FAIL
  • Bun 1.4.1, minify:false, splitting:true: FAIL
  • Bun 1.4.1, splitting:false: PASS
  • Direct source execution under Bun 1.4.1: PASS

So minification and ordinary OpenCode source execution are not required for the bug. The failure tracks specifically with Bun 1.4.1's compiled/embedded splitting:true path on Android/Bionic.

Known workaround:
minify:true, splitting:false

That build returns 200 for /api/config, /api/reference, and /api/agent without any OpenCode source patch.

Related Bun report:
oven-sh/bun#42837

Environment:
Android / Termux / Bionic
OpenCode 1.18.31
Bun 1.4.0 vs 1.4.1
@androidtui/core 0.5.5

Plugins

No response

OpenCode version

1.18.31

Steps to reproduce
  1. Build OpenCode 1.18.31 for Android/Bionic/Termux with Bun 1.4.1 using splitting:true.
  2. Start the compiled OpenCode server.
  3. Call /api/reference or /api/agent.
  4. Observe HTTP 500 with TypeError: undefined is not an object (evaluating 'a.name').
  5. Rebuild the exact same source/dependency tree with splitting:false.
  6. Start that build and call the same endpoints again.
  7. Observe HTTP 200.
Screenshot and/or share link

No response

Operating System

Android 14

Terminal

Termux

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.