Who it is forA developer or team lead tracking how much a Codex task consumed before deciding whether to repeat a similar workflow.
The problemToken counts and spend for a Codex task are spread across logs, so per-task totals are hard to see.
The outcomeTask and turn token totals, cache usage, and an estimated cost for the selected task, plus the latest available local quota sample.
What you need first
- Codex installed on macOS, Linux, or Windows
- uv installed (https://docs.astral.sh/uv/getting-started/installation/)
- Local Codex task logs on the same device
Steps
- Run
codex plugin marketplace add icesixgod/codex-trajectory - Run
codex plugin add codex-trajectory@icesixgod - Open a new Codex task to load the plugin.
- Open Codex Trajectory from the task's right panel or ask Codex to show the task trajectory.
- Read the top statistics for task and turn totals, cache usage, and estimated cost.
Prompt for your agent
Using the icesixgod/codex-trajectory repo, open the trajectory for the Codex task <sessionId> and report its token totals, cache usage, and estimated cost. Verify that the cost is labeled as an estimate based on bundled API prices, not a subscription bill.
Caveat. Cost figures are estimates based on bundled API prices and do not match a Codex subscription bill, and local quota samples may lag the account service.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page