Repository navigation
Description
What version of Codex CLI is running?
codex-cli 0.171.0
What subscription do you have?
ChatGPT subscription; tier not provided
Which model were you using?
gpt-6.1-sol, high reasoning effort
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64 (native Windows)
What terminal emulator and version are you using (if applicable)?
Windows Terminal 1.25.3131.0, PowerShell
Codex doctor report
Not attached. CLI version, OS, terminal version, and the relevant status-line configuration were checked locally.What issue are you seeing?
The context-used status line item intermittently disappears and reappears in the same conversation, although it is enabled and saved in config.toml.
Current relevant configuration:
[tui]
status_line = ["model-with-reasoning", "current-dir", "thread-name", "context-used", "weekly-limit"]Observed footer states, with personal paths and the conversation title replaced by placeholders:
Visible earlier:
GPT-6.1-Sol high · <cwd> · <thread name> · Context 52% used · weekly 29% left · 692K used
Missing later:
GPT-6.1-Sol high · <cwd> · <thread name> · weekly 29% left
The earlier state also had used-tokens enabled. I later removed used-tokens deliberately; its absence in the later state is expected. However, context-used remained enabled, and that item still disappeared.
The /statusline setup preview shows the selected context item, while the normal footer sometimes omits it. I have observed the behavior across multiple conversations. There is ample unused horizontal space in the terminal, and the weekly-limit item after context-used remains visible.
Local rollout records contain non-null token usage information even when the footer omits the context item. No error message explains the missing item.
What steps can reproduce the bug?
- Start Codex CLI 0.171.0 in Windows Terminal using PowerShell.
- Enable context-used through /statusline and save. The configuration above is persisted.
- Continue using the conversation over several turns and observe the footer.
- The context usage item can appear, disappear, and later reappear. The selected item also appears in the setup preview when absent from the normal footer.
This is intermittent; I have not identified a reliable trigger. It is not limited to one conversation. The affected conversation originally started in the desktop app and was subsequently used in CLI; whether that matters is unknown.
What is the expected behavior?
Once context usage data is available, keep the selected item visible and update it reliably. If the value becomes temporarily unavailable, show an explicit updating/unavailable state rather than silently removing it.
The setup preview and actual footer should make it clear when a displayed preview value is a placeholder rather than live usage data.
Additional information
Observed on November 21, 2026 (Asia/Shanghai). Version 0.171.0 was also the latest npm release when checked during report preparation.
The report describes the visible behavior; the exact cause has not been established. Reopening the status-line configuration and saving the selection does not reliably resolve the issue.
Related but different reports found during search concern rate-limit fields (#14235, #36116), git-branch fields (#35979), or the whole status line disappearing while typing (#12881). In this case, context-used disappears while other configured fields remain visible.
Activity
r266-tech commentedon Nov 20, 2026
I found one repeatable trigger on the released Codex CLI 0.171.0 for Linux arm64, using a 132-column PTY and a scripted loopback Responses provider. I enabled
context-used,context-remaining, andcodex-version, completed two turns, then pressed Esc, Esc, Enter to rewind before the most recent prompt. I cleared the restored draft before checking the normal footer.codex resume <id>Context 40% usedbefore and after resumeContext 53% used/statuslinecontext-usedstays checked and the preview showsContext 0% used. The normal footer still omits it on return.Context 60% usedContext 40% usedreturns without another user turn or provider request.The saved status-line item list stayed the same. The rewound session's persisted history prefix still contained the first turn's token count with 45,000 input tokens. The prompt-revert handler clears the widget's token state, the footer omits percentages while usage is pending, and the setup preview has a zero-percent placeholder. Replaying usage from the retained history after rewind would let the footer show the same value as a cold resume. Prompt-revert reset · Footer gate · Preview placeholder
This establishes the rewind trigger on Linux. The trigger for the original Windows observation is still unknown. AI-assisted reproduction and source inspection.