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.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for icesixgod/codex-trajectory and "Check token use and estimated cost of a Codex task"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer