Add reasoning token usage on json output

Resolved 💬 1 comment Opened Oct 17, 2025 by savva312 Closed Dec 2, 2025

What feature would you like to see?

Currenly when calling codex cli using exec --json you get the usage like below

{
    "type": "turn.completed",
    "usage": {
        "input_tokens": 26549,
        "cached_input_tokens": 22272,
        "output_tokens": 1590
    }
}

but its missing the reasoning token count.

While this information is available in the session file that is created,

{
    "timestamp": "2025-10-17T05:54:20.209Z",
    "type": "event_msg",
    "payload": {
        "type": "token_count",
        "info": {
            "total_token_usage": {
                "input_tokens": 26549,
                "cached_input_tokens": 22272,
                "output_tokens": 1590,
                "reasoning_output_tokens": 1152,
                "total_tokens": 28139
            },
            "last_token_usage": {
                "input_tokens": 6245,
                "cached_input_tokens": 5376,
                "output_tokens": 407,
                "reasoning_output_tokens": 320,
                "total_tokens": 6652
            },
            "model_context_window": 272000
        },
        "rate_limits": {
            "primary": null,
            "secondary": null
        }
    }
}

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗