Codex Cost Monitor
Monitor and estimate your Codex API cost directly inside VS Code.
This extension scans local Codex session logs and calculates token usage and estimated cost by model, helping developers track their spending and avoid unexpected API charges.
Features
📊 Daily Cost Dashboard
Displays today's API cost with budget comparison.
Example:
## Today
Day: 2026-03-06
Cost: ¥44 (USD $0.26)
Budget: ¥2000
Usage: 2.1%
The progress bar quickly shows how much of the daily budget has been used.
📈 Cost by Model
Displays cost grouped by model.
## Cost by model
Model | JPY | USD
-------------------+-----+------
gpt-5.4 | ¥42 | $0.25
gpt-5.1-codex-mini | ¥1 | $0.01
Useful for identifying which models consume the most cost.
📅 Monthly Cost Overview
Tracks monthly API spending.
## This Month
Month: 2026-03
Cost: ¥1280
Budget: ¥60000
Usage: 2.1%
Helps estimate long-term usage and spending trends.
📜 Cost History
The extension automatically stores historical cost data.
Daily History
## Daily History
DATE | JPY | USD
-----------+-----+------
2026-03-06 | ¥44 | $0.26
2026-03-05 | ¥62 | $0.39
2026-03-04 | ¥33 | $0.20
Monthly History
## Monthly History
MONTH | JPY | USD
--------+-----+------
2026-03 | ¥1280 | $8.00
2026-02 | ¥5400 | $33.75
History is automatically stored and maintained.
⚠ Spending Forecast Warning
The extension estimates today's final spending speed.
Example warning:
⚠ At this speed you will spend ¥42000 this month
This helps prevent exceeding monthly budgets early.
🔍 Automatic Log Scanning
The extension automatically scans Codex session logs.
Default location:
~/.codex/sessions
Example structure:
~/.codex/sessions
└── 2026
└── 03
└── 06
├── session1.jsonl
└── session2.jsonl
Each .jsonl file contains token usage metadata used to estimate cost.
💾 Automatic History Storage
The extension automatically:
- saves daily cost history
- generates monthly summaries
- keeps up to 365 days of history
- sorts records automatically
No manual setup required.
Example Dashboard
# Codex Cost Monitor
rate 1 USD = 170 JPY
## Today
Day: 2026-03-06
Cost: ¥44 (USD $0.26)
Budget: ¥2000
Usage: 2.1%
## Cost by model
Model | JPY | USD
-------------------+-----+------
gpt-5.4 | ¥42 | $0.25
gpt-5.1-codex-mini | ¥1 | $0.01
## This Month
Month: 2026-03
Cost: ¥1280
Budget: ¥60000
Usage: 2.1%
## Daily History
DATE | JPY | USD
-----------+-----+------
2026-03-06 | ¥44 | $0.26
2026-03-05 | ¥62 | $0.39
## Monthly History
MONTH | JPY | USD
--------+-----+------
2026-03 | ¥1280 | $8.00
2026-02 | ¥5400 | $33.75
Installation
1️⃣ Open VS Code
2️⃣ Go to Extensions
3️⃣ Search:
codex-cost-monitor
4️⃣ Click Install
Usage
After installation:
- Open Command Palette
Ctrl + Shift + P
- Run:
Codex Cost Monitor: Show Dashboard
- The dashboard will display:
- Today's cost
- Budget usage
- Model cost breakdown
- Daily and monthly history
Configuration
Settings can be customized in VS Code:
codexCostMonitor.dailyBudgetJpy
codexCostMonitor.usdToJpy
codexCostMonitor.baseDir
Example configuration:
dailyBudgetJpy = 2000
usdToJpy = 170
Supported Models
Current pricing support includes:
- gpt-5.4
- gpt-5.3-codex
- gpt-5.2-codex
- gpt-5.1-codex-mini
Additional models may be added in future updates.
Requirements
- Codex CLI installed
- Codex sessions saved locally
Default path:
~/.codex/sessions
Known Limitations
- Cost values are estimated
- Pricing may change depending on OpenAI updates
- Only sessions containing token usage metadata are counted
Release Notes
1.0.0
Initial release
Features:
- Daily cost dashboard
- Token usage parsing
- Cost by model
- Budget monitoring
- Historical tracking
- Spending forecast