Skip to content

TUI can auto-submit whitespace prompt, creating “empty user message” and breaking Claude/OpenAI-compatible proxies #8679

Description

@breeze0015

Description

OpenCode sometimes sends a “user sent an empty message” even when I did not manually submit anything. This can also trigger upstream errors (e.g., Claude/Bedrock: messages: text content blocks must be non-empty) when using OpenAI-compatible proxy layers that translate requests to Anthropic format.

Plugins

No response

OpenCode version

1.1.21

Steps to reproduce

  1. Start OpenCode TUI with a whitespace-only prompt, for example:
    • opencode --prompt " "
    • or opencode --prompt "\n"
  2. Observe that OpenCode auto-submits the prompt on startup and a user message is created even though it contains only whitespace.

Screenshot and/or share link

https://opncd.ai/share/32IIf93w

Operating System

Windows 10

Terminal

opencode-desktop-windows-x64.exe

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 15, 2026
  2. github-actions commented on Jan 15, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. added a commit that references this issue on Jan 15, 2026
    a72ee71
  4. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions