{"slug": "setting-the-status-line-for-all-projects-in-codex", "title": "Setting the status line for all projects in Codex", "summary": "OpenAI's Codex CLI version 0.146.1 restricts the TUI status line to a fixed list of 26 built-in item identifiers, unlike Claude Code which accepts any executable command, according to a developer's analysis of the Codex source code. The global configuration file ~/.codex/config.toml allows ordering items such as \"model-with-reasoning\", \"current-dir\", and \"git-branch\", but custom scripts are not supported. The author found that codex doctor does not validate status line item names, as a test with a bogus item still reported a valid configuration.", "body_md": "After writing about [setting Claude Code status line with Ruby](https://allaboutcoding.ghinda.com/you-can-use-ruby-to-set-the-status-line-in-claude-code/), I wanted to see if the same thing is possible for Codex and dig a bit more.\n\nFirst, all 3 let you set the status line globally, at the user level, or locally per project.\n\nSecond, the way they work is different, and only Claude accepts a command as I described it in [the previous article](https://allaboutcoding.ghinda.com/you-can-use-ruby-to-set-the-status-line-in-claude-code/).\n\nHere is a summary of the findings so far:\n\n| Tool | Global file | Setting | What it accepts |\n|---|---|---|---|\n| Claude Code | `~/.claude/settings.json` |\n`statusLine` |\na command, so any executable |\n| Codex | `~/.codex/config.toml` |\n`[tui] status_line` |\nan ordered list of built-in item names |\n| opencode | `~/.config/opencode/tui.json` |\n`plugin` |\na TUI plugin with a JS or TS entry |\n\nThus, a Ruby script can be used directly only in Claude Code, while Codex only allows specific items to be displayed there, and opencode will need a JavaScript entry point that can run a Ruby script if you want it to.\n\nCodex will read the global config from `~/.codex/config.toml`\n\nand then load it if it exists in `.codex/config.toml`\n\nfrom the project folder where it runs.\n\nThe settings can be defined as:\n\n```\n[tui]\nstatus_line = [\"model-with-reasoning\", \"current-dir\", \"five-hour-limit\", \"weekly-limit\", \"git-branch\", \"context-used\", \"context-window-size\", \"fast-mode\"]\nstatus_line_use_colors = true\n```\n\nYou cannot define a custom script (or maybe I could not find it quickly, but as Codex is open source, you can dig more if you want in their source code), so you have to pick from what Codex allows you to choose and then put those in the order that you want to see them.\n\nThe [config documentation](https://learn.chatgpt.com/docs/config-file/config-reference) says this about the status line:\n\nOrdered list of TUI footer status-line item identifiers.\n\n`null`\n\nturns off the status line.\n\nI could not find in the documentation the exact list of identifiers, so I dug it in the Codex source and found this list of possible status line items at [ StatusLineItem](https://github.com/openai/codex/blob/rust-v0.146.1/codex-rs/tui/src/bottom_pane/status_line_setup.rs#L50-L135) from version 0.146.1 with 26 items:\n\n```\napproval-mode          branch-changes        codex-version\ncontext-remaining      context-used          context-window-size\ncurrent-dir            fast-mode             five-hour-limit\ngit-branch             model                 model-with-reasoning\npermissions            project-name          pull-request-number\nraw-output             reasoning             run-state\ntask-progress          thread-id             thread-title\ntotal-input-tokens     total-output-tokens   used-tokens\nweekly-limit           workspace-headline\n```\n\nPlease consider this a discovery from the source code. Since there is no official documentation for this, there is no interface contract to keep it as it is\n\nI made a config with a non-existing name `totally-bogus-item`\n\n:\n\n```\n[tui]\nstatus_line = [\"current-dir\", \"git-branch\", \"totally-bogus-item\"]\n```\n\nand then I run the doctor command:\n\n```\nCODEX_HOME=/tmp/codexhome codex doctor --summary\n```\n\nAnd the configuration section came back happy:\n\n```\nConfiguration\n  ✓ config       loaded\n```\n\nThis may be a bug, but I don’t know. But you should not rely on `codex doctor`\n\nto verify that the names you added there are correct.\n\nJust check what the status line looks like, and may I suggest adding items incrementally, one by one.\n\nI like the Claude Code approach more in this case than Codex because you can do a lot more with status line processing than Codex can by default.\n\nFor example, having the session_id there, I already changed my `statusline.rb`\n\nfile to read the session and tell me the last tool that was executed, how many prompts I have written so far, and the context used in the last turn.\n\nCodex does not give this option. You mostly get what the team already implemented. Of course, as it is open source, you can always fork and implement what you need and then make a PR back to the upstream. What they offer is more performant than computing things from the session file.\n\nI would still like to have something like `status_line_command`\n\nin Codex that behaves similarly to how Claude Code does.", "url": "https://wpnews.pro/news/setting-the-status-line-for-all-projects-in-codex", "canonical_source": "https://allaboutcoding.ghinda.com/setting-the-status-line-for-all-projects-in-codex/", "published_at": "2026-08-20 10:32:14+00:00", "updated_at": "2026-08-21 20:44:13.239034+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["OpenAI", "Codex", "Claude Code", "opencode"], "alternates": {"html": "https://wpnews.pro/news/setting-the-status-line-for-all-projects-in-codex", "markdown": "https://wpnews.pro/news/setting-the-status-line-for-all-projects-in-codex.md", "text": "https://wpnews.pro/news/setting-the-status-line-for-all-projects-in-codex.txt", "jsonld": "https://wpnews.pro/news/setting-the-status-line-for-all-projects-in-codex.jsonld"}}