Skip to content

tui: /copy fails when transcript contains NUL characters #44198

Description

@heymaaz

Description

/copy fails with Failed to copy session transcript when a session transcript includes NUL characters from shell output. OpenTUI rejects clipboard text containing NUL characters before it reaches an otherwise healthy host clipboard.

OpenCode version

0.0.0-beta-17898

Steps to reproduce

  1. Create a session with shell tool output containing NUL characters.
  2. Run /copy in that session.
  3. Observe the error toast and unchanged clipboard.

Expected: the supported transcript text is copied after omitting NUL characters.

Actual: the entire clipboard write fails with Failed to copy session transcript.

Screenshot and/or share link

Screen.Recording.2026-08-22.at.4.44.08.PM.mov

Operating System

macOS (Darwin 25.6.0, arm64)

Terminal

Ghostty 1.3.1

Activity

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions