Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Summary
The OpenCode TUI crashes with TypeError: undefined is not an object (evaluating 'z().indexOf') when rendering the select dialog (tui/src/ui/dialog-select.tsx). This happens specifically when opening the /sessions selector while an ongoing session is already active. Reported automatically from the crash screen.
Environment
- opencode version: 0.0.0-next-15472
- OS: Linux 7.1.3-arch1-2 (x64)
- Terminal: xterm-256color
- Shell: bash
- Install/channel: next
- Active plugins: /home/atsuomi/.brain/plugin
Reproduction
- Start/be inside an ongoing session (i.e. with an active conversation).
- Open the session picker — type
/sessions(the select dialog for switching sessions). - The TUI crashes with the error below.
Notably, this does not happen in a fresh session: opening /sessions from /new (no active conversation) renders fine. So the crash appears tied to the /sessions dialog being rendered while a session is already in progress.
Expected Behavior
The /sessions select dialog renders its options without crashing, regardless of whether an active session is in progress.
Actual Behavior
The TUI crashed with the following error and stack trace:
TypeError: undefined is not an object (evaluating 'z().indexOf')
at RU (../tui/src/ui/dialog-select.tsx:378:24)
at Ew (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:695:22)
at j_ (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:677:3)
at cw (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:613:67)
at <anonymous> (../tui/src/ui/dialog-select.tsx:429:49)
at Ew (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:695:22)
at j_ (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:677:3)
at e (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:217:75)
at <anonymous> (../tui/src/ui/dialog-select.tsx:425:7)
at G_ (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:189:12)
at <anonymous> (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:1125:23)
at m (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:452:12)
at Ew (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:695:22)
at j_ (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:677:3)
at b (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:250:10)
at m (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:452:12)
at children (../tui/src/ui/dialog-select.tsx:753:26)
at <anonymous> (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:1470:21)
at Ew (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:695:22)
at j_ (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:677:3)
at b (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:250:10)
at <anonymous> (../tui/src/ui/dialog-select.tsx:728:21)
at m (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:452:12)
at <anonymous> (../../node_modules/.bun/@opentui+solid@0.4.3+b9027845aeff97b0/node_modules/@opentui/solid/index.bun.js:288:17)
at Ew (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:695:22)
at j_ (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:677:3)
at e (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:217:75)
at P (../../node_modules/.bun/@opentui+solid@0.4.3+b9027845aeff97b0/node_modules/@opentui/solid/index.bun.js:287:7)
at Ew (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:695:22)
at j_ (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:677:3)
at e (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:217:75)
at A (../../node_modules/.bun/@opentui+solid@0.4.3+b9027845aeff97b0/node_modules/@opentui/solid/index.bun.js:258:5)
at <anonymous> (../tui/src/ui/dialog.tsx:56:5)
at m (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:452:12)
at <anonymous> (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:1470:21)
at Ew (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:695:22)
at j_ (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:677:3)
at g_ (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:786:7)
at sw (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:857:42)
at Y0 (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:813:84)
at t (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/dist/server.js:803:5)
at $ (../../node_modules/.bun/solid-js@1.9.10/node_modules/solid-js/store/dist/server.js:210:5)
at replace (../tui/src/ui/dialog.tsx:171:7)
at run (../tui/src/ui/app.tsx:616:14)
at Y (../../node_modules/.bun/@opentui+keymap@0.4.3+aeceedea454d57be/node_modules/@opentui/keymap/src/index.js:...)
... (truncated)
Additional Context
- Reported automatically from the OpenCode crash screen.
- Crash is triggered by the
/sessionsdialog rendered during an active session; the same dialog works fine from a new (/new) session. - The failure originates in
dialog-select.tsx(around line 378 in the bundled build) where a value is undefined when.indexOfis called, suggesting a possibly-undefined array/string being accessed while rendering the dialog footer/actions. - Crash captured under opencode version
0.0.0-next-15472(next channel).
Activity
github-actions commentedon Jul 13, 2026
This issue might be a duplicate of an existing issue. Please check:
dialog-select.tsxwithundefined is not an object (evaluating '*.indexOf')and an nearly identical stack trace, reported when opening a select/dialog.github-actions commentedon Sep 13, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.