[PR #7764] fix: prevent prompt crash when opening new session with existing prompt #12505

Open
opened 2026-02-16 18:17:24 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/7764

State: open
Merged: No


fixes #7541

fixed this fatal error when creating a new session would crash if you had prompt in the textarea.
prompt component in home.tsx is not defined onMount yet, now it handles the timing better and keeps your prompt text (tested with ctrl+x n) when moving to a new session. when selecting new session from the dialog the text is not always preserved.

note: #7702 fixes switched sessions & forks. this fix is for new sessions

before:

https://github.com/user-attachments/assets/01d58e94-002a-4929-b925-4af69b32c4e3

after:

https://github.com/user-attachments/assets/684f27ba-7bb0-4d68-93d9-1e410a962de9

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7764 **State:** open **Merged:** No --- fixes #7541 fixed this fatal error when creating a new session would crash if you had prompt in the textarea. prompt component in home.tsx is not defined onMount yet, now it handles the timing better and keeps your prompt text (tested with `ctrl+x n`) when moving to a new session. when selecting new session from the dialog the text is not always preserved. note: #7702 fixes switched sessions & forks. this fix is for **new** sessions before: https://github.com/user-attachments/assets/01d58e94-002a-4929-b925-4af69b32c4e3 after: https://github.com/user-attachments/assets/684f27ba-7bb0-4d68-93d9-1e410a962de9
yindo added the pull-request label 2026-02-16 18:17:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12505