Add full RTL (Right-To-Left) text direction support for Arabic & Hebrew users

Open 💬 24 comments Opened Apr 25, 2026 by meshalprogramming-cloud

What variant of Codex are you using?

App

What feature would you like to see?

Please add native RTL support in both the Codex and Chat panels.

Arabic text currently does not render properly, especially in terms of text alignment, punctuation placement, and overall reading direction. This makes writing, reviewing, and debugging Arabic content difficult and uncomfortable.

It would be great if the interface could automatically detect RTL languages such as Arabic and Hebrew, apply proper right-to-left alignment, and handle punctuation and mixed Arabic/English text correctly.

This would significantly improve the experience for Arabic-speaking users and anyone working with RTL content.

Additional information

_No response_

View original on GitHub ↗

24 Comments

SMSMy · 3 months ago

I’m also experiencing this issue, and it significantly impacts real-world usage.

Reproducible Case

When mixing Arabic (RTL) with English/code (LTR), the output becomes hard to read:

Example:

  • Arabic comment + English code
  • Terminal output containing Arabic text
  • Markdown with mixed direction

Observed problems:

  • Text alignment defaults to LTR
  • Parentheses and punctuation are misplaced
  • Mixed content (Arabic + code) becomes visually inconsistent

Impact

This is not just a visual issue — it affects:

  • Code readability
  • Debugging (logs/CLI output)
  • UI correctness when generating layouts

Suggestion

Proper bidirectional text handling is needed:

  • Support for RTL direction (dir="rtl" or auto)
  • Correct Unicode Bidi algorithm implementation
  • Testing in mixed-language scenarios (Arabic + English + code)

If needed, I can provide more concrete examples or test cases.

Tarek-g · 3 months ago

I’d like to add that this issue is not limited to Arabic or Hebrew

It likely affects RTL languages more broadly, including Arabic, Persian/Farsi, Hebrew, Urdu, Pashto, Kurdish/Sorani, Sindhi, and potentially others.

So this should probably be treated as a general RTL/bidirectional text support issue, not as a language-specific rendering bug.

EltayApps · 3 months ago

I saw this issue reported a lot, but it seems no one cares, unfortunately!

EltayApps · 3 months ago
https://marketplace.visualstudio.com/items?itemName=Nad3r.agents-rtl https://github.com/nad3rzz/agents-rtl <img alt="Image" width="776" height="931" src="https://private-user-images.githubusercontent.com/36439894/590130970-4d4a8fec-5152-411c-b578-de47b73533c1.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Nzg0ODc2ODgsIm5iZiI6MTc3ODQ4NzM4OCwicGF0aCI6Ii8zNjQzOTg5NC81OTAxMzA5NzAtNGQ0YThmZWMtNTE1Mi00MTFjLWI1NzgtZGU0N2I3MzUzM2MxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA1MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNTExVDA4MTYyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZmN2JiMDhkNjAxOGZjZWYwMGM2ZGNjYTY3MDI1ODcxNzJhOTk4ZmM1ZDA5Y2Q0MDM2NWI5OGNlNmNkOGU3ZDgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.xsYb_GYKJz7yjWXLdVi5yUIxuTpsJl-sylNWJGZTY-c">

The problem is with the codex (chatGPT app)

Tarek-g · 3 months ago
https://marketplace.visualstudio.com/items?itemName=Nad3r.agents-rtl https://github.com/nad3rzz/agents-rtl <img alt="Image" width="776" height="931" src="https://private-user-images.githubusercontent.com/36439894/590130970-4d4a8fec-5152-411c-b578-de47b73533c1.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Nzg0OTEyNTgsIm5iZiI6MTc3ODQ5MDk1OCwicGF0aCI6Ii8zNjQzOTg5NC81OTAxMzA5NzAtNGQ0YThmZWMtNTE1Mi00MTFjLWI1NzgtZGU0N2I3MzUzM2MxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA1MTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNTExVDA5MTU1OFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNmMTJjNWM2ZThhOWUwM2Q0NDBmZmExN2JjMTczYmNlOWVjYzZmOWJmNGYzNWI0NDk1OGE2OWY5MjBkNWU4MTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.sIlWkXKh_XF6VA3VQ-xRLsOpQB5D4J_AkH7umif0Oc4">

This is not for codex app , its not useful for our case

mirismaili · 3 months ago

For Persian users, too.

mirismaili · 3 months ago

It's almost fixable by only two JS commands:

document.querySelector('[contenteditable=true]').dir = 'rtl' // for input box
document.querySelector('[data-thread-find-target=conversation]').dir = 'rtl' // for chat history
mirismaili · 3 months ago

Do you develop Codex by Codex? If so, I think it can fix the issue quickly!

Tarek-g · 3 months ago

The safe fix should be implemented upstream in Codex UI rather than by editing Codex.app / app.asar.

Recommended behavior:

  • Add dir="auto" to chat message / markdown roots.
  • Add dir="auto" to the composer contenteditable / ProseMirror root.
  • Keep pre and code explicitly LTR with unicode-bidi: isolate.
  • Add regression coverage for Arabic/Persian/Hebrew mixed with English and code.
amir-darwish · 3 months ago
It's almost fixable by only two commands in Codex DevTools/console: document.querySelector('[contenteditable=true]').dir = 'auto' // for input box document.querySelector('[data-thread-find-target=conversation]').dir = 'auto' // for chat history To enable Toggle Developer Tools in View menu (and also ability to Inspect Element), set BUILD_FLAVOR environment variable to dev. Unfortunately, I didn't find a better way yet. Actually, Codex doesn't find a better way! Codex found it for me!

it's work it >> from powershell use this commande to enable dev tool

[Environment]::SetEnvironmentVariable("BUILD_FLAVOR", "dev", "User")

MsM512 · 3 months ago

same issue ....

mamiakimo · 3 months ago

same issue ....

mirismaili · 2 months ago

More accurate workaround:

[...document.querySelectorAll('[class*=--turn-diff-row-padding-x\\:]')].forEach(e=>e.dir='ltr') // For diff panes
document.querySelector('[contenteditable=true]').dir='rtl' // For input box
document.querySelector('[data-thread-find-target=conversation]').dir='rtl' // For chat history

I’ve come to the conclusion that dir=auto isn’t the best option. Because in technical contexts, it’s quite common for the first word (and thus the first character) in a paragraph to be LTR, even though the paragraph as a whole is RTL!

EltayApps · 2 months ago

Is there anyone from the Codex team to see this issue we have been writing about for months???!!!! 😂😂

ifahad-react · 2 months ago

I can confirm this issue still affects Arabic users in the Codex desktop app.

Even when the app language is set to Arabic, assistant messages are still rendered left-aligned / LTR, which makes Arabic mixed with English shortcuts, code, and inline tokens hard to read.

pawnsmaster · 1 month ago

I ran into the same issue and built a small open-source workaround for Codex Desktop RTL rendering.

It fixes mixed Arabic/English direction and keeps code blocks LTR:
https://github.com/pawnsmaster/codex-rtl-toolkit

Would be happy to hear if it works for your case too.

mmnaderi · 1 month ago

I ran into this too and built an open-source workaround for the Codex desktop app:

⭐ https://github.com/mmnaderi/codex-rtl

It patches the app locally, keeps code/file paths readable in LTR, adds smart RTL/force RTL modes, custom RTL fonts/line-height, and can be reverted with npx codex-rtl --restore.

It’s not a replacement for native upstream support, but it may help Arabic/Hebrew/Persian users meanwhile. I’m the author and would love feedback from people affected by this.

ahmadipiralvan · 1 month ago

Native Persian RTL/BiDi support is still missing in ChatGPT Windows and the Codex VS Code extension

I am a paying Persian-speaking ChatGPT and Codex user. Proper right-to-left support has been repeatedly requested for a long time, but Persian text is still rendered incorrectly in both the ChatGPT Windows application and the Codex VS Code extension.

This is not merely a text-alignment issue. It is a bidirectional-text rendering problem.

Current problems

  • Persian messages are not consistently rendered right-to-left.
  • Mixed Persian and English text appears in the wrong visual order.
  • Inline code, filenames, paths, commands, numbers, and punctuation reorder adjacent Persian words.
  • The input composer and assistant responses behave inconsistently.
  • Third-party RTL extensions that previously worked are no longer compatible with recent Codex extension versions.
  • Users are forced to downgrade Codex or modify application files manually.

Expected implementation

Please implement native RTL and BiDi support in both ChatGPT and Codex:

  • Use dir="auto" for message containers and the message composer.
  • Apply unicode-bidi: plaintext to natural-language message content.
  • Isolate code, commands, URLs, filenames, and paths with dir="ltr" and unicode-bidi: isolate.
  • Provide an interface setting with Automatic, Right-to-left, and Left-to-right options.
  • Add regression tests for mixed Persian/Arabic/Hebrew and English/code content.
  • Ensure Markdown lists, tables, punctuation, inline code, code blocks, and copy buttons work correctly in RTL messages.

Impact

This issue makes long technical conversations extremely difficult to read and significantly reduces the usability of ChatGPT and Codex for millions of Persian, Arabic, Hebrew, and Urdu users.

Accessibility and internationalization should not depend on unsupported third-party patches. Please treat native RTL/BiDi support as a product bug and accessibility requirement rather than an optional cosmetic feature.

mirismaili · 1 month ago

Temporary workaround:

document.body.style.fontFamily = 'Vazirmatn';
const style = document.createElement('style');
style.textContent = `
  [class*="--turn-diff-row-padding-x:"] { direction: ltr !important; }
  [contenteditable="true"] { direction: rtl !important; }
  [data-thread-find-target="conversation"] { direction: rtl !important; }
  [data-user-message-bubble="true"] { text-align: right; !important; }
`;
document.head.appendChild(style);
ahmadipiralvan · 1 month ago
Temporary workaround: document.body.style.fontFamily = 'Vazirmatn'; const style = document.createElement('style'); style.textContent = [class*="--turn-diff-row-padding-x:"] { direction: ltr !important; } [contenteditable="true"] { direction: rtl !important; } [data-thread-find-target="conversation"] { direction: rtl !important; } [data-user-message-bubble="true"] { text-align: right; !important; } ; document.head.appendChild(style);

How to use this?

pawnsmaster · 1 month ago
> Temporary workaround: > document.body.style.fontFamily = 'Vazirmatn'; > const style = document.createElement('style'); > style.textContent = [class*="--turn-diff-row-padding-x:"] { direction: ltr !important; } [contenteditable="true"] { direction: rtl !important; } [data-thread-find-target="conversation"] { direction: rtl !important; } [data-user-message-bubble="true"] { text-align: right; !important; }; > document.head.appendChild(style); How to use this?

Don’t waste time on this issue. Use this one-click solution until OpenAI fixes it officially:
https://github.com/pawnsmaster/codex-rtl-toolkit

mirismaili · 26 days ago

It has been resolved in ChatGPT v26.727.51351 (or maybe earlier).

mirismaili · 24 days ago

The issue still exists, in answer-box of plan-mode questions.

mirismaili · 24 days ago

Also, RTL paragraphs that start with an English word (which is a common case, in technical contexts) still have issues. dir=auto is not smart enough.