What version of Codex CLI is running?
codex-cli 0.122.0
What subscription do you have?
Plus
Which model were you using?
gpt-4.5 medium
What platform is your computer?
Linux 6.17.0-22-generic x86_64 unknown
What terminal emulator and version are you using (if applicable)?
Terminal → https://gitlab.gnome.org/chergert/ptyxis
What issue are you seeing?
Token usage grows rapidly during normal coding sessions because raw shell command output is passed directly into the LLM context. Commands like git status, git diff, ls, cargo test, and docker ps produce verbose, repetitive output — often 60–90% noise from the model's perspective — yet every token counts toward the context limit and API cost. Context fills fast, triggering expensive compaction or hitting limits mid-task.
What steps can reproduce the bug?
- Start a Codex CLI session on a mid-sized project.
- Run a sequence of typical coding commands:
git status, git diff, ls, a test run.
- Observe token count (uploaded thread:
019db5ee-d016-74d0-9228-76e5b75fbcc0).
- Note how quickly context fills relative to actual useful information exchanged.
What is the expected behavior?
Codex CLI should filter and compress shell command output before adding it to the model context — the same way RTK (Rust Token Killer) works as a CLI proxy today. RTK intercepts output, strips noise, and passes a compact semantic equivalent to the model, saving 60–90% tokens on common operations.
Integration could mean: automatically piping shell tool output through RTK if it is installed, or shipping an equivalent built-in output filter so no separate install is needed.
Additional information
I use RTK today with Codex, Claude Code, and Windsurf — it works well, but it requires a separate manual install and per-tool configuration for each CLI. This is friction that shouldn't exist for something so universally useful. Output compression should be a first-class feature of the CLI itself, not an external addon users have to discover and wire up themselves.
What version of Codex CLI is running?
codex-cli 0.122.0
What subscription do you have?
Plus
Which model were you using?
gpt-4.5 medium
What platform is your computer?
Linux 6.17.0-22-generic x86_64 unknown
What terminal emulator and version are you using (if applicable)?
Terminal → https://gitlab.gnome.org/chergert/ptyxis
What issue are you seeing?
Token usage grows rapidly during normal coding sessions because raw shell command output is passed directly into the LLM context. Commands like
git status,git diff,ls,cargo test, anddocker psproduce verbose, repetitive output — often 60–90% noise from the model's perspective — yet every token counts toward the context limit and API cost. Context fills fast, triggering expensive compaction or hitting limits mid-task.What steps can reproduce the bug?
git status,git diff,ls, a test run.019db5ee-d016-74d0-9228-76e5b75fbcc0).What is the expected behavior?
Codex CLI should filter and compress shell command output before adding it to the model context — the same way RTK (Rust Token Killer) works as a CLI proxy today. RTK intercepts output, strips noise, and passes a compact semantic equivalent to the model, saving 60–90% tokens on common operations.
Integration could mean: automatically piping shell tool output through RTK if it is installed, or shipping an equivalent built-in output filter so no separate install is needed.
Additional information
I use RTK today with Codex, Claude Code, and Windsurf — it works well, but it requires a separate manual install and per-tool configuration for each CLI. This is friction that shouldn't exist for something so universally useful. Output compression should be a first-class feature of the CLI itself, not an external addon users have to discover and wire up themselves.