bug(terminal): agent CLI status icons render as underscores over tmux attach (AO-only)
Bug
Box-drawing/agent-status Unicode characters in AO's embedded terminal (xterm.js attached to a tmux session) sometimes render as underscores instead of their proper glyphs — e.g. Claude Code's spinner ✻ (U+273B) and its ⎿ (U+23BF) continuation marker both showed up as _. Common box-drawing glyphs (│ ─ etc.) were unaffected. This does not reproduce when attaching to the same tmux session from a bare terminal outside AO.
This is a split-off of the garbled-rendering half of issue 2484 (that issue also covered a Ctrl+Arrow/Ctrl+Backspace/Ctrl+V double-fire bug, fixed separately in #2586; the rendering half was left open with only an unconfirmed hypothesis).
Root cause
tmux attach-session infers UTF-8 client capability from LC_ALL/LC_CTYPE/LANG in the attaching process's environment, unless -u is passed explicitly. AO's daemon typically runs without an interactive shell's locale, so tmux silently treats every attach client as non-UTF-8.
A non-UTF-8 client makes tmux's tty_check_codeset (tty.c) replace any character it can't map through its legacy ACS table with underscores matching the glyph's display width. Common box-drawing glyphs are in that ACS table, so they still rendered correctly — which is why an earlier investigation attempt, testing only a box-drawing border character, concluded locale had no effect. Agent CLI status icons outside the ACS table (Claude Code's spinner, its continuation marker, etc.) are not covered and were silently rewritten to _.
Confirmed with a byte-level repro outside AO/Electron entirely: spawning tmux attach-session via a pty with a stripped, locale-less env reproduces _ _ _ for ✻ ⎿ ← while │ still renders correctly.
Fix
Pass -u to tmux attach-session (backend/internal/adapters/runtime/tmux/tmux.go) to force CLIENT_UTF8 on regardless of the daemon's environment — matching how a bare tmux attach from an interactive shell (which does have a UTF-8 locale) already behaves.
Screenshots
Before (no -u, glyphs corrupted):
After (-u passed, glyphs correct):