anomalyco / anomalyco/opencode

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

Open
#45,028 0 comments 0 reactions 1 assignee View on GitHub

@simonklee is already working on this.

Since Aug 25, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

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
  • Related (closed) feature request: #4331 (word wrap / horizontal scrolling while showing agent edits) - this report is specifically about the tool-call output/preview panel in the conversation view.
  • A config-level toggle would be ideal: users who prefer no-wrap for diff-style content can keep the current behavior.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.