Codex App without electron
README.md

Codex GUI

A native home for your coding agents.
Codex and DeepSeek Harness in one open-source desktop app.
Built with Rust and GPUI. Work locally or connect to a remote machine.

Download Codex GUI — browse the latest builds on the release server

Installation  ·  Build locally  ·  Remote controls

Start a chat and choose a local or remote connection Configure remote control in Codex GUI
Work across multiple chats in a split workspace

Installation #

Download builds from the release server. Each tag has platform directories containing packages, SHA256SUMS, and a release manifest. Standalone DSH archives are published alongside the GUI for Linux, macOS, and Windows on x86_64 and ARM64. They include Node and the patched app-server runtime; see portable DSH downloads.

Build locally #

nix develop
cargo build --bin codex-code-mode-host
cargo run --bin codex-gui

Windows uses native Rust and MSVC. See Windows builds for toolchain setup, portable ZIP bundling, and disposable Windows VMs in Spindle.

GPUI uses the GPUI Fast integration branch of the Tangled fork, with Codex GUI's tail-following, height hints, phased momentum, spring overscroll, and Tracy zones ported onto GPUI Fast. GPUI Kit uses its matching compatibility branch. Cargo.lock pins both forks.

For local development, put [patch] overrides in .cargo/config.local.toml. For example,

# Local development dependency overrides.
[patch."https://tangled.org/superkenvery.tngl.sh/zed"]
gpui = { path = "../Open-Agents-GUI/gpui-fast/crates/gpui" }
gpui_platform = { path = "../Open-Agents-GUI/gpui-fast/crates/gpui_platform" }
gpui_web = { path = "../Open-Agents-GUI/gpui-fast/crates/gpui_web" }
gpui_macros = { path = "../Open-Agents-GUI/gpui-fast/crates/gpui_macros" }
sum_tree = { path = "../Open-Agents-GUI/gpui-fast/crates/sum_tree" }
reqwest_client = { path = "../Open-Agents-GUI/gpui-fast/crates/reqwest_client" }

[patch."https://tangled.org/superkenvery.tngl.sh/gpui-kit"]
gpui-component = { path = "../Open-Agents-GUI/gpui-kit-fast/crates/component" }
gpui-base = { path = "../Open-Agents-GUI/gpui-kit-fast/crates/base" }
gpui-kit-assets = { path = "../Open-Agents-GUI/gpui-kit-fast/crates/assets" }

Entering nix develop (or reloading direnv) installs a pre-push hook via git-hooks.nix. It checks the committed Cargo.lock at each ref being pushed, allowing only the repository's own crates as path dependencies. Manifests are read from the same commit; working tree changes do not affect the check. Deleted refs are skipped. Before pushing, disable local patches, regenerate Cargo.lock, and commit the corrected lockfile. To check HEAD manually:

pre-commit run --hook-stage pre-push --all-files

The local code-mode host keeps Codex's upstream transport and session protocol, and executes JavaScript with the QuickJS runtime owned by the Codex fork (codex-rs/code-mode-runtime).

codex-gui supports both Codex and DeepSeek Harness in one app. The source selector offers Local Codex daemon, Embedded Codex, and Embedded DSH. Embedded DSH runs as a GUI-managed child process. Linux, macOS, and Windows releases bundle the patched harness with app-server support.

Profile chat rendering with Tracy #

nix develop --command cargo run --features tracy --bin codex-gui

Connect Tracy Profiler 0.14 to 127.0.0.1:8086 to start collecting zones. The Tracy build keeps the usual RUST_LOG output. In Tracy's Options → Visible frame sets, enable Draw starts to measure draw-to-draw intervals alongside the default present-to-present frames. Expand draw to inspect chat_history.transcript.prepaint, tool_group.rows.prepaint, and the row, shimmer, reasoning, and tool detail zones. GPUI lists measure and lay out rows in prepaint. For slow rebuilds, inspect the reason on chat_history.rebuild_transcript. Match its chat and revision range to chat_state.invalidate_content to find the caller and the enclosing protocol notification. Inside the rebuild, build_transcript, set_text_preserving_layout, and remeasure_content show where the update spends time.

The GPUI Fast integration branch includes the GPUI Tracy zones. Each draw shows gpui.list.layout_all_items for the full measurement pass, gpui.list.layout_items for visible layout (including overdraw), and gpui.list.prepaint_rows for the subsequent row prepaint. The fork also reports window layout, prepaint, paint, and scene finalization.

Loading text shimmer and built-in spinner easing run on the retained scene's presentation clock. With otherwise idle content, they should keep presenting without recurring sidebar or transcript layout/prepaint zones. Content updates, scrolling, and resizing still draw normally; custom spinner easing closures use the view animation path.

Remote controls #

Existing Codex sources are retained. Sources from dsh-sources.json are imported once with their project paths, projectless chats, and chat defaults. Appearance settings use the Codex GUI settings file.

For local development, DSH is resolved in this order:

  1. --dsh-repo <path> (runs nix develop <path> -c pnpm dsh);
  2. --dsh-bin <path>;
  3. $DSH_GUI_DSH_BIN;
  4. a dsh shipped next to the codex-gui executable;
  5. dsh on PATH.
cargo run --bin codex-gui -- \
  --dsh-repo /path/to/deepseek-harness \
  --dsh-profile app-server

Select Embedded DSH to use the harness. Its executable and base arguments can also be customized in the source editor.

Launch flags override the Embedded DSH client for the current process only; they do not change the saved source configuration. For a development build, use --dsh-bin /path/to/patched/dsh to select the harness built by this project's nix build .#dsh-harness. A separately installed official dsh may not include the app-server profile. Connection failures and the actual CLI invocation are logged to the terminal; the Disconnected tag also shows the error in its tooltip.