Repository navigation
Description
Feature Request
Problem
Claude Code has a built-in customizable status line feature that allows users to display useful real-time information at the bottom of the terminal UI — token usage, model name, rate limits, context window, git branch, etc.
This is configured via a simple shell script hook in settings:
{
"statusLine": {
"type": "command",
"command": "/bin/bash ~/.claude/statusline.sh",
"padding": 0
}
}The script receives JSON context on stdin and returns formatted text. This is incredibly useful for power users who want to monitor their session at a glance.
Codex CLI currently has no equivalent mechanism. There's no way to display custom information in the TUI — no status line, no hooks, no plugin system for UI customization.
Proposed Solution
Add a statusLine (or similar) configuration option to ~/.codex/config.toml that allows running an external command and rendering its output in the Codex TUI (e.g., at the bottom of the screen).
Something like:
[status_line]
command = "/bin/bash ~/.codex/statusline.sh"
refresh_interval_secs = 10The command would receive session context (model, token count, etc.) as JSON on stdin and return a single line of text (with ANSI colors) on stdout.
Use Cases
- Display current model and token/context usage
- Show API rate limit status and reset times
- Display git branch and repo info
- Show project-specific metadata
- Integration with external monitoring tools
Why This Matters
For users who switch between Claude Code and Codex, the lack of a status line in Codex is a noticeable gap. The status line is a low-cost, high-value feature that significantly improves the interactive experience.
Activity
github-actions commentedon Apr 14, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
etraut-openai commentedon Apr 14, 2026
Have you tried the
/statuslinecommand? It's a little less flexible than an arbitrary script, but it's much easier to configure. Does this meet your needs?joshka commentedon Apr 15, 2026
I'd like to be able to see my jj-vcs status (change id etc.) in the status line.
It's likely not a small task to invest in making jj a core part of the product, but allowing a hook like this seems like a reasonable compromise #16921 seems like they have a good solution to this with a proposed PR ready to review
dlwss commentedon Apr 15, 2026
The current exposed features have significantly enhanced the functionality, and they can meet the needs of most users in various scenarios. However, I still hope to be able to add an extension point similar to the Statusline of CC CLI. It can store some user-defined data. If it can be made available, I would be very grateful.
jage9 commentedon Apr 16, 2026
Found this while researching this exact idea.
/statusline is actually a decent compromise, though I would still like to have control over the wording and order for conciseness.
For example, I have my Claude one at
5H: 96% | 7D: 100% | context: 89% | Sonnet 4.6
Since I use a screen reader, being able to set the order is important to me.
YitzhakMizrahi commentedon Apr 24, 2026
The built-in
/statuslinecommand is useful, but it does not fully cover the use case of a dynamically refreshed status provider. The gap I am running into is less "show one more built-in field" and more "let the user define what the statusline and/or terminal title should say while a session is running."Useful shape:
This would make
/statuslinea good default for most users while still giving power users a narrow extension point for project-specific or workflow-specific context.RoggeOhta commentedon Apr 27, 2026
Adding another +1 for command-driven customization specifically, not just selecting built-in
/statuslinefields.The current
/statuslineis useful, but the gap vs Claude Code is the extension point: let users run a command/script, pass Codex session context as JSON on stdin, and render stdout with safe timeout/failure behavior.Use cases:
A built-in
/statuslinedefault and an opt-in command provider could coexist: default remains simple, power users get a narrow, predictable extension hook.akamalov commentedon Apr 27, 2026
+1
[-]Feature request: customizable status line (like Claude Code)[/-][+]Customizable status line[/+]SakaZulu commentedon Apr 28, 2026
Thanks, I noticed #17827 is very closely related.
I am fine with this issue being treated as a duplicate if that helps tracking. The main point I wanted to emphasize is the same as the later comments in #17827: the built-in
/statuslinepicker is useful, but the missing piece is a command-driven extension point.For my use case, the important part is not just adding more built-in fields. It is allowing a user-provided command to receive Codex session context as JSON on stdin and render stdout back into the TUI, preserving ANSI colors and custom formatting, with timeout/failure safeguards.
That would let the built-in
/statuslineremain the simple default while enabling advanced users and community tools to build richer status lines.61 remaining items
sgeos commentedon Sep 28, 2026
Adding a concrete migration case from Claude Code to Codex CLI 0.158.0 on macOS. We configured the existing native status fields successfully, but could not reproduce three useful aspects of our status display through supported configuration.
Our Claude setup has a global renderer and an optional, version-controlled project script that contributes continuous integration and local verification-gate status. An illustrative display is below. All percentages in this example mean used capacity.
The closest native Codex configuration we installed is below.
The remaining gaps are these.
used = 100 - remaining, but we found no supported field or formatting expression for it. Native used variants, or a used/remaining preference with explicit labels, would address this independently of a custom renderer.For an external-command extension, useful properties would include documented session data on standard input, bounded output, a hard timeout, asynchronous refresh, explicit handling of unavailable or stale data, and user approval before executing repository-provided commands. A failed status helper should not stall the terminal interface or imply a successful gate.
This is specifically about extending the existing
/statuslinefeature. It is not a report that Codex lacks a status line. We verified that the configuration loads, but did not independently verify its live rendering. The requested used/remaining preference also goes beyond the labeling concern discussed in #24274.GreatV commentedon Sep 30, 2026
Adding a concrete use case from running Codex CLI and Claude Code side by side, on long agentic sessions where both run in adjacent tmux panes.
On the Claude Code side, a small status-line script shows, on one or more rows depending on terminal width:
With Codex 0.159.x I configured the native items (
model-with-reasoning,five-hour-limit,weekly-limit,total-input-tokens,total-output-tokens), but four things can't be reproduced:total-output-tokensand estimating by hand.A command-backed status line would cover all four, as proposed in this issue: run a user command on each refresh, pass session JSON on stdin, and render its stdout, with multiple lines allowed. The JSON fields that would make this work:
model,reasoning_effort,service_tier/ fast modefive_hourandweekly, each withused_percentandresets_atCOLUMNSenv var, sincetput colscan't see the TTY from a subprocessIf a full command hook is out of scope for now, a built-in
output-tokens-per-seconditem plus reset-time variants of the limit items would already help.adrijshikhar commentedon Oct 1, 2026
For anyone looking for a customizable statusline for OpenAI Codex CLI today, we built cxstatusline.
It provides an interactive terminal configurator and resolves several of the current CLI limitations:
5h 82% ↻ 3h 12m).cxstatusline revertto cleanly return to stock Codex at any time.You can preview and test layouts directly in the browser:
👉 Web Playground: https://cxstatusline.adrijshikhar.dev
📦 GitHub Repo: https://github.com/adrijshikhar/cxstatusline
feat(T312/T313): daemon HUD snapshots and statusline adapters
feat(T312/T313): daemon HUD snapshots and statusline adapters
feat(T312/T313): daemon HUD snapshots and statusline adapters
chilango74 commentedon Oct 8, 2026
Adding a concrete implementation experience to the request for a built-in output-tokens-per-second status item, including the use cases above and #5390.
We implemented a small TUI-only patch against Codex CLI 0.161.0 that adds an optional
output-speeditem to/statuslineand[tui].status_line, rendered as42.5 t/s. It uses the native status-line renderer and runtime token-usage events, with no external process or session-log polling.The metric has a specific limitation: it measures output-token delta divided by the wall-clock duration of the latest completed live turn, including reasoning, tool execution, waiting and approvals within that turn. It is an end-to-end turn average, not live streaming throughput. Idle time between turns is excluded. The previous value remains visible until another valid turn completes; interrupted turns and replayed history do not replace it. If a resumed thread has no reliable counter baseline, the first turn is skipped rather than counting historical output. Late usage updates use the already recorded completion time.
The patch includes arithmetic tests and TUI lifecycle tests covering late usage, interruption, replay, missing baselines and counter resets. It is a starting point for a native item, but live generation TPS would require a different measurement window and reliable streaming token counts. The metric name and description should make that distinction explicit.
We have now reverted to stock Codex because maintaining a patched binary across regular CLI updates is too costly. An upstream optional status item would let users observe speed while keeping normal updates.
We understand that the current contribution policy does not accept external PRs. We can share the patch and tests as technical reference material for the team; if maintainers explicitly invite a contribution, we would be willing to adapt it to the agreed semantics and prepare a focused PR. Would a completed-turn average be useful as an initial native item, or should this target live streaming TPS from the outset?
fraga commentedon Oct 16, 2026
Adding implementation findings for the command-driven renderer requested here. My use case is a compact, Claude-style display with custom labels and consumed-usage bars for context, 5-hour and weekly limits, plus available cost and reset times. The built-in picker supplies useful fields, but cannot reuse an existing script or control that presentation.
I prototyped this against
mainat6b991972c5, using a separate opt-in table so the existing built-in item list keeps its current meaning:Implementation findings that may help define a supported interface:
Targeted Linux validation passes: 106 status-line tests, 39 footer/layout tests, 1 config test, and 8 Python renderer tests. A PTY smoke test verified styled multiline output, stdin JSON, and idle redraw. These are targeted results, not a full-CI or cross-platform pass: pinned-toolchain CI, the dedicated argument-comment lint, and macOS/Windows checks remain outstanding. Local Clippy with Rust 1.99 also encounters an existing error in unchanged layout code; the repo pins Rust 1.95.
Sharing these findings as technical reference under the contribution policy. A documented command hook would let users keep their preferred display while continuing to use normal Codex updates.
iscarelli commentedon Oct 18, 2026
Concrete proposal: two-line, script-backed status area with Windows support
Adding a concrete use case to this feature request, observed with Codex CLI 0.163.0 on Windows. The native
/statuslinepicker cannot express the layout and derived metrics below. I would like an opt-in external renderer, without maintaining a custom Codex build.Command interface
Run a user-configured command, send a documented, versioned JSON snapshot on stdin, and render its UTF-8 stdout as a status area supporting at least two explicit lines, Unicode blocks, and ANSI colors. Refresh asynchronously on relevant state changes, terminal resize, and a configurable interval so reset countdowns can update while idle. Use a timeout and prevent overlapping executions.
One possible configuration, proposed rather than an existing setting:
Proposed stdin data
The following is an illustrative schema, not a report of an existing payload. Field names can follow Codex conventions:
{ "schema_version": 1, "workspace": {"current_dir": "C:/work/project", "git_branch": "main"}, "model": {"id": "active-model-id", "display_name": "Active Model", "provider_id": "active-provider"}, "execution": {"mode": "default", "approval_policy": "on-request", "sandbox_mode": "workspace-write"}, "context": { "total_input_tokens": 450000, "total_output_tokens": 12000, "used_tokens": 80000, "window_tokens": 300000 }, "rate_limits": { "active_bucket_id": "active-model-bucket", "buckets": [{ "id": "active-model-bucket", "provider_id": "active-provider", "model_ids": ["active-model-id"], "five_hour": {"used_percent": 7, "reset_after_seconds": 8400}, "weekly": {"used_percent": 37, "reset_after_seconds": 280800} }] }, "terminal": {"columns": 220, "status_area_columns": 218} }Desired two-line layout
Left side of line 1:
Right side of that same line, aligned to the usable right edge:
Line 2, colored according to the active mode:
The renderer could append the actual mode-switch shortcut when available; shortcuts and mode names should reflect Codex, rather than being copied from another CLI.
The script would implement a Dracula-style palette, 10-cell bars, a configurable fixed context target (e.g. 300k), and an orange
[Compact!]hint at or above 160k current context tokens. This would be a user-defined hint, independent of Codex's automatic compaction policy. Weekly pacing is derived asfree_percent / days_until_reset, with defined behavior when the reset is due or data is unavailable. Narrow terminals should have documented clipping/reflow behavior.Windows and rendering requirements
With stdout captured through a pipe,
shutil.get_terminal_size()can fall back to 80 columns. A Windows helper can try openingCONOUT$and callingGetConsoleScreenBufferInfothroughctypes; the visible window width (srWindow.Right - srWindow.Left + 1) matters when the backing buffer is wider. This fallback is unavailable when there is no attached console, so passing the usable width from the TUI is preferable.Please document UTF-8 stdin/stdout behavior for Python and batch wrappers, preserve symbols such as
█,░,⏵, and↺, and measure display-cell width without counting ANSI color sequences. Restrict supported ANSI to safe styling, with no arbitrary cursor movement. Helper failure or timeout should leave the TUI responsive, with a documented fallback and diagnostics outside the status text.Acceptance criteria
tui.status_lineconfiguration remains available.scottlz0310-user commentedon Oct 27, 2026
I maintain agent-statusline, which uses a shared renderer with custom status-line commands in Claude Code, GitHub Copilot CLI, and Antigravity CLI. Each client passes session JSON to the command.
I understand that Codex's
/statuslinealready lets users select and reorder built-in items such as model, context, and usage limits. The remaining gap is an official extension point for connecting an arbitrary renderer. As a result, the same tool cannot currently provide a status line in Codex, and users cannot share their preferred layout or project-specific information across these CLIs.This is a concrete interoperability issue for existing tools. If Codex exposed a way to pass documented JSON to an explicitly configured command and render its output in the TUI, while retaining the built-in status line, users could reuse the status-line ecosystem without requiring Codex to add a built-in item for every use case. The data contract should clearly describe which values Codex can provide, with cost and quota fields optional when unavailable.
Once this extension point is stable, I would like to add a Codex adapter to agent-statusline so the same renderer can work there too.
ryoppippi commentedon Nov 15, 2026
Note
🤖 GPT-6.1 Sol responding on behalf of ryoppippi
Adding a ccusage integration use case and a source-level status question.
We would like
ccusage codex statuslineto display locally calculated session/daily token usage and estimated API-equivalent cost inside the native Codex CLI footer. Selecting built-in fields does not provide an extension point for that calculation. A documented MCP provider interface would work for this use case; it does not have to be a shell-command hook.I checked the latest stable tag,
rust-v0.169.0, andmainatee344ca9458351a6ea102795fa73110ad3ede5dc. The recent MCP work looks relevant:com.openai/codex-statusline-statemetadata.On the inspected
main,ResolvedStatuslineProvideris still marked as staged/dead code, and its lookup/read callers appear to be tests. The provider-setting persistence function similarly refers to an upcoming picker. I could not identify a production provider refresh/read/render loop or a documented resource-response contract.Is this integration still intentionally staged? If it is already usable, could you point to the supported version and setup? Otherwise, a documented provider advertisement, state payload, resource response format, and refresh/failure behavior would let ccusage implement against the intended interface once it is available.
This is a feature/integration request based on source inspection, not a claim that the existing built-in
/statuslineis broken. I have not patched/rebuilt Codex or verified the MCP provider on screen.etraut-openai commentedon Nov 21, 2026
Custom status lines are available to try in Codex CLI 0.171.0!
/experimental, enable Custom status line, and restart the CLI./statuslineand select Create a custom status line. Describe what you’d like to see, and Codex can help build it. If you already have a provider installed, select Choose a status line provider.For anyone maintaining a tool like
ccusage, the MCP provider interface is ready to try in this release. Codex sends the provider a snapshot of the displayed thread, including the model, working directory, and available usage data. The provider can combine that with its own data and return plain text or styled content. Codex refreshes the footer automatically.If you already have a status line script, you can wrap it in a stdio MCP provider. The provider guide documents discovery, rendering, and refresh behavior, with a working Python example and TypeScript definitions for the input and output.
iscarelli commentedon Nov 22, 2026
Tested the new MCP statusline provider on Codex CLI 0.171.0 on Windows, following the bundled
create-statuslineguide. I can now reproduce most of the status display I use in Claude Code without maintaining a patched Codex binary. Thanks for shipping this!The screenshot shows directory and Git branch/dirty state, a 10-cell context bar with current-context tokens, 5-hour and weekly consumed-usage bars, reset countdowns, remaining weekly allowance with hourly/daily pacing, model, and the current approval mode (
Approve for mehere).A few findings from this test:
row.props.gapkept adjacent groups separated; relying on leading/trailing spaces in separate text nodes made the initial version look cramped.row.props.backgroundwork. However, the background only covers rendered content/gaps and stops before the footer's right edge, as shown above.The remaining request is a supported way to fill the available footer width with a row background, handled by the TUI so it follows resizing and wrapping. The published snapshot does not expose the actual usable footer width. Querying the Windows console width is only an approximation and does not reliably account for TUI padding or side panels. A fill/stretch option or a footer-background setting would avoid padding tricks. Optional vertical spacing above the custom footer would also help separate it from the composer.
This is a live Windows rendering test, not a full cross-platform or resize-matrix validation. The custom provider passed 10 local checks covering MCP stdio, context/quota calculations, missing data, Git state, approval labels, spacing, configuration preservation and nonblocking OS queries.