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
Hebrew/Arabic (RTL) text renders left-to-right in messages and the composer #32726
In the desktop app, Hebrew and Arabic text is laid out left-to-right and left-aligned, so RTL content reads incorrectly. Punctuation lands on the wrong side, and list bullets and numbers sit on the wrong side. This affects agent replies, user messages, and the composer input.
OpenCode version
1.17.7 (desktop)
Steps to reproduce
Open the desktop app
Send or receive any message that contains Hebrew or Arabic text
Screenshot and/or share link
Before: Hebrew/Arabic renders left-to-right and left-aligned, with list markers on the wrong side. After the fix: it renders right-to-left with correct alignment and markers, while English and code stay LTR.
Operating System
macOS
The earlier RTL reports (#6284, #9948, #10908) were auto-closed for inactivity rather than resolved, and people are still commenting that it is not solved. The fix is small and CSS-level: unicode-bidi: plaintext plus dir="auto" (a pattern already used in the codebase for file paths), so English content is unaffected. I have a PR ready (#32727).
Detailed root-cause analysis and a fully tested fix recipe (CSS/JS, with before/after screenshots on Desktop 1.17.13) is available in #35319 — covers word ordering, alignment, and table column direction for Arabic/RTL.
For those looking for RTL support, we've built an OpenCode plugin that automatically applies Unicode bidi isolation (RLI/LRI/PDI) to the AI's responses and system prompts.
Injects RTL system prompts so the AI responds in your language
Protects inline code (console.log()) and markdown blocks from getting scrambled by wrapping them in LTR isolates
Works out-of-the-box for Arabic, Persian, Hebrew, Urdu, etc.
Fixes character ordering and mixed-direction (BiDi) text issues
Current limitations:
Right-alignment: The plugin fixes the ordering of words and code (which fixes a lot of the unreadable output), but the text is still left-aligned. Full right-alignment requires native support in the renderer (like CSS dir="rtl" as discussed in this issue, or native alignment in the CLI TUI).
Streaming: It formats the text after the response completes. (We are proposing a streaming hook to fix this).
While native RTL rendering in OpenCode's TUI is the long-term fix, there is a community plugin that addresses this right now: opencode-rtl.
It wraps RTL text in Unicode bidi isolation characters (RLI/PDI) so Hebrew and Arabic render correctly in terminals that support Unicode bidi. It also injects system guidance so the model responds with proper RTL formatting.
Activity
github-actions commentedon Jun 17, 2026
This issue might be a duplicate of existing issues. Please check:
If your issue is distinct or you have a ready fix, please reference these issues in your PR to provide context.
razavioo commentedon Jun 21, 2026
https://github.com/razavioo/opencode-rtl
I have created an
opencode RTL pluginthat solves the most part. feel free to check it out and maybe do some contribution.Musa85 commentedon Jul 4, 2026
Detailed root-cause analysis and a fully tested fix recipe (CSS/JS, with before/after screenshots on Desktop 1.17.13) is available in #35319 — covers word ordering, alignment, and table column direction for Arabic/RTL.
razavioo commentedon Jul 29, 2026
Community plugin available:
opencode-rtlFor those looking for RTL support, we've built an OpenCode plugin that automatically applies Unicode bidi isolation (RLI/LRI/PDI) to the AI's responses and system prompts.
What it fixes today:
console.log()) and markdown blocks from getting scrambled by wrapping them in LTR isolatesCurrent limitations:
dir="rtl"as discussed in this issue, or native alignment in the CLI TUI).Repo: https://github.com/razavioo/opencode-rtl
razavioo commentedon Sep 27, 2026
While native RTL rendering in OpenCode's TUI is the long-term fix, there is a community plugin that addresses this right now: opencode-rtl.
It wraps RTL text in Unicode bidi isolation characters (RLI/PDI) so Hebrew and Arabic render correctly in terminals that support Unicode bidi. It also injects system guidance so the model responds with proper RTL formatting.
For OpenCode 2.x (v1.0.0, being published):
For OpenCode 1.x (
[email protected]):{ "plugin": [["opencode-rtl", { "language": "auto" }]] }It supports 10 RTL languages (Arabic, Hebrew, Persian, Urdu, etc.), per-column table direction detection, and stream-level assistant text isolation.
neriousy commentedon Oct 1, 2026
Closing as a duplicate of #26915, which tracks RTL (Hebrew, Arabic, Persian) support in the desktop chat. Please add your details and 👍 there.