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
Support adding custom editors in "Open In" menu #10428
Open in seems to be limited to some defaults and cant be extended. I use alacritty & zed and both aren't options, which aren't that popular, but would be nice if it would be possible to add custom options(icon+command)
I would love to be able to use Typora to open markdown files. Typora is my default app for opening .md files - maybe provide a Default Editor option that will open a file using the OS default?
On macOS, supporting the standard "open with…" functionality would already solve this for most users. Anyone else with special needs can ask Codex to write an Apple Script for their use-case. My manual workaround: Right click on a link, select "copy path", open the terminal and type open + command+v.
Workaround: Use any app as Codex's "Default open destination" on macOS
Codex uses a hardcoded allowlist of known editors for its "Default open destination" dropdown. Custom .app bundles don't appear even when properly registered with Launch Services. This workaround creates a tiny AppleScript app that masquerades as a recognized editor (e.g. TextMate) but routes every file to its real macOS default handler — so files open in whatever app macOS would normally use.
This also works if you want files to always open in a specific app that is NOT already the default macOS handler (like Zed, Alacritty+Neovim, IntelliJ LightEdit, etc.) — just modify the AppleScript in the script below.
Install
Save this as install.sh, run chmod +x install.sh, then ./install.sh:
#!/bin/zshset -eo pipefail
APP="/Applications/TextMate.app"# 1. Create the AppleScript
SCRIPT=$(mktemp /tmp/open-default-XXXXX.applescript)
cat >"$SCRIPT"<< 'AS'on open theFiles repeat with aFile in theFiles do shell script "open " & quoted form of POSIX path of aFile end repeatend openAS# 2. Compile into an app bundle
osacompile -o "$APP""$SCRIPT"
rm "$SCRIPT"# 3. Write the Info.plist (must declare Editor role + droplet executable)
cat >"$APP/Contents/Info.plist"<< 'PLIST'<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"><plist version="1.0"><dict> <key>CFBundleName</key> <string>TextMate</string> <key>CFBundleIdentifier</key> <string>com.macromates.TextMate</string> <key>CFBundleVersion</key> <string>1.0</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleSignature</key> <string>????</string> <key>CFBundleExecutable</key> <string>droplet</string> <key>CFBundleIconFile</key> <string>droplet</string> <key>CFBundleDocumentTypes</key> <array> <dict> <key>CFBundleTypeName</key> <string>Plain Text</string> <key>CFBundleTypeRole</key> <string>Editor</string> <key>LSItemContentTypes</key> <array> <string>public.plain-text</string> <string>public.utf8-plain-text</string> <string>public.source-code</string> <string>public.script</string> <string>public.shell-script</string> <string>public.python-script</string> <string>public.ruby-script</string> <string>public.perl-script</string> <string>public.c-source</string> <string>public.c-header</string> <string>public.c-plus-plus-source</string> <string>public.objective-c-source</string> <string>public.swift-source</string> <string>public.assembly-source</string> <string>public.json</string> <string>public.xml</string> <string>public.yaml</string> <string>com.apple.property-list</string> <string>com.netscape.javascript-source</string> <string>public.css</string> <string>public.html</string> </array> </dict> </array> <key>NSAppleEventsUsageDescription</key> <string>This app routes files to their default macOS handler.</string> <key>LSUIElement</key> <true/></dict></plist>PLIST# 4. Register with Launch Services
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -f "$APP"echo"Installed: $APP"
Then open Codex → Settings → Default open destination → select TextMate.
Files will now route through the fake TextMate to their real default macOS handler.
Customization
Want files to open in a specific app instead? Change the do shell script "open " line in the script:
Qoder is another strong use case for this feature.
I use Codex App together with Qoder, and having Qoder available in the Open In menu would make file navigation much faster during a session. A configurable editor entry would cover this cleanly: pick a label/icon and map it to a custom command or URL scheme, with file path and line/column placeholders when available.
That would let users wire up editors beyond the built-in list, including Qoder, team-specific wrappers, and internal IDE distributions.
Adding another concrete macOS Desktop case, specifically for Markdown + Typora.
Environment:
Codex Desktop: 26.609.41114
macOS: 27.0 (26A5353q)
Typora installed at /Applications/Typora.app
Typora bundle id: abnerworks.Typora
.md / .markdown are registered with Launch Services to open in Typora
Observed behavior:
In a Codex chat response, local Markdown attachments show an Open with menu.
The menu has a Default app item, plus a second-level fixed list such as VS Code, Zed, Finder, Terminal, and Ghostty.
Typora is not shown in that list, even though it is installed and registered as the macOS default handler for Markdown files.
This is confusing because the UI looks like a user-extensible “Open with” list, but it appears to be a hardcoded allowlist. The user naturally asks how to “add Typora” to Codex.
Expected behavior:
Either expose a real custom open-destination setting where users can add apps/commands such as Typora, Obsidian, Emacs, Alacritty+Neovim, etc.; or
make Default app more explicit in the file menu, e.g. Open with system default app, and ensure it reliably uses macOS Launch Services for the clicked file type.
Why this matters:
Codex is increasingly used for Markdown-heavy work: documentation, courseware, reports, checklists, and generated handbooks.
For Markdown, users often want a preview/editing app such as Typora rather than a code editor.
The current menu creates friction because users see editor shortcuts but cannot add their own preferred app, while the Default app behavior is not obvious enough to discover confidently.
Current workaround:
Set Typora as the macOS default handler for .md files and use Codex's Default app item, or open the file in Finder first.
A first-class custom destination, or clearer OS-default wording, would make this much less confusing.
As of at least Version 26.616.51431 • Released Jun 20, 2026, you can now add something like the following to config.toml to add support for custom editors:
[desktop.custom_file_handlers.<id>]: file handler id suffix. Must start with an alphanumeric character and may contain alphanumeric characters, ., _, or -; Codex exposes it as custom:<id>.
label: required display name.
icon: required icon source. This can be a bundled asset such as apps/vscode.png or /apps/vscode.png, a base64 data:image/... URL, a file: URI, or an absolute local image path. Unsupported icon sources fall back to the default VS Code icon.
command: required executable path or command name to detect and launch.
args: optional string array prepended before Codex's input. Defaults to [].
input: optional input mode. Defaults to path, which appends the opened path after args. json_argument appends a JSON argument with target, path, appPath, and location. json_stdin writes JSON to stdin and additionally includes hostConfig, remoteWorkspaceRoot, and remotePath.
supports_ssh: optional boolean. Defaults to false; set to true for custom handlers that can open SSH workspaces.
It uses desktop.custom_file_handlers.nvim with a custom icon and command, supports Codex args, and handles both file targets and directory/worktree targets.
Activity
etraut-openai commentedon Feb 2, 2026
Can you provide more context? I'm not sure which Codex program you're using (app, web, CLI, extension) or what you mean by "open in".
etraut-openai commentedon Feb 3, 2026
Ah, I figured out what you mean. I presume you're using the desktop app on macOS.
frederik-uni commentedon Feb 3, 2026
my bad.
yes thats what I mean
[-]custom open in[/-][+]Support adding custom editors in "Open In" menu[/+]tolgaerdonmez commentedon Feb 4, 2026
is there any developments on this or workarounds? I would love to have it open alacritty + neovim
gercograndia commentedon Feb 4, 2026
Yeah, would like to use Zed editor!
JonathanAquino-NextRoll commentedon Feb 7, 2026
I would love to be able to use Typora to open markdown files. Typora is my default app for opening .md files - maybe provide a Default Editor option that will open a file using the OS default?
1 remaining item
soegaard commentedon Feb 26, 2026
I am closing
#12933 (comment)
which asks the same - a way to add editors or previewers.
I my case I can't find Emacs on the list.
huylg commentedon Feb 27, 2026
Adding support for Alacritty would be great.
ionuttiplea commentedon Mar 9, 2026
Adding support for opening files in vim/neovim would be great as well, though I know it might be niche so it is what it is :/
mantoni commentedon Mar 9, 2026
On macOS, supporting the standard "open with…" functionality would already solve this for most users. Anyone else with special needs can ask Codex to write an Apple Script for their use-case. My manual workaround: Right click on a link, select "copy path", open the terminal and type
open+ command+v.rahulxsomething commentedon Mar 26, 2026
Workaround: Use any app as Codex's "Default open destination" on macOS
Codex uses a hardcoded allowlist of known editors for its "Default open destination" dropdown. Custom
.appbundles don't appear even when properly registered with Launch Services. This workaround creates a tiny AppleScript app that masquerades as a recognized editor (e.g. TextMate) but routes every file to its real macOS default handler — so files open in whatever app macOS would normally use.This also works if you want files to always open in a specific app that is NOT already the default macOS handler (like Zed, Alacritty+Neovim, IntelliJ LightEdit, etc.) — just modify the AppleScript in the script below.
Install
Save this as
install.sh, runchmod +x install.sh, then./install.sh:Then open Codex → Settings → Default open destination → select TextMate.
Files will now route through the fake TextMate to their real default macOS handler.
Customization
Want files to open in a specific app instead? Change the
do shell script "open "line in the script:Already have TextMate installed? Change
APP,CFBundleName, andCFBundleIdentifierto a different editor from Codex's allowlist that you don't use:TextMate.appcom.macromates.TextMateBBEdit.appcom.barebones.bbeditSublime Text.appcom.sublimetext.4Amigov-Ai commentedon Apr 12, 2026
Additional macOS desktop case for this issue.
Environment:
.md) are associated with CotEditor in Finder / Launch ServicesObserved behavior:
.mdfile uses CotEditor as expected.Open withmenu does not respect the macOS default app.Cursor,Antigravity,Finder, andTerminal..md.Expected behavior:
Open with default appaction that uses the standard macOS default handler for the file type.Current workaround:
Open in Finder, then open the file from Finder.This feels less like a custom-editor request and more like Codex Desktop bypassing the OS default-open behavior for files.
xrmzju commentedon Apr 17, 2026
Qoder is another strong use case for this feature.
I use Codex App together with Qoder, and having Qoder available in the
Open Inmenu would make file navigation much faster during a session. A configurable editor entry would cover this cleanly: pick a label/icon and map it to a custom command or URL scheme, with file path and line/column placeholders when available.That would let users wire up editors beyond the built-in list, including Qoder, team-specific wrappers, and internal IDE distributions.
ohmyangboy commentedon Apr 28, 2026
Add Qoder pleace. i had to switch between Codex and Qoder now.
it would be great to support this!
NightGlowww commentedon Jun 15, 2026
Adding another concrete macOS Desktop case, specifically for Markdown + Typora.
Environment:
26.609.4111427.0(26A5353q)/Applications/Typora.appabnerworks.Typora.md/.markdownare registered with Launch Services to open in TyporaObserved behavior:
Open withmenu.Default appitem, plus a second-level fixed list such asVS Code,Zed,Finder,Terminal, andGhostty.Expected behavior:
Default appmore explicit in the file menu, e.g.Open with system default app, and ensure it reliably uses macOS Launch Services for the clicked file type.Why this matters:
Default appbehavior is not obvious enough to discover confidently.Current workaround:
.mdfiles and use Codex'sDefault appitem, or open the file in Finder first.A first-class custom destination, or clearer OS-default wording, would make this much less confusing.
soegaard commentedon Jun 15, 2026
The markdown previewer Marked is also pretty popular.
bolinfest commentedon Jun 22, 2026
As of at least Version 26.616.51431 • Released Jun 20, 2026, you can now add something like the following to
config.tomlto add support for custom editors:The full custom file handler API is:
[desktop.custom_file_handlers.<id>]: file handler id suffix. Must start with an alphanumeric character and may contain alphanumeric characters,.,_, or-; Codex exposes it ascustom:<id>.label: required display name.icon: required icon source. This can be a bundled asset such asapps/vscode.pngor/apps/vscode.png, a base64data:image/...URL, afile:URI, or an absolute local image path. Unsupported icon sources fall back to the default VS Code icon.command: required executable path or command name to detect and launch.args: optional string array prepended before Codex's input. Defaults to[].input: optional input mode. Defaults topath, which appends the opened path afterargs.json_argumentappends a JSON argument withtarget,path,appPath, andlocation.json_stdinwrites JSON to stdin and additionally includeshostConfig,remoteWorkspaceRoot, andremotePath.supports_ssh: optional boolean. Defaults tofalse; set totruefor custom handlers that can open SSH workspaces.mantoni commentedon Jun 24, 2026
For anyone wanting to try this with Neovim + tmux, I published my custom handler code here:
https://github.com/mantoni/codex-nvim-tmux-open
It uses
desktop.custom_file_handlers.nvimwith a custom icon and command, supports Codexargs, and handles both file targets and directory/worktree targets.bolinfest commentedon Jul 22, 2026
Sorry I forgot about this, but this is now in the public docs:
https://learn.chatgpt.com/docs/config-file/config-advanced#desktop
Now you can point your friends to that page instead of this GitHub issue!