anomalyco / anomalyco/opencode
Android/Bionic: Bun 1.4.1 splitting:true causes a.name crash
@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
- Build OpenCode 1.18.31 for Android/Bionic/Termux with Bun 1.4.1 using
splitting:true. - Start the compiled OpenCode server.
- Call
/api/referenceor/api/agent. - Observe HTTP 500 with
TypeError: undefined is not an object (evaluating 'a.name'). - Rebuild the exact same source/dependency tree with
splitting:false. - Start that build and call the same endpoints again.
- Observe HTTP 200.
Screenshot and/or share link
No response
Operating System
Android 14
Terminal
Termux
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.