An opinionated Codex CLI. This is strictly a personal hobby project, forked from openai/codex.
Choose one of these two ways:
npm i -g @loongphy/codext
cd codex-rs
cargo run --bin codex
Full change log: see CHANGED.md.
The TUI header provides a compact overview of the active session:
cwd).cwd.Ctrl+Shift+C: Copies the current draft to the system clipboard.Ctrl+C: Retains existing behavior; remains backward-compatible with legacy logic when the draft is empty.This feature helps manage follow-up messages when quota or rate limits are reached:
Tab to add messages to the queue.Codex now reloads authentication after external auth.json writes settle, so account changes can be picked up without restarting at safe boundaries.
auth.json changes without watching the whole CODEX_HOME directory: when the file exists, Codext watches the file directly; when it is absent, Codext lightly polls for it to appear again. Auth is deferred until any active task completes; transient read errors do not clear cached auth.thread/start, thread/resume, and turn/start when no turn is running, so the new account is picked up at the next safe request boundary.This enables auth refresh for TUI and Codex App flows when external tools update auth.json.
It also supports Codex App account switching via codex-auth#103.
After a turn stops on UsageLimitExceeded, the TUI can park a recovery prompt and dispatch it after a later auth.json reload changes account identity.
You can configure this behavior using [tui].usage_limit_resume_prompt:
Custom Prompt: Define a specific string to be sent as the "resumption turn." This prompt will be used to signal the model to continue where it left off.
Disable: Set to "" (empty string) to disable this automatic recovery behavior entirely.
Default: If left unset, the system uses the following built-in prompt:
The usage limit has been reset, so you can resume from where you left off.
Example:
[tui]
usage_limit_resume_prompt = ""
Selected model is at capacityWhen the selected model is overloaded, Codext automatically submits Continue with bounded exponential-backoff retries (15s → 30s → 60s → 120s → 240s, up to 5 attempts), so long-running work continues without manual intervention.
[tui]
server_overloaded_resume = false # default true; set false to disable
We will never merge code from the upstream repo; instead, we re-implement our changes on top of the latest upstream code.
Iteration flow (aligned with .agents/skills/codex-upstream-reapply):
flowchart TD
A[Fetch upstream tags] --> B[Choose latest stable rust tag]
B --> C[Create fresh branch from tag]
C --> D[Generate old-branch reference bundle]
D --> E[Read intent docs and old changes<br/>CHANGED.md / README.md / AGENTS.md<br/>bundle diff / changed-files / commits]
E --> F[Re-implement required changes on fresh branch]
F --> G[Build: cargo build -p codex-cli]
G --> H[Review final diff against tag]
H --> I[Push finished branch]
When syncing to the latest upstream codex version, use .agents/skills/codex-upstream-reapply to re-implement our custom requirements on top of the newest code, avoiding merge conflicts from the old branch history.
Example:
$codex-upstream-reapply old_branch feat/rust-v0.130.0, new origin tag: rust-v0.131.0
Status bar design reference: https://linux.do/t/topic/1481797
(top 30 of 474)
Rust
96.8%
Python
2.5%
An opinionated Codex CLI. This is strictly a personal hobby project, forked from openai/codex.
Choose one of these two ways:
npm i -g @loongphy/codext
cd codex-rs
cargo run --bin codex
Full change log: see CHANGED.md.
The TUI header provides a compact overview of the active session:
cwd).cwd.Ctrl+Shift+C: Copies the current draft to the system clipboard.Ctrl+C: Retains existing behavior; remains backward-compatible with legacy logic when the draft is empty.This feature helps manage follow-up messages when quota or rate limits are reached:
Tab to add messages to the queue.Codex now reloads authentication after external auth.json writes settle, so account changes can be picked up without restarting at safe boundaries.
auth.json changes without watching the whole CODEX_HOME directory: when the file exists, Codext watches the file directly; when it is absent, Codext lightly polls for it to appear again. Auth is deferred until any active task completes; transient read errors do not clear cached auth.thread/start, thread/resume, and turn/start when no turn is running, so the new account is picked up at the next safe request boundary.This enables auth refresh for TUI and Codex App flows when external tools update auth.json.
It also supports Codex App account switching via codex-auth#103.
After a turn stops on UsageLimitExceeded, the TUI can park a recovery prompt and dispatch it after a later auth.json reload changes account identity.
You can configure this behavior using [tui].usage_limit_resume_prompt:
Custom Prompt: Define a specific string to be sent as the "resumption turn." This prompt will be used to signal the model to continue where it left off.
Disable: Set to "" (empty string) to disable this automatic recovery behavior entirely.
Default: If left unset, the system uses the following built-in prompt:
The usage limit has been reset, so you can resume from where you left off.
Example:
[tui]
usage_limit_resume_prompt = ""
Selected model is at capacityWhen the selected model is overloaded, Codext automatically submits Continue with bounded exponential-backoff retries (15s → 30s → 60s → 120s → 240s, up to 5 attempts), so long-running work continues without manual intervention.
[tui]
server_overloaded_resume = false # default true; set false to disable
We will never merge code from the upstream repo; instead, we re-implement our changes on top of the latest upstream code.
Iteration flow (aligned with .agents/skills/codex-upstream-reapply):
flowchart TD
A[Fetch upstream tags] --> B[Choose latest stable rust tag]
B --> C[Create fresh branch from tag]
C --> D[Generate old-branch reference bundle]
D --> E[Read intent docs and old changes<br/>CHANGED.md / README.md / AGENTS.md<br/>bundle diff / changed-files / commits]
E --> F[Re-implement required changes on fresh branch]
F --> G[Build: cargo build -p codex-cli]
G --> H[Review final diff against tag]
H --> I[Push finished branch]
When syncing to the latest upstream codex version, use .agents/skills/codex-upstream-reapply to re-implement our custom requirements on top of the newest code, avoiding merge conflicts from the old branch history.
Example:
$codex-upstream-reapply old_branch feat/rust-v0.130.0, new origin tag: rust-v0.131.0
Status bar design reference: https://linux.do/t/topic/1481797
(top 30 of 474)
Rust
96.8%
Python
2.5%