You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tui: transcript images and image viewer render garbled, underscaled blocks (Termux, no graphics protocol) #52492
Images shown in the TUI — inline in the transcript and in the full-screen image viewer — render as tiny, garbled clusters of block characters instead of a recognizable picture. The viewer is the stronger evidence: it has the entire viewport available but leaves most of the screen black and still displays the image as a small illegible smear.
Expected: transcript images should render as a recognizable low-resolution fallback (unicode half-blocks — Termux supports no kitty/sixel); the viewer should scale the image to fit the viewport (portrait images should use full terminal height, centered).
Actual: transcript shows scrambled colored blocks with no recognizable structure; the viewer shows the same garble in the upper-left while the rest of the viewport stays black — it never scales up. The blocks also look structurally scrambled rather than like a clean downsample.
Notes: sources are normal portrait Termux screenshots (~1080px wide). Even allowing for geometry (a portrait image in 80x24 can only be ~22 cells wide via half-blocks), the output should still be a clean downsample, and the viewer should maximize within the viewport. Relevant config: "session": { "image_preview": false }, "prompt": { "image_preview": true } — transcript still displays image content despite the former being false; unclear which setting governs this path. Possible areas: the unicode fallback downscaler (sampling/stride for tall images) and the viewer's fit/scale calculation.
Related: #41691 (blank thumbnail on Fedora/herdr, next channel) — possibly the same broken renderer manifesting differently. No Termux/Android-specific rendering issue was found.
Plugins
notify.js, envsitter-guard.v2.js (auto-loaded from ~/.config/opencode/plugins/)
OpenCode version
v2.0.21 (official v2 Node.js musl build on Termux)
Steps to reproduce
On Termux (or any terminal without kitty/sixel support), start opencode v2.0.21
Attach a portrait phone screenshot to a prompt ("prompt": { "image_preview": true }) or open one via the image viewer
Observe the transcript rendering and/or open the full-screen viewer
Screenshot and/or share link
Image viewer — full frame (tiny garbled render in a mostly-black viewport):
Transcript, cropped to the inline image block — scrambled, not a recognizable downsample:
(Full-resolution sources available on request.)
Operating System
Linux 6.12.81-android16 (aarch64 Android / Termux)
Terminal
Termux — TERM=xterm-256color, COLORTERM=truecolor, 80x24. No graphics protocol (no kitty/sixel), so the unicode block fallback path is what gets exercised.
Thanks for the detailed report and the screenshots. I couldn't reproduce this on v2.0.21 in a terminal without kitty/sixel support (tmux, TERM=xterm-256color, COLORTERM=truecolor, 80x24), so the unicode block fallback was used as on Termux:
I attached a 1080x2340 portrait PNG with a red top band, colour bars in the middle and a blue bottom band, by pasting its file path into the prompt.
The prompt thumbnail showed a clean, recognisable downsample. It's centre-cropped on purpose because the thumbnail box is landscape.
The full-screen viewer (Ctrl+P → "View image attachments") scaled the image to the full available height (about 16 rows at 80x24) and centred it horizontally. Nothing was garbled or left small in the upper-left.
So this may be specific to how Termux answers the terminal capability or size queries that the TUI sends at startup. These would help narrow it down:
Does it also happen with a simple test image, e.g. a few large solid colour bands, instead of a phone screenshot?
Does it happen inside tmux on Termux, and on a newer release (e.g. 2.2.0, which the TUI suggests via /update)?
How did you attach the image (pasting a path, clipboard paste, or something else)? And does resizing the terminal or zooming the Termux font change the result?
On the settings: prompt.image_preview controls the thumbnails in the prompt box and session.image_preview controls the images in sent messages. With session.image_preview: false, the image you saw was most likely the prompt's attachment preview.
Related: #41691 (blank image thumbnail on Fedora/herdr). It's the same preview component but shows a different symptom.
I'm closing this for now, since we couldn't reproduce it and haven't heard back with the details we asked for. On v2.0.21 in a terminal without kitty/sixel support (80x24, xterm-256color, truecolor), both the prompt thumbnail and the full-screen viewer drew a clean, correctly scaled image using the block fallback. That makes a Termux-specific cause likely, but we can't confirm it without more information.
If it still happens, please reply here with:
whether a simple test image (a few large solid colour bands) also comes out garbled,
whether it happens inside tmux on Termux or on a newer release,
how you attached the image.
We can reopen once we have those. Thanks again for the detailed report and screenshots.
I re-checked this after the earlier automatic close was reverted. We still can't reproduce garbled block images or an unscaled viewer in a terminal without kitty/sixel, so it's likely specific to how Termux answers the size and capability queries. If it still happens on the latest version, reply with a screenshot using a simple solid-colour test image and whether it also happens inside tmux on Termux, and we'll reopen.
Activity
github-actions commentedon Oct 1, 2026
Thanks for updating the issue with the required details and reproduction steps!
opencodejr commentedon Oct 28, 2026
Thanks for the detailed report and the screenshots. I couldn't reproduce this on v2.0.21 in a terminal without kitty/sixel support (tmux,
TERM=xterm-256color,COLORTERM=truecolor, 80x24), so the unicode block fallback was used as on Termux:So this may be specific to how Termux answers the terminal capability or size queries that the TUI sends at startup. These would help narrow it down:
tmuxon Termux, and on a newer release (e.g. 2.2.0, which the TUI suggests via/update)?On the settings:
prompt.image_previewcontrols the thumbnails in the prompt box andsession.image_previewcontrols the images in sent messages. Withsession.image_preview: false, the image you saw was most likely the prompt's attachment preview.Related: #41691 (blank image thumbnail on Fedora/herdr). It's the same preview component but shows a different symptom.
DEAD1nsane commentedon Oct 28, 2026
Thanks for looking into this!
To answer your questions:
I'll try these and report back. The workaround with prompt.image_preview is helpful to know - I'll use that for now.
opencodejr commentedon Oct 31, 2026
I'm closing this for now, since we couldn't reproduce it and haven't heard back with the details we asked for. On v2.0.21 in a terminal without kitty/sixel support (80x24,
xterm-256color, truecolor), both the prompt thumbnail and the full-screen viewer drew a clean, correctly scaled image using the block fallback. That makes a Termux-specific cause likely, but we can't confirm it without more information.If it still happens, please reply here with:
tmuxon Termux or on a newer release,We can reopen once we have those. Thanks again for the detailed report and screenshots.
neriousy commentedon Nov 19, 2026
I re-checked this after the earlier automatic close was reverted. We still can't reproduce garbled block images or an unscaled viewer in a terminal without kitty/sixel, so it's likely specific to how Termux answers the size and capability queries. If it still happens on the latest version, reply with a screenshot using a simple solid-colour test image and whether it also happens inside tmux on Termux, and we'll reopen.