You're offline. Changes may not be saved.

#14 PROJECT
Codex Token Tracker
by DevCorner · Developer Operations
A Python-based token monitoring tool built to track Codex usage, model costs, cached input, per-session spend, budget progress, and workspace-level token patterns.
Role
Developer / Automation BuilderScope
Developer OperationsStack
Codex Token Tracker is a Python-based internal developer operations tool built to monitor and control Codex token usage inside a VS Code workflow.
The tool was created after noticing that long-running Codex sessions, broad prompts, repeated file context, and large workspace scans could quickly increase daily token usage. Instead of guessing where tokens were going, the tracker gives a live breakdown of session-level usage, cached input, output tokens, reasoning output, model selection, estimated cost, repo match, and budget progress.
The system reads Codex JSONL rollout data when available, falls back to local SQLite session data when needed, and generates live terminal reports while Codex tasks are running. It also stores results to CSV so usage can be reviewed over time.
The main goal was to make Codex usage measurable and actionable. By pairing the tracker with tighter prompt formatting, smaller search scopes, route/file-specific prompts, AGENTS.md workflow rules, and better repo context control, the workflow helped reduce token usage by an estimated 50–60% per day depending on prompt structure and task size.
Role
Developer / Automation Builder
Timeline
Internal Tool
Scope
Developer Operations
Case Study:
Resources
Tools: Python, Node.js

