Session Statistics Feature
Resolved 💬 3 comments Opened Feb 4, 2026 by romitdasgupta Closed May 10, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor)
responded on this thread — see the highlighted reply below.
What variant of Codex are you using?
CLI
What feature would you like to see?
feat(tui): Add /stats command to display session statistics
Description
## Problem
Users currently have no visibility into session performance metrics. There's
no way to see:
- How many commands were executed and their success/failure rate
- Which files were accessed or modified during the session
- Token usage breakdown across turns
- Time distribution between model inference and tool execution
## Proposed Solution
Add a /stats slash command that displays a scrollable popup with session
statistics organized into sections:
Commands
- Total executed, successful, failed counts
- Success rate percentage
- Total execution time
Files
- Count of files modified and accessed
- Top accessed files with frequency
Turns & Tokens
- Current turn number
- Total/input/output token counts
- Per-turn token breakdown (last 5 turns)
Timing
- Session duration
- Model wait time (with percentage)
- Tool execution time (with percentage)
## Implementation Approach
- New
SessionStatsstruct to track metrics throughout the session - New
StatsViewpopup with keyboard navigation (↑/↓/j/k scroll, Esc close) - Integration points in
ChatWidgetto record events:
- Turn start/end
- Command execution results
- File access via MCP tools
- Patch applications (file modifications)
## Scope
- TUI only
---
Additional information
_No response_
3 Comments
Thanks for the suggestion. This information is available through OTel (open telemetry). It would be pretty easy to vibe code something that monitors OTel events and presents them in a manner of your liking.
Related broader status-surface direction: #14043\n\nThis issue asks for a dedicated /stats popup, which is the right near-term surface. Longer-term, a custom statusline/widget API could complement it by exposing compact live session-stat widgets (edited files, token/timing summaries, etc.) without needing a new built-in field every time.
This feature request hasn't received enough upvotes, so I'm going to close it.