Skip to content

TUI: tool-call output preview does not soft-wrap long lines #45028

Closed

Description

@CarverZheng

Description

In the TUI, when a tool call (e.g. write, edit, bash) renders its output/preview panel, long lines are shown without soft-wrapping. On a narrower terminal (or with long single-line content such as file paths or one-liner scripts), the text is clipped at the panel edge and becomes unreadable unless the user widens the window or copies the content elsewhere.

Steps to reproduce

  1. Open the opencode TUI on a ~100-column terminal.
  2. Ask the agent to write a file containing long lines (e.g. a minified JS line, a long PowerShell one-liner, or a deeply nested path).
  3. Look at the tool-call preview in the conversation: long lines are cut off at the panel boundary instead of wrapping to the next line.

Expected behavior

Long lines in tool-call previews should soft-wrap, or expose a config toggle (e.g. tui.soft_wrap: true | false) so users can choose per their preference.

Actual behavior

Lines are clipped at the panel boundary. No config option exists for this (checked https://opencode.ai/config.json - only tool_output.max_lines / max_bytes for truncation, nothing for wrapping).

Environment

  • OS: Windows 10 (19045), Windows Terminal
  • opencode: latest (npm)
  • Shell: PowerShell

Notes

Activity

  1. neriousy commented on Oct 22, 2026

    @neriousy
    Member

    Partly done in #53584: code blocks in execute details now wrap long lines, and text output wraps by word. #53504 couldn't reproduce clipping in write, edit or shell previews with V2 defaults. If you still see long lines cut off in the current TUI on Windows Terminal, comment here with a screenshot and we'll reopen it.

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