anomalyco / anomalyco/opencode
TUI: tool-call output preview does not soft-wrap long lines
@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
- Open the opencode TUI on a ~100-column terminal.
- 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).
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.