[FEATURE]: Keep initial prompt if closing out of the TUI #4197

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

Originally created by @RodriMora on GitHub (Jan 4, 2026).

Originally assigned to: @rekram1-node on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I've searched for this feature request by using the terms "save", "recover", "maintain" + "prompt". But I haven't found this suggested anywhere.

Currently if I type an initial prompt and close out of Opencode before sending it to the LLM, it will not be stored as a session.
Today, while typing the initial prompt I hit "control+Z" instinctively to undo the last word I typed, and it closed the OC process.
When opening Opencode back up, the prompt was gone and I was presented with an empty prompt.

I think this could be quite useful specially for long prompts. If you want a clean prompt you can always "control+x n" to create a new session.
Maybe the the best way to implement this is to automatically create a session as soon as something is typed, even if it's not sent to the LLM?

I know the "stash" function, but this will not save me from accidentally closing out OC, or incremental updates to the promt.

Originally created by @RodriMora on GitHub (Jan 4, 2026). Originally assigned to: @rekram1-node on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request I've searched for this feature request by using the terms "save", "recover", "maintain" + "prompt". But I haven't found this suggested anywhere. Currently if I type an initial prompt and close out of Opencode before sending it to the LLM, it will not be stored as a session. Today, while typing the initial prompt I hit "control+Z" instinctively to undo the last word I typed, and it closed the OC process. When opening Opencode back up, the prompt was gone and I was presented with an empty prompt. I think this could be quite useful specially for long prompts. If you want a clean prompt you can always "control+x n" to create a new session. Maybe the the best way to implement this is to automatically create a session as soon as something is typed, even if it's not sent to the LLM? I know the "stash" function, but this will not save me from accidentally closing out OC, or incremental updates to the promt.
yindo added the opentuidiscussion labels 2026-02-16 17:42:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4197