Preflight Checklist
Problem Statement
Currently, users have no visibility into the cost of their Claude Code operations without manually asking Claude to estimate costs or checking external billing dashboards. This makes it difficult to:
- Understand the cost impact of different commands (e.g.,
/init, code generation, file operations)
- Budget and manage AI usage within teams/organizations
- Make informed decisions about when to use Claude Code vs. other tools
- Track costs in real-time during development sessions
Proposed Solution
1. Per-Command Cost Display
After each command or significant operation, display estimated costs:
✓ /init completed successfully
Tokens used: 38,315 (30,000 input + 8,315 output)
Estimated cost: $0.21 (based on Claude 3.5 Sonnet pricing)
2. Session Summary
When exiting Claude Code or on-demand via a command like /costs, show:
=== Session Cost Summary ===
Duration: 45 minutes
Total tokens: 156,432 (120,000 input + 36,432 output)
Estimated cost: $0.91
Breakdown by operation:
/init command: $0.21 (38,315 tokens)
Code generation: $0.45 (85,120 tokens)
File operations: $0.15 (22,450 tokens)
Conversation: $0.10 (10,547 tokens)
3. Running Cost Counter
Display current session costs in the status bar or header:
Claude Code | Session: $0.45 | Tokens: 67.2K
Alternative Solutions
- External monitoring only - Requires users to check AWS/Anthropic dashboards separately (poor UX)
- Post-session analysis - Users can't make real-time decisions about usage
- Third-party wrappers - Adds complexity and maintenance burden
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
As a developer, I want to see the cost of each command so I can understand which operations are most expensive.
As a team lead, I want a session summary showing total costs so I can track and budget for Claude Code usage across my team.
As a finance manager, I want users to see cost warnings when sessions become expensive so we can control AI spending.
As an enterprise user, I want to configure custom pricing that matches my negotiated rates so cost estimates are accurate.
Additional Context
Token usage warnings are already displayed (e.g., "Token usage: 38315/200000"), which shows the infrastructure for tracking is in place. This feature would add cost calculation and better presentation of that existing data.
Preflight Checklist
Problem Statement
Currently, users have no visibility into the cost of their Claude Code operations without manually asking Claude to estimate costs or checking external billing dashboards. This makes it difficult to:
/init, code generation, file operations)Proposed Solution
1. Per-Command Cost Display
After each command or significant operation, display estimated costs:
2. Session Summary
When exiting Claude Code or on-demand via a command like
/costs, show:3. Running Cost Counter
Display current session costs in the status bar or header:
Alternative Solutions
Priority
Medium - Would be very helpful
Feature Category
CLI commands and flags
Use Case Example
As a developer, I want to see the cost of each command so I can understand which operations are most expensive.
As a team lead, I want a session summary showing total costs so I can track and budget for Claude Code usage across my team.
As a finance manager, I want users to see cost warnings when sessions become expensive so we can control AI spending.
As an enterprise user, I want to configure custom pricing that matches my negotiated rates so cost estimates are accurate.
Additional Context
Token usage warnings are already displayed (e.g., "Token usage: 38315/200000"), which shows the infrastructure for tracking is in place. This feature would add cost calculation and better presentation of that existing data.