Desktop should support an app-server binary override for local debugging

Open 💬 3 comments Opened Jun 28, 2026 by code-yeongyu
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Summary

Codex Desktop should provide a supported way to run an alternate local app-server binary for debugging transport/performance fixes without modifying the signed app bundle.

Right now, testing a local app-server transport fix against the Desktop renderer appears to require replacing:

/Applications/Codex.app/Contents/Resources/codex

That is risky because it can break the app bundle signature/notarization assumptions and makes rollback/testing awkward.

Why this matters

During a renderer-freeze investigation, a narrow local prototype in codex-rs/app-server-transport reduced renderer-facing event pressure by coalescing adjacent delta notifications. The prototype can be tested at the Rust package level, but proving it against the actual Desktop renderer requires Desktop to launch the patched codex app-server.

Replacing the bundled binary is the wrong default workflow for this:

  • it mutates /Applications/Codex.app;
  • it can invalidate code signing/sealed-resource expectations;
  • it is hard to recommend safely to users;
  • it makes local rollback and A/B comparison error-prone.

Suggested fix

Add a supported developer/debug override for the app-server executable path, for example one of:

CODEX_DESKTOP_APP_SERVER_BIN=/path/to/codex

or a config key explicitly gated to dev/debug builds, such as:

[app_server]
binary_path = "/path/to/local/target/release/codex"

The override should be safe by default:

  • disabled in normal production unless an explicit debug flag is present;
  • clearly shown in About/diagnostics when active;
  • log the selected app-server path and version;
  • refuse relative paths;
  • avoid leaking tokens or sensitive env in diagnostics;
  • provide an easy fallback to the bundled binary.

Expected behavior

Developers and advanced users should be able to A/B test app-server fixes against the real Desktop renderer without replacing files inside the signed .app bundle.

Acceptance criteria

  • Desktop can launch a specified external codex app-server binary for local debugging.
  • Diagnostics show whether Desktop is using bundled or external app-server.
  • The override can be disabled without reinstalling the app.
  • Normal signed-app behavior remains unchanged when the override is not configured.

Related issue context

This would make it much safer to validate fixes for renderer freeze/performance families such as:

  • #28502
  • #25779
  • #26362
  • #21134

View original on GitHub ↗

3 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #28910

Powered by Codex Action

hlky · 2 months ago

Try CODEX_CLI_PATH, works on Codex Desktop Windows. I also had to set CODEX_SQLITE_HOME to a fresh directory.

TyceHerrman · 17 days ago

ChatGPT Desktop 26.803.41515 honors CODEX_CLI_PATH. I used it with the separately installed stable CLI 0.147.0 instead of the bundled 0.147.0-alpha.6.5.

A guarded Advanced setting to accomplish this more natively would be useful. something like:

  • bundled CLI remains the default;
  • select an absolute external binary;
  • show its path, version, compatibility, and trust status;
  • warn about unavailable capabilities such as #34583;
  • provide one-click reset to the bundled CLI.

Since CODEX_CLI_PATH is not in the stable public environment-variable documentation, clarifying whether this is supported would also help.