opencode icon indicating copy to clipboard operation
opencode copied to clipboard

TUI: Prompt gets submitted when switching sessions

Open LeonMueller-OneAndOnly opened this issue 1 week ago • 1 comments

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

  1. go into a non-empty session
  2. type something into the chat input
  3. 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

LeonMueller-OneAndOnly avatar Jan 12 '26 15:01 LeonMueller-OneAndOnly

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.

github-actions[bot] avatar Jan 12 '26 15:01 github-actions[bot]

+1 on this

yosit avatar Jan 13 '26 11:01 yosit

Fixed in Opencode v1.1.16

https://github.com/anomalyco/opencode/releases/tag/v1.1.16

LeonMueller-OneAndOnly avatar Jan 13 '26 11:01 LeonMueller-OneAndOnly