Repository navigation
Description
What version of Codex is running?
Codex desktop app: 26.422.30944 (CFBundleVersion 2080)
Bundled CLI inside the app: codex-cli 0.125.0-alpha.3
Homebrew CLI on the same machine: codex-cli 0.118.0
What subscription do you have?
ChatGPT Pro
Which model were you using?
Not model-specific. This happens in the macOS desktop app global dictation feature before any model request is sent.
What platform is your computer?
Darwin 25.4.0 arm64 arm
macOS 26.4.1 (25E253)
Selected input source when reproducing:
InputSourceKind = "Keyboard Layout"
KeyboardLayout Name = Russian
KeyboardLayout ID = 19456
What issue are you seeing?
Codex desktop app global dictation successfully records and transcribes speech, but the recognized text is not inserted into the focused text field when the current macOS keyboard layout is Russian.
The same workflow works when the system keyboard layout is switched to English.
The transcription itself is not failing. New entries are written to ~/.codex/transcription-history.jsonl, and during debugging the transcribed text briefly appears in the macOS clipboard. The failure is specifically the final paste step.
What steps can reproduce the bug?
- On macOS, enable the Russian keyboard layout and make it the current input source.
- Open Codex desktop app settings and configure global dictation hotkey.
- Open TextEdit or Notes.
- Click into an editable text field so the insertion point is active.
- Hold the Codex global dictation hotkey and say a short phrase.
- Release the hotkey.
Actual result: Codex shows the dictation UI and writes the transcript to ~/.codex/transcription-history.jsonl, but no text is pasted into TextEdit/Notes.
- Switch the macOS keyboard layout to English.
- Repeat the same dictation workflow.
Actual result with English layout: the transcribed text is pasted correctly.
Minimal AppleScript reproduction of the underlying paste issue while Russian layout is active:
-- Does not paste under Russian layout
set the clipboard to "ONLY_KEYSTROKE_V"
tell application "System Events" to keystroke "v" using command down
-- Does paste under Russian layout, because it uses the physical V key
set the clipboard to "ONLY_KEY_CODE_9"
tell application "System Events" to key code 9 using command downWhat is the expected behavior?
Global dictation should paste the recognized text into the focused text field regardless of the current macOS keyboard layout.
Additional information
The packaged Codex app appears to use AppleScript equivalent to:
tell application "System Events" to keystroke "v" using command downThat is layout-dependent. With Russian input active, keystroke "v" using command down does not behave as physical Cmd+V, so paste is not delivered.
Changing the paste command to a physical key code fixes the issue locally:
tell application "System Events" to key code 9 using command downkey code 9 is the physical V key on macOS, so command down + key code 9 maps to paste independently of the active keyboard layout.
I verified the diagnosis by monitoring ~/.codex/transcription-history.jsonl and the clipboard during dictation:
- The transcript is written to history.
- The transcript briefly appears in the clipboard.
- Under Russian layout, the simulated
Cmd+Vdoes not paste. - Under English layout, the same Codex dictation flow pastes successfully.
- A local binary patch replacing
keystroke "v"withkey code 9makes the paste work under Russian layout, but it breaks the app code signature, so it is not a viable user workaround.
Suggested fix: use physical key code based paste on macOS for global dictation, or otherwise use a layout-independent paste mechanism.
Activity
alexgetmancom commentedon Apr 26, 2026
I did one more pass to narrow this down to the packaged Desktop code.
In Codex Desktop
26.422.30944, the global dictation paste path is in the packaged Electron main bundle (app.asar,.vite/build/main-*.js). The relevant flow is:The macOS paste helper currently shells out to
osascriptand sends paste with a layout-dependent AppleScript command:key code 9is the physical V key on macOS. This makesCmd+Vwork regardless of the active keyboard layout, and I verified locally that it fixes Russian layout paste.I also cloned the public
openai/codexrepo at currentmainand could not find this Desktop source string there. The public repo appears to contain the CLI/Desktop launcher, while this paste implementation is only present in the packaged Electron app. So I cannot submit a direct PR against the public source for this specific line unless the Desktop source is published or mapped into this repo.Suggested internal source-level change: in the macOS branch of the global dictation paste helper, replace the
System Eventskeystroke "v" using command downcall withkey code 9 using command down.Samburskoy commentedon May 1, 2026
We are seeing the same issue on Codex Desktop
26.429.20946on macOS.Global dictation successfully records/transcribes, and the relevant macOS permissions are enabled (
Accessibility,Input Monitoring,Microphone,Screen Recording, andAutomation -> Codex -> System Events). However, with a Russian keyboard layout active, the transcript is not pasted into Discord, Notes, or TextEdit.After switching the input source to
ABC/English, the behavior is consistent with the diagnosis above: the failure appears to be the layout-dependentSystem Eventspaste step rather than transcription or permissions.So this reproduces on the latest Codex Desktop version as well.
m13v commentedon May 3, 2026
the keystroke-based-on-character pattern is a layout trap on macOS. AppleScript's
keystroke "v"resolves to whatever key produces 'v' under the current input source, which on Russian or Dvorak isn't kVK_ANSI_V. key code 9 + cmd works because it's the physical V slot regardless of layout. cleaner fix is dropping System Events entirely: CGEventCreateKeyboardEvent with kVK_ANSI_V hits the same path without the AppleScript bridge. or skip simulated Cmd+V altogether and write to the focused element via AXUIElementSetAttributeValue on kAXSelectedTextAttribute, no clipboard race, no layout coupling.MumuTW commentedon Jun 18, 2026
I can confirm this is still reproducible in a newer Codex Desktop build, and it also affects Zhuyin, not only Russian layouts.
Environment:
26.611.6232426.5.1com.apple.inputmethod.TCIM.Zhuyin/ZhuyinBopomofoBehavior:
I verified locally that this is still the same layout-dependent paste issue. Before patching, the packaged app still contained:
Under Zhuyin, this does not reliably send physical Cmd+V, so the paste step silently fails.
Local workaround that fixed it:
I patched
/Applications/Codex.app/Contents/Resources/app.asarand replaced the AppleScript paste command with:After fully quitting and restarting Codex, global dictation insertion into external apps started working under Zhuyin.
This confirms the issue is not microphone permissions, Accessibility permissions, or transcription. It is still the layout-dependent paste implementation.
Note: this workaround modifies the signed app bundle and will be overwritten by updates, so it is not a viable user-facing fix.
Suggested fix:
Use
key code 9 using command down, CGEvent withkVK_ANSI_V, or another layout-independent paste mechanism for macOS global dictation.suregoodru commentedon Jul 1, 2026
I can confirm this issue as well.
In my case, Codex global dictation works correctly when the current macOS keyboard layout is English, but fails to paste the recognized text when the current layout is Russian.
What I observe:
This makes the feature unreliable for users who regularly switch between English and Russian layouts. Manually switching to English before every dictation is not a practical workaround.
The diagnosis in the original issue looks correct to me: the final paste action should be layout-independent on macOS. Using a physical key code for paste, or another layout-independent paste mechanism, would likely fix this without requiring users to change keyboard layout or install external automation tools.
Please prioritize this fix, since global dictation is otherwise very useful but currently unreliable for multilingual macOS users.
Codex version: 26.623.81905 • Released Jul 1, 2026
macOS version: 26.5.1 (25F80)
MumuTW commentedon Jul 1, 2026
Still reproducible after another Codex Desktop update, and the local binary patch is still required.
Clarification: although the issue title mentions Russian, this is not specific to Russian text or the Russian keyboard layout. The underlying failure is the layout-dependent macOS paste simulation. Zhuyin/Bopomofo reproduces the same problem because
keystroke "v" using command downdepends on the active input source. A more accurate scope would be non-US/non-ABC keyboard layouts or input sources.Environment:
26.623.81905,CFBundleVersion4598com.apple.keylayout.ZhuyinBopomofo/Applications/Codex.appObserved:
I inspected the updated app bundle and confirmed the packaged app still contains:
After replacing it locally with the layout-independent equivalent:
the bundle contains
old_count=0andnew_count=1, and the replacement AppleScript compiles successfully withosacompile_exit=0.This is the same workaround as before, but Codex updates overwrite it and it also breaks the app code signature, so it is not a viable user workaround.
Expected fix:
Use a layout-independent paste mechanism for macOS global dictation, e.g. physical key code paste / CGEvent with
kVK_ANSI_V, or another non-layout-dependent insertion path.MumuTW commentedon Jul 3, 2026
I’d like to clarify the scope here: this does not appear to be Russian-specific.
This is likely affecting many non-ABC / non-US macOS keyboard layouts and input sources. I can reproduce the same failure with Zhuyin/Bopomofo, and others have confirmed Russian as well. The common factor is not the spoken language or transcription result, but the final paste step being layout-dependent.
Current behavior appears to rely on:
On macOS, this is interpreted through the active keyboard layout/input source. Under non-English layouts, it may not produce the physical Cmd+V paste shortcut, so the transcription succeeds but insertion into the focused external app silently fails.
A layout-independent implementation fixes this locally:
or equivalently a CGEvent-based paste using the physical
kVK_ANSI_Vkey.I think this should probably be treated as an internationalization/accessibility bug rather than a Russian-layout edge case, because global dictation is effectively unreliable for multilingual macOS users unless they manually switch to English before every dictation.
Neutize commentedon Aug 10, 2026
Still reproducible on ChatGPT/Codex Desktop
26.803.41515(build6321), macOS26.5.2(25F84), Apple Silicon, with theRussianWininput source (keyboard layout ID19458).Global dictation inserts the transcript into external apps when the English layout is active, but the final insertion fails with
RussianWin. The transcript remains available in Codex transcription history, so transcription itself succeeds.I also checked the currently packaged
app.asar. It still contains:The layout-independent
key code 9 using command downimplementation is absent. This appears to be the same layout-dependent paste path described in the original report.nottengame commentedon Oct 30, 2026
Still reproducible on 2026-10-30 with desktop app 26.1023.51421 (build 22530) on macOS 26.5.1.
Configuration: global hold-to-dictate on Right Option; Main language explicitly set to English; macOS input sources ABC and Russian.
Current reproduction
Timing evidence from the affected user
This makes the transient transcript/clipboard restoration observable without changing the installed app. The disappearing chip has no copy control; navigating back into recording history is an interruption, especially after a long dictation.
Read-only implementation inspection of this build
The cross-app path saves the nonempty transcript to history, snapshots the clipboard, writes the transcript, attempts Paste, waits approximately 700 ms, and restores the previous clipboard if it has not otherwise changed. It treats the paste API's completion as success without confirming insertion. The macOS path first attempts an Accessibility menu Paste; if that throws, its fallback simulates Command plus the literal letter
v. This report does not establish which branch Telegram used, but the layout-dependent fallback remains consistent with the original report.Impact / expected behaviour
A bilingual user may be typing Russian, then start an English dictation without noticing the current keyboard layout. Recording and recognition appear to succeed, yet an arbitrarily long message is silently left out of the target app. Global dictation should insert independently of the keyboard layout.
If insertion cannot be confirmed, please keep a visible recovery chip with Copy/Retry and preserve the transcript for manual paste. The affected user's proposed interim mitigation is a configurable 5–10 second clipboard-restoration grace period, rather than approximately 700 ms, so recovery is possible without a split-second race. A longer delay is a mitigation; layout-independent insertion remains the actual fix.
No audio, raw logs, conversation history, account identifiers or user-specific filesystem paths are attached. The installed application was not modified.
smeshny commentedon Nov 24, 2026
This issue is still affecting global dictation on ChatGPT/Codex Desktop
26.1120.41243(build30607) on macOS27.2.1. The configured shortcut is Left Option, and the input sources areABCand the standard macOSRussianlayout.Steps to reproduce
Russiankeyboard layout.ABCand repeat with the same field, shortcut, and spoken language. The text appears in the field.What is still present in this build
A read-only inspection of the installed app bundle shows that the macOS insertion code first tries to invoke the foreground app's Paste menu item through Accessibility. If that call throws, it falls back to the following AppleScript command:
The fallback sends a character-based shortcut, which can fail to deliver Paste with a non-Latin input source. Earlier reports in this issue confirmed that recognition can complete and save a transcript while the target field stays empty. In this report, the confirmed observation is the difference in text insertion between
RussianandABC. The runtime branch taken by the target field has yet to be verified.Suggested fix and regression test
Keep the Accessibility menu path and make the fallback use the physical V key (
kVK_ANSI_V, key code9):The replacement compiles with
osacompile, and the original report confirms that it restores insertion under the Russian layout. For a regression test, exercise the fallback with bothABCandRussianactive and verify that the completed transcript is inserted into the focused field in both cases. A successful AppleScript exit alone can miss the insertion failure.smeshny commentedon Nov 24, 2026
Interim workaround for build
30607: a small macOS menu bar helper detects the Codex global dictation overlay using window metadata. When the overlay opens with the Russian layout active, the helper switches toABC. It restores Russian two seconds after the overlay closes, giving Codex time to paste underABC.The helper runs separately from Codex. The switch-and-restore sequence was verified with a test window. Using the physical V key code in the macOS paste fallback would fix this in Codex itself.
Having to build a separate macOS app in 2026 just to make dictation paste work with a standard keyboard layout is absurd. That’s a serious usability failure for a basic input feature, and it should be fixed in Codex itself.
bmpolonsky commentedon Nov 25, 2026
Still reproducible on ChatGPT desktop 26.1120.50957 (build 30866), macOS 27.2.1. In the Steam Store search field, global dictation transcribes the same phrase with both Russian and ABC keyboard layouts, but inserts the text only with ABC. Manual Cmd+V and Edit → Paste both work in that field. During the failed attempt, ChatGPT used the System Events fallback, and macOS allowed it to post the key event. This build still uses
keystroke "v" using command downfor that fallback. Please verify that the transcript actually appears in the target field under both layouts.