Skip to content

Desktop app freezes when pasting very large text into session input #13995

Closed

Description

@ysm-dev

Description

Pasting very large plain text into the session input blocks the desktop UI for a few seconds before it becomes responsive again.

Plugins

No response

OpenCode version

dev (current origin/dev)

Steps to reproduce

  1. Open OpenCode Desktop and go to a session.
  2. Copy a very large plain-text payload (for example a long log file / stack trace).
  3. Paste it into the session input field.
  4. Observe the UI freezes for multiple seconds.

Screenshot and/or share link

No response

Operating System

macOS

Terminal

No response

Activity

  1. github-actions commented on Feb 17, 2026

    @github-actions
    Contributor

    This issue appears to be distinct from other freezing issues in the codebase, though there are some related desktop app performance concerns worth monitoring:

    The specific scenario here (pasting large text into session input) has its own performance characteristics that should be investigated separately.

  2. added
    perfIndicates a performance issue or need for optimization
    webRelates to opencode on web / desktop
    on Feb 17, 2026
  3. agustaf9 commented on Feb 23, 2026

    @agustaf9

    Sometimes freezes for several minutes for me

  4. ysm-dev commented on Feb 26, 2026

    @ysm-dev
    ContributorAuthor

    This was fixed in commit 7e681b0 ("fix(app): large text pasted into prompt-input causes main thread lock"). The fix optimizes the prompt-input parsing by avoiding unnecessary regex replacements on every buffer flush, short-circuiting text joining for single-part inputs, and using a fast regex test instead of allocating a trimmed string for the empty-check. These changes eliminate the main-thread lock when pasting large text.

  5. eaigner commented on Aug 17, 2026

    @eaigner

    Still happens, this is not fixed. Pasted a stack trace in there and it locked up completely.

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

Metadata

Metadata

Assignees

Labels

perfIndicates a performance issue or need for optimizationwebRelates to opencode on web / desktop

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions