GeezerVison is showing github.com — tui: multi-code-point emoji render as blank boxes inside tmux · Issue #54931 · anomalyco/opencode
tui: multi-code-point emoji render as blank boxes inside tmux #54931DescriptionSummary
Inside tmux, the TUI renders emoji that use multiple code points as blank or box placeholder cells. Plain kitty without tmux is not affected. This affects keycap sequences (1 + U+FE0F + U+20E3) and base characters followed by VS16 (U+FE0F), such as ⚠️ and 🅰️. The same bytes render correctly in the same terminal outside opencode, with and without tmux. Emoji that are a single code point, such as 💡, render fine.
Environment
- opencode version: v0.0.0-dev-20853
- OS: Fedora 44, Linux 7.2.9-200.fc44.x86_64
- Terminal: kitty 0.48.2 inside tmux 3.7c (
variation-selector-always-wide on). Plain kitty is not affected.
- Shell: zsh
- Install/channel: dev
- Active plugins: [email protected] (agents and orchestration only, does not touch rendering)
- Font: JetBrains Mono, with Noto Color Emoji as the emoji fallback
Reproduction
- Confirm that the terminal can draw the sequences:
printf '1\ufe0f\u20e3 \u26a0\ufe0f \U0001F170\ufe0f \U0001F4A1\n'
All four emoji render correctly in plain kitty and inside a tmux pane.
- Start opencode in the same terminal.
- Get an assistant message that contains the same characters, for example: ask the model to reply with exactly
1️⃣ 2️⃣ ⚠️ 🅰️ 🅱️ 💡.
Expected Behavior
The message shows the same glyphs as the printf output in step 1.
Actual Behavior
💡 renders correctly.
1️⃣, 2️⃣, ⚠️, 🅰️, 🅱️ render as dark blank or box cells. Some show one box and some show two.
🅲 (U+1F172, no VS16) also renders as a small box placeholder.
| Sequence |
Code points |
In plain kitty / tmux |
In opencode TUI |
| 1️⃣ |
0031 FE0F 20E3 |
renders |
box |
| ⚠️ |
26A0 FE0F |
renders |
box |
| 🅰️ |
1F170 FE0F |
renders |
box |
| 💡 |
1F4A1 |
renders |
renders |
Additional Context
Activityopencode-agent commented on Oct 12, 2026 Thanks for the detailed report and the code-point table.
I couldn't reproduce this in our sandbox because it has no kitty. The headless terminal we use can't draw colour emoji at all, so its screenshots can't show the problem. What I could check on 0.0.0-dev-20853: the TUI keeps 1️⃣, ⚠️, 🅰️ and so on as whole clusters, and in our test terminal it writes each full sequence followed by a 2-column cursor move. So the bytes look correct there.
One difference that only applies to kitty: the TUI library tests whether the terminal supports kitty's text-sizing escape (OSC 66). When it does, every emoji is sent wrapped as ESC]66;w=2;<emoji>ESC\. That is the most likely reason kitty behaves differently, so this needs someone with kitty to confirm. If you have a moment, these would help narrow it down:
- Does it still happen if you start opencode with
OPENTUI_FORCE_WCWIDTH=1 opencode or OPENTUI_FORCE_UNICODE=1 opencode?
- In plain kitty, does
printf '\e]66;w=2;\u26a0\ufe0f\e\\ \e]66;w=2;1\ufe0f\u20e3\e\\ \e]66;w=2;\U0001F4A1\e\\\n' show the same boxes for the first two and a normal 💡?
Related issues: #53632 (stale Unicode glyphs in the sidebar) and #44338 (grapheme-aware truncation).
major commented on Oct 12, 2026 ContributorAuthor More actions Thanks! I ran your checks on kitty 0.48.2 and tmux 3.7c. This only happens in tmux. Plain kitty is fine, so the "with and without tmux" in my report was wrong.
| Setup |
Env var |
Result |
| plain kitty |
none |
renders correctly |
| plain kitty |
OPENTUI_FORCE_EXPLICIT_WIDTH=0 |
renders correctly |
| kitty + tmux |
none |
black boxes |
| kitty + tmux |
OPENTUI_FORCE_EXPLICIT_WIDTH=0 |
black boxes |
| kitty + tmux |
OPENTUI_FORCE_UNICODE=1 |
renders correctly |
Your OSC 66 printf also renders correctly in plain kitty, so kitty and OSC 66 are not the cause.
Cause: when $TMUX is set, opentui uses the wcwidth width method. It measures VS16 and keycap sequences (1️⃣, ⚠️, 🅰️) as 1 column. tmux with variation-selector-always-wide on draws them 2 columns wide, and the next cell overwrites the right half of the glyph. 💡 is not affected because it is 2 columns wide in both methods. Your sandbox wasn't in tmux, so it saw the 2-column cursor move.
OPENTUI_FORCE_EXPLICIT_WIDTH=0 makes no difference in tmux, because tmux doesn't support OSC 66, so it's already off there.
Workaround: start opencode with OPENTUI_FORCE_UNICODE=1 inside tmux.
A real fix probably belongs in opentui. It could stop forcing wcwidth in tmux versions that draw VS16 emoji wide, or let users set the width method so opencode can pass it through.
🅲 (U+1F172) is a separate font-coverage gap on my side. It shows a box in plain kitty too, so please ignore it. changed the title [-]tui: multi-code-point emoji (keycaps, VS16) render as blank boxes[/-] [+]tui: multi-code-point emoji render as blank boxes inside tmux[/+] on Oct 12, 2026major commented on Oct 12, 2026 ContributorAuthor More actions neriousy commented on Nov 19, 2026 This was caused by OpenTUI forcing the wcwidth width method inside tmux (anomalyco/opentui#1654). OpenTUI 0.8.3 now uses the unicode width method for tmux 3.6 and newer, and OpenCode moved to OpenTUI 0.8.4 in #63055. If emoji still render as blank cells in tmux on the latest version, comment here and we'll reopen.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|