opentui: Arrow Up/Down in input cause segfaults #2134

Closed
opened 2026-02-16 17:34:19 -05:00 by yindo · 5 comments
Owner

Originally created by @Isos9 on GitHub (Oct 16, 2025).

Originally assigned to: @thdxr on GitHub.

Hi,

When I use the arrow down or up with opentui, it just crashes the TUI, here is the log:

=== FATAL ERROR OCCURRED ===
Console cache:
2025-10-16T16:50:27.289Z LOG server.connected
2025-10-16T16:50:27.308Z LOG
2025-10-16T16:50:27.313Z LOG {"type":"home"}
2025-10-16T16:50:31.923Z ERROR TypeError: undefined is not an object (evaluating 'store.prompt.input')
Error details:
undefined is not an object (evaluating 'store.prompt.input')
Error
    at <anonymous> (/$bunfs/root/src/index.js:129571:143)
    at runComputation (/$bunfs/root/src/index.js:123052:24)
    at updateComputation (/$bunfs/root/src/index.js:123035:17)
    at runTop (/$bunfs/root/src/index.js:123158:24)
    at runUserEffects (/$bunfs/root/src/index.js:123271:13)
    at runUpdates (/$bunfs/root/src/index.js:123179:20)
    at completeUpdates (/$bunfs/root/src/index.js:123239:15)
    at runUpdates (/$bunfs/root/src/index.js:123180:20)
    at setStore (/$bunfs/root/src/index.js:126741:10)
    at <anonymous> (/$bunfs/root/src/index.js:129463:19)
Originally created by @Isos9 on GitHub (Oct 16, 2025). Originally assigned to: @thdxr on GitHub. Hi, When I use the arrow down or up with opentui, it just crashes the TUI, here is the log: ``` === FATAL ERROR OCCURRED === Console cache: 2025-10-16T16:50:27.289Z LOG server.connected 2025-10-16T16:50:27.308Z LOG 2025-10-16T16:50:27.313Z LOG {"type":"home"} 2025-10-16T16:50:31.923Z ERROR TypeError: undefined is not an object (evaluating 'store.prompt.input') Error details: undefined is not an object (evaluating 'store.prompt.input') Error at <anonymous> (/$bunfs/root/src/index.js:129571:143) at runComputation (/$bunfs/root/src/index.js:123052:24) at updateComputation (/$bunfs/root/src/index.js:123035:17) at runTop (/$bunfs/root/src/index.js:123158:24) at runUserEffects (/$bunfs/root/src/index.js:123271:13) at runUpdates (/$bunfs/root/src/index.js:123179:20) at completeUpdates (/$bunfs/root/src/index.js:123239:15) at runUpdates (/$bunfs/root/src/index.js:123180:20) at setStore (/$bunfs/root/src/index.js:126741:10) at <anonymous> (/$bunfs/root/src/index.js:129463:19) ```
yindo added the opentuibug labels 2026-02-16 17:34:19 -05:00
yindo closed this issue 2026-02-16 17:34:19 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 16, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #3219: opentui not able to use "alt" keybinds - Reports issues with keybinds not working on opentui branch, specifically with alt key combinations on macOS/Ghostty
  • #3220: Unable to run opencode from source outside of packages/opencode directory on opentui branch - Reports that opentui branch has issues when run from outside the packages/opencode directory, with specific error after commit 22f8c228
  • #535: Arrow keys print keycodes instead of navigating after closing opencode - Similar arrow key issues where they print sequences like "29A29A29A29C29D29D29B29B29A29A29A29A" instead of functioning properly
  • #2688: Opencode freezes when pressing option + left arrow key on MacBook with high CPU usage - Reports freezing when using arrow key combinations, though different key combination
  • #1266: Bug: message history restoration corrupts text with attachments - Reports corruption when using arrow keys to navigate message history, though different specific error

The error you're experiencing with "undefined is not an object (evaluating 'store.prompt.input')" appears to be specific to the opentui branch and related to input handling when using arrow keys for navigation.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 16, 2025): This issue might be a duplicate of existing issues. Please check: - #3219: opentui not able to use "alt" keybinds - Reports issues with keybinds not working on opentui branch, specifically with alt key combinations on macOS/Ghostty - #3220: Unable to run opencode from source outside of packages/opencode directory on opentui branch - Reports that opentui branch has issues when run from outside the packages/opencode directory, with specific error after commit 22f8c228 - #535: Arrow keys print keycodes instead of navigating after closing opencode - Similar arrow key issues where they print sequences like "29A29A29A29C29D29D29B29B29A29A29A29A" instead of functioning properly - #2688: Opencode freezes when pressing option + left arrow key on MacBook with high CPU usage - Reports freezing when using arrow key combinations, though different key combination - #1266: Bug: message history restoration corrupts text with attachments - Reports corruption when using arrow keys to navigate message history, though different specific error The error you're experiencing with "undefined is not an object (evaluating 'store.prompt.input')" appears to be specific to the opentui branch and related to input handling when using arrow keys for navigation. Feel free to ignore if none of these address your specific case.
Author
Owner

@Isos9 commented on GitHub (Oct 16, 2025):

Forgot to mention that it's on Alacritty

@Isos9 commented on GitHub (Oct 16, 2025): Forgot to mention that it's on Alacritty
Author
Owner

@thdxr commented on GitHub (Oct 20, 2025):

can you reproduce this on latest? i think we fixed the stack trace so it shows more useful info

@thdxr commented on GitHub (Oct 20, 2025): can you reproduce this on latest? i think we fixed the stack trace so it shows more useful info
Author
Owner

@Isos9 commented on GitHub (Oct 20, 2025):

well now it doesn't crash anymore, it cycle through previous messages

@Isos9 commented on GitHub (Oct 20, 2025): well now it doesn't crash anymore, it cycle through previous messages
Author
Owner

@thdxr commented on GitHub (Oct 21, 2025):

believe this is fixed

@thdxr commented on GitHub (Oct 21, 2025): believe this is fixed
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2134