Slash command search should match canonical English names in localized UI
Summary
In Codex Desktop, built-in slash commands appear to be searchable only by the localized display text for the current UI language. The canonical English command names are not searchable in a localized UI.
Environment
- Codex Desktop: 26.429.61741 (2429)
- Platform: macOS
- UI language: zh-CN
Reproduction
- Set Codex Desktop UI language to Chinese (Simplified).
- Open the slash command picker from the composer.
- Search for
compact.
Actual behavior
The compact command is not found when searching for compact.
The command is displayed and searchable only as /压缩, with the description 压缩此线程的上下文.
This appears to apply to built-in commands generally: command discovery follows the localized UI text, not the canonical English command name.
Expected behavior
Slash command search should match both:
- the canonical English command name, for example
compact - the localized display label, for example
压缩
The command can still be displayed in the localized language, but the search index should include stable canonical aliases.
Why this matters
Many users work in localized UI but still learn, document, discuss, and type slash commands by their English canonical names. For example, /compact is easier to type and more commonly referenced than /压缩 for bilingual users.
This also makes GitHub issue discussions and documentation harder to follow: users may think a command is missing when it is present but only discoverable through the localized label.
4 Comments
Also reproduces for me on a newer desktop build:
In my case,
/compactdoes not work as the canonical English slash command, while/压缩does.I had filed #23325 before finding this issue; closing that one as a duplicate and keeping the newer-version repro details here.
I’d like to work on a focused fix for this, if the Codex team is open to an external PR for this issue.
Reproduction environment
I can reproduce the same class of issue in a localized Codex Desktop UI.
When the UI language is Japanese, built-in slash commands are difficult or impossible to invoke by their canonical English names. This is inconvenient because documentation, examples, issue discussions, and user muscle memory usually refer to commands by English names such as
/compact.This appears to be the same underlying behavior reported here for zh-CN, where localized command labels replace or hide the canonical English command names.
Root cause hypothesis
The slash command picker and/or command matching path appears to index or match only the localized display text for the active UI language.
As a result, the canonical command identifier/name is not consistently treated as a stable alias in localized UIs.
Proposed scope
I’d keep the PR narrowly scoped to built-in slash command lookup in localized UI:
Proposed approach
Update the slash-command search/matching data so each built-in command can be matched by both:
/圧縮or/压缩/compactIf there is already a command id or canonical name in the command metadata, I’d prefer using that as the English alias rather than adding duplicated strings.
Test plan
I plan to add regression coverage for localized slash-command lookup so that:
Local validation would include the relevant app/frontend checks if this lives in the desktop app code, and any Rust checks if the matching logic is in
codex-rs.Would the team be open to an invited PR for this narrow fix?
I can still reproduce this on a newer Codex Desktop build, with a second built-in command example beyond
/compact.Reproduction environment
zh-Hans-US,en-USReproduction
/in the composer.goal/ try to find/goal.Actual behavior
The goal command is not discoverable by the canonical English command name
/goal/goal.It is discoverable by the localized Chinese title
/目标/目标.This matches the existing
/compact->/压缩symptom, but affects/goalas well.Local implementation evidence from this build
I unpacked the local
Codex.app/Contents/Resources/app.asarfor this installed build and saw the same likely matching path described above.The zh-CN locale contains localized slash command titles, for example:
The built-in goal command still has a stable English id, but its searchable title is localized:
The slash-command filtering helper appears to score only the localized
titleplus any explicitsearchAliases:I did not find built-in slash commands registering
searchAliasesin the composer bundle for this build, and the filter does not appear to includeidby default. That explains why the canonical English command id (goal) does not match once the visible title is localized to目标.Suggested narrow fix
Either of these would preserve localized UI while restoring stable command discovery:
idas a default search alias; orgoal//goal,compact//compact,status//status.Localized labels should keep working, but canonical English command names should remain stable across UI languages because the docs and user workflows refer to commands as
/goal,/status,/compact, etc.Still reproducible in Codex App version
26.715.12143with the Simplified Chinese (zh-CN) interface.For example, the canonical English command
/statusis not discoverable or usable as expected, while the localized command/状态is shown instead.This remains inconvenient because slash commands are developer-facing command identifiers rather than ordinary UI labels. English commands such as
/status,/compact, and/goalare used in documentation, tutorials, GitHub discussions, and cross-language communication.Expected behavior:
/状态available./statusto be searched and invoked regardless of the UI language.The canonical command ID could potentially be included as a default search and invocation alias.