Repository navigation
Description
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?
- Submit a prompt that results in a very long active turn (hours) with sustained activity.
- Keep the same turn running continuously.
- Observe the in-progress elapsed display over time.
- 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.rscomputes final separator elapsed viastatus_widget().elapsed_seconds()in turn completion path.bottom_panemay recreate/hide status indicator during streaming, andStatusIndicatorWidget::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):
- Frequently shows
Waiting for background terminaleven after background terminal has terminated #12033 - Desktop: stale 'Running N terminals' shown after all processes are already dead #12321
- Codex says it is waiting for background terminals, but the ps command shows that no background terminals are running #13708
Activity
github-actions commentedon Mar 22, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
kevin-valerio commentedon Apr 27, 2026
Any update on this issue please ?
simfor99 commentedon Jun 9, 2026
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.etraut-openai commentedon Oct 12, 2026
(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.