Skip to content

tui: pasting a few KB of text renders the whole paste and hangs #52422

Closed as not planned

Description

@ImanJofaris

Summary

Pasting a few KB of text into the TUI prompt renders the entire text and hangs opencode indefinitely. In v1.x pastes were collapsed and did not render the full text, so this is a regression.

Environment

  • opencode version: v2.0.20
  • OS: Windows 11 Pro (Windows NT 10.0.26200, x64)
  • Terminal: TERM=xterm-256color, COLORTERM=truecolor, TERM_PROGRAM unset, WT_SESSION unset (terminal app could not be identified from the environment)
  • Shell: cmd.exe (COMSPEC=C:\WINDOWS\system32\cmd.exe)
  • Install/channel: latest
  • Active plugins: none configured in ~/.config/opencode/opencode.json or opencode.jsonc; a local plugin file exists at ~/.config/opencode/plugins/herdr-agent-state.js

Reproduction

  1. Open opencode v2.0.20 in a terminal (TUI).
  2. Copy roughly 10-100 lines of text (a few KB).
  3. Paste it into the prompt input.
  4. The full pasted text renders in the input and opencode stops responding.

Expected Behavior

The paste is collapsed into a placeholder or summary, as in v1.x, and the TUI stays responsive.

Actual Behavior

The entire pasted text is rendered in the prompt and the TUI hangs. It stays stuck and requires a restart.

Additional Context

  • Regression: v1.x collapsed pastes, v2.0.20 renders the full text.
  • Reproducible consistently with a few KB of text; exact size not measured.
  • Workaround: none found, the user avoids pasting long text.

Activity

  1. github-actions commented on Oct 1, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • Please use the Bug Report template's required Description field with real content. The current body has a Summary section but no Description field.

    Please edit this issue to address the above within 72 hours, or it will be automatically closed.


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

    • #50847: reports TUI paste operations hanging after a clipboard-read timeout; the hang symptom is similar, although the reported trigger differs.

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. github-actions commented on Oct 4, 2026

    @github-actions
    Contributor

    This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 72-hour window.

    Feel free to open a new issue that follows our issue templates.

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions