Slash command search should match canonical English names in localized UI

Open 💬 4 comments Opened May 6, 2026 by Asuka109

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

  1. Set Codex Desktop UI language to Chinese (Simplified).
  2. Open the slash command picker from the composer.
  3. 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.

View original on GitHub ↗

4 Comments

jiangyuan · 3 months ago

Also reproduces for me on a newer desktop build:

  • Codex Desktop: 26.513.31313
  • Platform: macOS 26.3.1
  • UI language: zh-CN

In my case, /compact does 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.

rakutek · 2 months ago

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:

  • Keep localized command labels/descriptions visible.
  • Keep localized command aliases working.
  • Add canonical English command names as stable aliases for search and invocation.
  • Do not change the app language, localization system, or command semantics.
  • Do not change user-created/custom commands unless they already share the same matching path.

Proposed approach

Update the slash-command search/matching data so each built-in command can be matched by both:

  • its localized display label, for example /圧縮 or /压缩
  • its canonical English command name, for example /compact

If 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:

  • canonical English names still work in English UI
  • localized names still work in localized UI
  • canonical English names also work in localized UI
  • search results remain stable and do not introduce duplicate command entries

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?

javenfang · 2 months ago

I can still reproduce this on a newer Codex Desktop build, with a second built-in command example beyond /compact.

Reproduction environment

  • Codex Desktop: 26.609.30741 (3808)
  • Platform: macOS 26.3, arm64
  • System languages: zh-Hans-US, en-US
  • Codex language setting: follows system language
  • Effective UI language: Simplified Chinese

Reproduction

  1. Open a Codex Desktop chat with the UI in Simplified Chinese.
  2. Type / in the composer.
  3. Search for 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 /goal as well.

Local implementation evidence from this build

I unpacked the local Codex.app/Contents/Resources/app.asar for this installed build and saw the same likely matching path described above.

The zh-CN locale contains localized slash command titles, for example:

composer.goalSlashCommand.title = "目标"
composer.planSlashCommand.title = "计划模式"
composer.statusSlashCommand.title = "状态"

The built-in goal command still has a stable English id, but its searchable title is localized:

{ id: `goal`, title: localizedTitle, ... }

The slash-command filtering helper appears to score only the localized title plus any explicit searchAliases:

score(command.title, query)
...command.searchAliases.map(alias => score(alias, query))

I did not find built-in slash commands registering searchAliases in the composer bundle for this build, and the filter does not appear to include id by 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:

  • include the built-in command id as a default search alias; or
  • explicitly register canonical English aliases for built-in slash commands, for example goal / /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.

zhu-siyuan · 1 month ago

Still reproducible in Codex App version 26.715.12143 with the Simplified Chinese (zh-CN) interface.

For example, the canonical English command /status is 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 /goal are used in documentation, tutorials, GitHub discussions, and cross-language communication.

Expected behavior:

  • Keep the localized labels and descriptions.
  • Keep localized aliases such as /状态 available.
  • Always allow the canonical English command /status to be searched and invoked regardless of the UI language.

The canonical command ID could potentially be included as a default search and invocation alias.