TUI Renders Truncated LLM Response Despite Full Output in Log File #3269

Closed
opened 2026-02-16 17:39:25 -05:00 by yindo · 11 comments
Owner

Originally created by @taqtiqa-mark on GitHub (Dec 2, 2025).

Originally assigned to: @thdxr on GitHub.

Description

Environment

  • OpenCode version: v1.0.128
  • Operating System: Linux (Debian Testing)
  • Installation: Containerized setup via curl script
  • Mode: TUI (no serve-attach)

Steps to Reproduce

  1. Launch OpenCode in TUI mode.
  2. Submit a prompt to the LLM that elicits a detailed response, such as one involving script analysis (e.g., identifying issues in a shell script like vault0.sh).
  3. Examine the response displayed in the TUI interface.
  4. Review the associated log file for the complete session output.

Expected Behavior

The TUI interface should present the entirety of the LLM-generated response, aligning precisely with the content captured in the log file's session summary.

Actual Behavior

The TUI interface exhibits a truncated response, terminating prematurely (e.g., concluding at "prints the usage message when" rather than extending to the full content). In contrast, the log file preserves the complete response. The screenshot provided illustrates this truncation in the TUI, while the full log transcript below confirms the presence of the unabridged output:

INFO 2025-12-03T02:45:00 +0ms service=bus type=session.status publishing
INFO 2025-12-03T02:45:00 +1ms service=session.prompt step=2 sessionID=ses_51e0cfecfffe7hCucYDcjdh1m3 loop
INFO 2025-12-03T02:45:00 +11ms service=bus type=message.updated publishing
INFO 2025-12-03T02:45:00 +1ms service=session.summary body=Root cause: In vault0.sh, the `stop` function unnecessarily prints a usage message when given the valid argument "vault0" (lines 184-187), even though it proceeds to handle the stop operation. This is likely a copy-paste error, as a similar (but incorrect) printf exists in the `start` function.
Proposed prompt to fix: "In vault0.sh, edit the stop function to remove the unnecessary printf that prints the usage message when the argument is 'vault0'." body
INFO 2025-12-03T02:45:00 +0ms service=bus type=message.updated publishing
INFO 2025-12-03T02:45:00 +1ms service=bus type=session.updated publishing
INFO 2025-12-03T02:45:00 +0ms service=bus type=session.diff publishing
INFO 2025-12-03T02:45:00 +1ms service=session.prompt sessionID=ses_51e0cfecfffe7hCucYDcjdh1m3 exiting loop
INFO 2025-12-03T02:45:00 +0ms service=session.compaction pruning
INFO 2025-12-03T02:45:00 +12ms service=session.prompt sessionID=ses_51e0cfecfffe7hCucYDcjdh1m3 cancel
INFO 2025-12-03T02:45:00 +1ms service=bus type=session.status publishing
INFO 2025-12-03T02:45:00 +0ms service=bus type=session.idle publishing
INFO 2025-12-03T02:45:00 +5ms service=session.compaction pruned=0 total=0 found

Impact

This discrepancy compromises the reliability of the TUI for interactive sessions, compelling users to consult log files for complete information, which disrupts efficient workflows and diminishes the tool's usability.

Suggested Resolution

Examine the TUI rendering mechanism to guarantee comprehensive display of LLM responses, potentially by enhancing buffer management or synchronization with log outputs.

OpenCode version

v1.0.128

Steps to reproduce

As above

Screenshot and/or share link

Image

Operating System

Linux (Debian Testing)

Terminal

Alacritty+Zellij

Originally created by @taqtiqa-mark on GitHub (Dec 2, 2025). Originally assigned to: @thdxr on GitHub. ## Description ### Environment - OpenCode version: v1.0.128 - Operating System: Linux (Debian Testing) - Installation: Containerized setup via curl script - Mode: TUI (no serve-attach) ### Steps to Reproduce 1. Launch OpenCode in TUI mode. 2. Submit a prompt to the LLM that elicits a detailed response, such as one involving script analysis (e.g., identifying issues in a shell script like `vault0.sh`). 3. Examine the response displayed in the TUI interface. 4. Review the associated log file for the complete session output. ### Expected Behavior The TUI interface should present the entirety of the LLM-generated response, aligning precisely with the content captured in the log file's session summary. ### Actual Behavior The TUI interface exhibits a truncated response, terminating prematurely (e.g., concluding at "prints the usage message when" rather than extending to the full content). In contrast, the log file preserves the complete response. The screenshot provided illustrates this truncation in the TUI, while the full log transcript below confirms the presence of the unabridged output: ``` INFO 2025-12-03T02:45:00 +0ms service=bus type=session.status publishing INFO 2025-12-03T02:45:00 +1ms service=session.prompt step=2 sessionID=ses_51e0cfecfffe7hCucYDcjdh1m3 loop INFO 2025-12-03T02:45:00 +11ms service=bus type=message.updated publishing INFO 2025-12-03T02:45:00 +1ms service=session.summary body=Root cause: In vault0.sh, the `stop` function unnecessarily prints a usage message when given the valid argument "vault0" (lines 184-187), even though it proceeds to handle the stop operation. This is likely a copy-paste error, as a similar (but incorrect) printf exists in the `start` function. Proposed prompt to fix: "In vault0.sh, edit the stop function to remove the unnecessary printf that prints the usage message when the argument is 'vault0'." body INFO 2025-12-03T02:45:00 +0ms service=bus type=message.updated publishing INFO 2025-12-03T02:45:00 +1ms service=bus type=session.updated publishing INFO 2025-12-03T02:45:00 +0ms service=bus type=session.diff publishing INFO 2025-12-03T02:45:00 +1ms service=session.prompt sessionID=ses_51e0cfecfffe7hCucYDcjdh1m3 exiting loop INFO 2025-12-03T02:45:00 +0ms service=session.compaction pruning INFO 2025-12-03T02:45:00 +12ms service=session.prompt sessionID=ses_51e0cfecfffe7hCucYDcjdh1m3 cancel INFO 2025-12-03T02:45:00 +1ms service=bus type=session.status publishing INFO 2025-12-03T02:45:00 +0ms service=bus type=session.idle publishing INFO 2025-12-03T02:45:00 +5ms service=session.compaction pruned=0 total=0 found ``` ### Impact This discrepancy compromises the reliability of the TUI for interactive sessions, compelling users to consult log files for complete information, which disrupts efficient workflows and diminishes the tool's usability. ### Suggested Resolution Examine the TUI rendering mechanism to guarantee comprehensive display of LLM responses, potentially by enhancing buffer management or synchronization with log outputs. ### OpenCode version v1.0.128 ### Steps to reproduce As above ### Screenshot and/or share link <img width="884" height="234" alt="Image" src="https://github.com/user-attachments/assets/976d493c-ec8c-4221-9d2b-8cb9488ae92e" /> ### Operating System Linux (Debian Testing) ### Terminal Alacritty+Zellij
yindo added the bug label 2026-02-16 17:39:25 -05:00
yindo closed this issue 2026-02-16 17:39:25 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Dec 2, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #4990: Output from agent is frequently hidden (describes similar truncation/hiding of LLM responses)
  • #4239: TUI hangs when shell outputs massive log (related to TUI rendering with large output)
  • #1864: tui rendering artifacting (general TUI rendering issues)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 2, 2025): This issue might be a duplicate of existing issues. Please check: - #4990: Output from agent is frequently hidden (describes similar truncation/hiding of LLM responses) - #4239: TUI hangs when shell outputs massive log (related to TUI rendering with large output) - #1864: tui rendering artifacting (general TUI rendering issues) Feel free to ignore if none of these address your specific case.
Author
Owner

@taqtiqa-mark commented on GitHub (Dec 2, 2025):

This is NOT:

  • #4990, there the issue is observed after the TUI has been left dormant for some time. Here there is no delay in usage.
  • #4239, here the log out put is trivial.
  • #1864, here there are no display artifacts. The text in the log is not displayed.
@taqtiqa-mark commented on GitHub (Dec 2, 2025): This is NOT: - #4990, there the issue is observed after the TUI has been left dormant for some time. Here there is no delay in usage. - #4239, here the log out put is trivial. - #1864, here there are no display artifacts. The text in the log is not displayed.
Author
Owner

@fpv-dev commented on GitHub (Dec 3, 2025):

As a possible workaround to show truncated output you can switch sessions back and forth. But yeah, it's very annoying to not see the last sentence

@fpv-dev commented on GitHub (Dec 3, 2025): As a possible workaround to show truncated output you can switch sessions back and forth. But yeah, it's very annoying to not see the last sentence
Author
Owner

@ariane-emory commented on GitHub (Dec 3, 2025):

I've noticed this too recently, not quite sure when it started happening.

@ariane-emory commented on GitHub (Dec 3, 2025): I've noticed this too recently, not quite sure when it started happening.
Author
Owner

@grahamcropley commented on GitHub (Dec 15, 2025):

I've also been seeing this sort of truncating lately. Last few words or half way through the last sentence.

Thank you @fpv-dev for the session switch tip. that works, and after switching back I see the full message.

@grahamcropley commented on GitHub (Dec 15, 2025): I've also been seeing this sort of truncating lately. Last few words or half way through the last sentence. Thank you @fpv-dev for the session switch tip. that works, and after switching back I see the full message.
Author
Owner

@ariane-emory commented on GitHub (Dec 15, 2025):

I have also continued to observe this behaviour occasionally.

@ariane-emory commented on GitHub (Dec 15, 2025): I have also continued to observe this behaviour occasionally.
Author
Owner

@thedaneeffect commented on GitHub (Dec 18, 2025):

I have similar issues on macOS in iTerm2 using Claude Sonnet/Opus 4.5. Just thought I'd add some data points.

@thedaneeffect commented on GitHub (Dec 18, 2025): I have similar issues on macOS in iTerm2 using Claude Sonnet/Opus 4.5. Just thought I'd add some data points.
Author
Owner

@rekram1-node commented on GitHub (Jan 5, 2026):

Is anyone still seeing this?

@rekram1-node commented on GitHub (Jan 5, 2026): Is anyone still seeing this?
Author
Owner

@cwegener commented on GitHub (Jan 5, 2026):

Is anyone still seeing this?

I've been using Big Pickle a lot lately 😂 So ... I'll have to check with Claude models again and report back.

@cwegener commented on GitHub (Jan 5, 2026): > Is anyone still seeing this? I've been using Big Pickle a lot lately 😂 So ... I'll have to check with Claude models again and report back.
Author
Owner

@cwegener commented on GitHub (Jan 7, 2026):

Is anyone still seeing this?

I've been using Big Pickle a lot lately 😂 So ... I'll have to check with Claude models again and report back.

After testing a few rounds with Claude Sonnet 4.5, I no longer see the truncation issues. The issue would usually appear very quickly in the past. The fix looks to be working well.

@cwegener commented on GitHub (Jan 7, 2026): > > Is anyone still seeing this? > > I've been using Big Pickle a lot lately 😂 So ... I'll have to check with Claude models again and report back. After testing a few rounds with Claude Sonnet 4.5, I no longer see the truncation issues. The issue would usually appear very quickly in the past. The fix looks to be working well.
Author
Owner

@taqtiqa-mark commented on GitHub (Feb 12, 2026):

In the spirit of calling out excellent engineering and design....

I've found that the Pi Coding Agent is more robust and, for me has none of the issues that I've encountered in OC, or has an elegant way to resolve them.... I'm dropping out of OC issues:

@taqtiqa-mark commented on GitHub (Feb 12, 2026): In the spirit of calling out excellent engineering and design.... I've found that the Pi Coding Agent is more robust and, for me has none of the issues that I've encountered in OC, or has an elegant way to resolve them.... I'm dropping out of OC issues: - [Pi Coding Agent](https://github.com/badlogic/pi-mono/blob/main/packages/coding-agent) - [Overview](https://mariozechner.at/posts/2025-11-30-pi-coding-agent/) - [Example development session](https://www.youtube.com/watch?v=ANQ1IYsFM2s)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3269