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
Agent names displayed incorrectly with ZWSP characters in TUI (e.g., "Ultraworker" → "ltraworker") #23049
When using oh-my-openagent plugin with OpenCode TUI, agent names are displayed incorrectly - missing the first few characters. This is caused by zero-width space (ZWSP, U+200B) characters used for sort prefixes in AGENT_LIST_SORT_PREFIXES.
Environment
OpenCode version: 1.4.0
oh-my-openagent version: 3.17.4
Terminal: iTerm2 on macOS
TERM: xterm-256color
Locale: zh_CN.UTF-8
Symptoms
Expected
Actual
Sisyphus - Ultraworker
Sisyphus - ltraworker (missing 'U')
Prometheus - Plan Builder
Prometheus - Plan lder (missing 'Bui')
The number of missing characters correlates with the number of ZWSP characters in AGENT_LIST_SORT_PREFIXES:
sisyphus: 1 ZWSP → 1 char missing
prometheus: 3 ZWSPs → 3 chars missing
Root Cause
oh-my-openagent uses ZWSP characters for sorting agent names in the dropdown:
While v3.17.3/v3.17.4 added stripInvisibleAgentCharacters() for agent lookups, the TUI display still shows these ZWSP characters, and certain terminals/font configurations render them as having actual width, causing the first visible characters to be "eaten".
The OpenCode TUI should properly handle zero-width Unicode characters (U+200B, U+200C, U+200D, U+FEFF) when calculating string width for display. These characters should have zero display width in all terminals.
Alternatively, oh-my-openagent could use a different mechanism for sorting that doesn't involve invisible characters.
Activity
CoolstrangerFJ commentedon Apr 17, 2026
NobleXL commentedon Apr 18, 2026
最新版的opencode修复了这个bug嘛?
ttimasdf commentedon Apr 23, 2026
No, but I found a workaround. Run opencode inside a tmux and the ZWSP disappears. 🤯
github-actions commentedon Jul 3, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.