Terminal UI Corruption & Prompt Overage due to fetched PDFs #990

Closed
opened 2026-02-16 17:29:01 -05:00 by yindo · 3 comments
Owner

Originally created by @achembarpu on GitHub (Jul 30, 2025).

Originally assigned to: @adamdotdevin on GitHub.

Hi team,

I just started using Opencode today - love the potential! But I'm running into a blocking issue:

  • If the agent fetches a PDF file, the preview corrupts the TUI irrecoverably
  • If the PDF is (inevitably) large, the prompt exceeeds 200k and errors the session.

Running the same prompt on Claude Code works fine - as they do not show the PDF preview, and the PDF is processed by a subagent and summarised before being inserted into the main agent context.

Here's what I mean by terminal UI corruption and subsequent prompt size excess. Using opencode further only further corrupts the UI and the text input jumps around everywhere. And the prompt being too large means the session cannot proceed.

Image
Originally created by @achembarpu on GitHub (Jul 30, 2025). Originally assigned to: @adamdotdevin on GitHub. Hi team, I just started using Opencode today - love the potential! But I'm running into a blocking issue: - If the agent fetches a PDF file, the preview corrupts the TUI irrecoverably - If the PDF is (inevitably) large, the prompt exceeeds 200k and errors the session. Running the same prompt on Claude Code works fine - as they do not show the PDF preview, and the PDF is processed by a subagent and summarised before being inserted into the main agent context. Here's what I mean by terminal UI corruption and subsequent prompt size excess. Using opencode further only further corrupts the UI and the text input jumps around everywhere. And the prompt being too large means the session cannot proceed. <img width="1498" height="1612" alt="Image" src="https://github.com/user-attachments/assets/3a48ba54-12b6-4c55-a20c-d0e30c9cb28c" />
yindo closed this issue 2026-02-16 17:29:01 -05:00
Author
Owner

@achembarpu commented on GitHub (Jul 30, 2025):

I noticed that you just opened https://github.com/sst/opencode/issues/1424 addressing 1.
How can we address 2 - prompt size being exceeded?

@achembarpu commented on GitHub (Jul 30, 2025): I noticed that you just opened https://github.com/sst/opencode/issues/1424 addressing 1. How can we address 2 - prompt size being exceeded?
Author
Owner

@achembarpu commented on GitHub (Jul 31, 2025):

Hi team, I'm still facing the same 2 issues on the latest version, on a new session with new pdfs being fetched:

❯ opencode --version
0.3.93
Image
@achembarpu commented on GitHub (Jul 31, 2025): Hi team, I'm still facing the same 2 issues on the latest version, on a new session with new pdfs being fetched: ``` ❯ opencode --version 0.3.93 ``` <img width="1503" height="1640" alt="Image" src="https://github.com/user-attachments/assets/e7f2cb5a-7eac-455e-8400-17b39e228191" />
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#990