AI Coding Agent Cost Estimation
A practical, customer-ready process for analyzing a repository, selecting real engineering tasks, and estimating the cost of implementing code, documentation, and tests before a long AI-agent run begins.
Large repositories create cost uncertainty.
A coding agent may read thousands of files, plan multiple implementation paths, generate tests, retry failures, and consume cached context differently in every provider.
Without a dashboard
- No comparable Claude, Amp, and Droid run record.
- Task scope is unclear before expensive execution.
- Timeouts, CLI failures, and stale logs confuse operators.
With the ESL dashboards
- Analyze repo, select tasks, estimate selected work.
- Apply provider-specific pricing and telemetry parsing.
- Export reusable tests with bounded timeout/cancel behavior.
Controlled wrapper around real agent CLIs.
The dashboard launches Claude, Amp, or Droid with bounded subprocess control, requests structured analysis, parses telemetry, and writes one comparable cost ledger.
Input contract
Repo path, model/mode, timeouts, forecast settings, selected task IDs.
Analysis prompt
Request bounded task suggestions with stable IDs, scope, risk, and touched areas.
Telemetry extraction
Claude cost field; Amp streamed usage; Droid result usage to API-equivalent cost.
Per-task estimate
Estimate code, tests, docs, verification loops, and context load for each checked task.
Normalized ledger
Analysis cost, task cost, tokens/cache, status, and .ai-agent-test.json.
Telemetry in, normalized cost record out.
Each provider has a parser adapter, but every run becomes the same internal record so the same task list can be compared.
analysis_cost = adapter.analysis.cost
task_costs = selected_tasks.map(estimate_task)
cost = reported_cost ?? (
input×rate_in + output×rate_out +
cache_read×rate_read + cache_write×rate_write
) / 1_000_000
measured_total = analysis_cost + Σ(ok_task_costs)
forecast = measured_total × devs × days × frequency
Claude: prefer reported cost.
Technical behavior
- Uses Claude Code telemetry and reported
total_cost_usdwhen available. - Separates analysis cost from selected task estimates.
- Opus is the default model for high-capability enterprise-class estimates.
- Per-task rows preserve status: OK, timed out, cancelled, or CLI error.
Amp: parse streamed usage and price credits.
Technical behavior
- Runs Amp stream JSON and extracts assistant-message usage.
- Prices input, output, cache read, and cache write separately.
- Uses credits-based logic; Amp has no dashboard seat-price algorithm.
- Smart mode is treated as Opus-class pricing according to current Amp behavior.
Droid: separate technical usage from plan billing.
Technical behavior
- Uses current Droid CLI syntax and parses returned usage.
- Converts observed tokens into API-equivalent comparison cost.
- Factory plans, Core usage, and Extra Usage can change billing.
- Imported saved tests allow the same task IDs to be re-estimated under Droid.
The estimation process protects the workstation.
Large repositories can produce slow CLI calls and heavy context processing. The dashboards use bounded subprocess handling and clear UI states to avoid accidental reruns and confusing logs.
Customer-ready behavior
- Old logs clear on restart, re-analysis, and import.
- Black console windows are hidden during actions.
- Process-tree cleanup kills child commands on cancel/timeout.
- Timeout disables immediate rerun until re-analysis or import.
Install once, then run provider-specific dashboards.
The dashboards are local Python/PyQt tools. Each provider CLI must already be installed and authenticated before its dashboard can collect real usage data.
- Windows workstation sized for the target repository.
- Python 3.11+, Git, PyQt dependencies.
- Claude Code, Amp, and/or Droid CLI authenticated.
- Local repository path for the project under analysis.
git clone https://github.com/zuwasi/ai-coding-agents-cost-calculators.git
cd ai-coding-agents-cost-calculators
# Install Python dependencies
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
# Run the dashboard you need
python qt_dashboard\claude_cost_dashboard.py
python amp_dashboard\amp_cost_dashboard.py
python droid_dashboard\droid_cost_dashboard.py
Recommended demo flow
- Verify CLI authentication on a small repository first.
- Analyze, review suggested tasks, then select scope.
- Estimate one task first; add more only when stable.
- Export JSON and import it in another dashboard for comparison.
Use estimates as engineering guidance, not invoices.
The dashboards explain cost drivers before implementation. Final cost still depends on agent decisions, retries, cache behavior, provider pricing, and the customer plan.
Key concepts
- Analysis cost: repository discovery and task suggestion.
- Task estimate: projected code, docs, and tests for selected work.
- Provider model: Claude direct cost, Amp credits, or Droid API-equivalent estimate.
- Forecast: per-task usage scaled into team planning assumptions.
Make AI coding costs explainable before they happen.
Engineering Software Lab turns provider CLI usage into a repeatable decision process for demos, customer planning, and internal engineering governance.
For engineering
- See which tasks are likely expensive.
- Compare providers on the same saved task set.
- Reduce workstation freezes and runaway CLI calls.
For management
- Translate token usage into budget conversations.
- Explain pricing differences without misleading seat math.
- Keep customer demos repeatable and auditable.