Summary
The TUI crashed with RangeError: Maximum call stack size exceeded. while rendering a list. The stack trace shows unbounded recursion between applyListRenderable and applyListItemChildren (list rendering in the TUI), which points to a rendering path that recurses infinitely instead of terminating.
Environment
- opencode version: 2.0.16
- OS: Windows 10.0.26200 (x64) —
Microsoft Windows NT 10.0.26200.0
- Terminal: TERM=xterm-256color (TERM_PROGRAM unset)
- Shell: cmd.exe (
C:\WINDOWS\system32\cmd.exe)
- Install/channel: release (latest)
- Active plugins: None found
Reproduction
Reported automatically from the OpenCode crash screen; the exact action that triggered the crash is unknown. The crash occurs inside list rendering (applyListRenderable → applyListItemChildren → applyListRenderable …), so any screen that renders a list whose items contain list children could be a candidate (models/sessions list, markdown response with nested lists, dialog with list items).
- Open the TUI in a terminal.
- Trigger rendering of a list (e.g. open a list-based screen or render a message containing nested list items).
- Observe the crash.
Expected Behavior
Lists render without error; deeply nested or self-referential list structures terminate gracefully.
Actual Behavior
The TUI crashes with the crash screen:
RangeError: Maximum call stack size exceeded.
at applyListItemRenderable (B:/~BUN/root/chunk-dw5ecpqt.js:71:3220)
at applyListRenderable (B:/~BUN/root/chunk-dw5ecpqt.js:71:2285)
at applyListItemChildren (B:/~BUN/root/chunk-dw5ecpqt.js:71:3811)
at applyListRenderable (B:/~BUN/root/chunk-dw5ecpqt.js:71:2285)
at applyListItemChildren (B:/~BUN/root/chunk-dw5ecpqt.js:71:3811)
at applyListRenderable (B:/~BUN/root/chunk-dw5ecpqt.js:71:2285)
at applyListItemChildren (B:/~BUN/root/chunk-dw5ecpqt.js:71:3811)
at applyListRenderable (B:/~BUN/root/chunk-dw5ecpqt.js:71:2285)
at applyListItemChildren (B:/~BUN/root/chunk-dw5ecpqt.js:71:3811)
at applyListRenderable (B:/~BUN/root/chunk-dw5ecpqt.js:71:2285)
Additional Context
- The recursion alternates strictly between
applyListRenderable and applyListItemChildren, i.e. a list whose item children re-enter the same list-apply path with no base case — likely a list node that contains itself (directly or via children) or a missing termination check in the renderable-apply loop.
- Crash frequency: unknown (single report so far).
- No workarounds tried.
Summary
The TUI crashed with
RangeError: Maximum call stack size exceeded.while rendering a list. The stack trace shows unbounded recursion betweenapplyListRenderableandapplyListItemChildren(list rendering in the TUI), which points to a rendering path that recurses infinitely instead of terminating.Environment
Microsoft Windows NT 10.0.26200.0C:\WINDOWS\system32\cmd.exe)Reproduction
Reported automatically from the OpenCode crash screen; the exact action that triggered the crash is unknown. The crash occurs inside list rendering (
applyListRenderable→applyListItemChildren→applyListRenderable…), so any screen that renders a list whose items contain list children could be a candidate (models/sessions list, markdown response with nested lists, dialog with list items).Expected Behavior
Lists render without error; deeply nested or self-referential list structures terminate gracefully.
Actual Behavior
The TUI crashes with the crash screen:
Additional Context
applyListRenderableandapplyListItemChildren, i.e. a list whose item children re-enter the same list-apply path with no base case — likely a list node that contains itself (directly or via children) or a missing termination check in the renderable-apply loop.