Skip to content

CLI status line intermittently hides context usage despite saved configuration #62815

Open

Description

@Kimkong1911

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?

  1. Start Codex CLI 0.171.0 in Windows Terminal using PowerShell.
  2. Enable context-used through /statusline and save. The configuration above is persisted.
  3. Continue using the conversation over several turns and observe the footer.
  4. 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

  1. added
    CLIIssues related to the Codex CLI
    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal display
    contextIssues related to context management (including compaction)
    windows-osIssues related to Codex on Windows systems
    on Nov 20, 2026
  2. r266-tech commented on Nov 20, 2026

    @r266-tech

    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, and codex-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.

    Step Observed
    First turn, then ordinary codex resume <id> Context 40% used before and after resume
    Second turn Context 53% used
    Rewind the second prompt and clear the draft Context percentages disappear. Model, directory, and version stay visible.
    Open and close /statusline context-used stays checked and the preview shows Context 0% used. The normal footer still omits it on return.
    Complete a replacement turn Context 60% used
    Separate run, close and resume immediately after rewind Context 40% used returns 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displaybugSomething isn't workingcontextIssues related to context management (including compaction)windows-osIssues related to Codex on Windows systems

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions