TUI: Prompt gets submitted when switching sessions
Description
In case content is present in the input and the user switches to another session, this prompt gets directly submitted in the new session when using the keyboard shortcuts. A video is attached here:
Plugins
No response
OpenCode version
1.1.14
Steps to reproduce
- go into a non-empty session
- type something into the chat input
- switch to another non-empty session
Screenshot and/or share link
https://github.com/user-attachments/assets/bae95d02-f294-4234-8b1c-162556c46191
Operating System
macOS v15
Terminal
Cursor / VSCode
This issue might be a duplicate of existing issues. Please check:
- #4628: Prompt history is shared across separate sessions (related issue where session switching causes unwanted behavior with prompts)
- #2390: Switching to a child session doesn't send subsequent messages to that session but to the parent one (related to session switching and message handling)
Also, since this issue mentions keyboard shortcuts, please check our pinned keybinds documentation: #4997
Feel free to ignore if none of these address your specific case.
+1 on this
Fixed in Opencode v1.1.16
https://github.com/anomalyco/opencode/releases/tag/v1.1.16