Codex task token usage
Run python <skill-directory>/scripts/token_usage.py --top 20 to report local tasks. Use --query <title-or-id> to filter, --top 0 for all tasks, and --output <absolute-json-path> to save the complete result. --codex-home overrides CODEX_HOME or ~/.codex.
The script reads only local session logs and read-only task metadata. Explain coverage: this is the local profile, not verified current-account-wide accounting; other devices, remote hosts, cloud-only and deleted records may be absent. Do not read credentials to identify an account. Missing usage is unknown, never zero.
Report latest recorded cumulative counters per task, with snapshot time and warnings. Never sum successive cumulative events. Cached input is part of input, and reasoning output is part of output; do not add either again. Repeated context across requests counts repeatedly. Counter decreases are flagged, not silently reconstructed. Forked histories may include inherited counters, so do not claim a sum across tasks equals unique account consumption. Subagents remain separate rows; do not add them to parents without verified attribution.
Use exact saved titles. Present a compact table in the user's language with input, cached input, output and total; provide reasoning detail when requested. An active task's final answer may not yet be included. Do not label a last-seen model as the model responsible for all historical tokens. Do not estimate cost or quota percentage without independently verified applicable accounting rules.
If no usable records are found, report the missing source and limits; do not fabricate counts. For remaining account limits use the available Codex usage-limits tool instead.