Skip to content

Final Worked for ... duration resets/truncates on long turns instead of tracking submit→final continuously #15458

Closed

Description

@SlipstreamAI

What version of Codex CLI/Desktop is running?

Observed on recent Codex builds in March 2026 (exact version not captured in this report). I can provide exact version on request.

What subscription do you have?

ChatGPT subscription (exact tier not required for repro).

Which model were you using?

Observed with GPT-5.3 Codex in long-running sessions.

What platform is your computer?

Windows (PowerShell / terminal workflow).

What issue are you seeing?

The final completion duration (Worked for ...) is no longer reliably measuring full turn time from prompt submission to final output.

On long-running turns, the displayed elapsed time appears to reset/truncate partway through (sometimes around ~8 hours in my observations), and the final Worked for ... line reflects the truncated value instead of total end-to-end time.

This is different from stale Waiting for background terminal text. The issue here is specifically the final worked duration accounting.

What steps can reproduce the bug?

  1. Submit a prompt that results in a very long active turn (hours) with sustained activity.
  2. Keep the same turn running continuously.
  3. Observe the in-progress elapsed display over time.
  4. When the model finally returns a final answer, check Worked for ....

Observed:

  • elapsed can reset/truncate during the same long turn,
  • final Worked for ... reports the shortened value, not full submit→final duration.

What is the expected behavior?

Worked for ... should be monotonic and reflect true end-to-end turn duration:

  • Start timing at turn submit/start,
  • Keep counting continuously for the entire turn,
  • Never reset due to UI/status rendering lifecycle,
  • Final line should report full duration (for example, if it ran 25h 43m, show that full duration).

Additional information

This appears related to duration being derived from a status widget lifecycle rather than a stable per-turn timestamp.

Potentially relevant code paths in openai/codex:

  • chatwidget.rs computes final separator elapsed via status_widget().elapsed_seconds() in turn completion path.
  • bottom_pane may recreate/hide status indicator during streaming, and StatusIndicatorWidget::new(...) starts elapsed at zero.

Even if UI status is hidden/restored mid-turn, the final Worked for ... should still use a single per-turn monotonic timer anchor.

Related but distinct issue family (stale waiting state):

Activity

  1. added
    bug
    CLI
    windows-os
    TUI
    on Mar 22, 2026
  2. github-actions commented on Mar 22, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

  3. removed
    CLI
    on Mar 23, 2026
  4. kevin-valerio commented on Apr 27, 2026

    @kevin-valerio

    Any update on this issue please ?

  5. simfor99 commented on Jun 9, 2026

    @simfor99

    Related request: #27203

    This issue covers correctness of the final Worked for ... duration. #27203 asks for an additional opt-in host-side timestamp mode before each visible output block. That would not replace the final duration fix, but would give users reliable wall-clock breadcrumbs during long turns and after context compaction/resume.

  6. etraut-openai commented on Oct 12, 2026

    @etraut-openai
    Contributor

    (response from codex)

    Closing as likely fixed by #19929 (in CLI v0.162.1). The final Worked for duration now uses the whole turn duration from the protocol, rather than time since the last separator. Active timer issues after thread switching remain separately tracked in #19984. Please reopen if a current completed turn still has the wrong total.

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

    TUIbugwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions