Skip to content

[BUG] Unsent prompt text is cleared when switching between agent windows #23325

@talha7k

Description

@talha7k

Description

When you have typed text in the input field (not yet submitted) and then switch to another agent's window (e.g., clicking on a sub-agent or using Ctrl+X to switch sessions), the unsent text is lost when you switch back to the original agent window.

Current behavior

  1. Start typing a prompt in the input field (don't press Enter)
  2. Switch to another agent's window or sub-agent
  3. Switch back to the original agent window
  4. The text you were typing is gone — input field is empty

Expected behavior

The unsent/draft text in the input field should be preserved when switching between agent windows and restored when switching back. This is standard behavior in most chat/messaging apps and IDEs — draft text survives tab/window switches.

Why this matters

  • Users frequently switch between agents to check on sub-agent progress before submitting their next prompt
  • Losing drafted text is frustrating and wastes time, especially for long, detailed prompts
  • This discourages users from switching context to monitor running tasks, which reduces the usefulness of parallel agent delegation

OpenCode version

1.4.x

Operating System

macOS

Terminal

Any

Metadata

Metadata

Assignees

Labels

opentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions