All workflows
Engineering

Agentic coding assistant for engineers

An in-IDE and CI coding agent that reads the repo, writes and edits code, runs tests, and opens PRs - iterating until the task is green.

Agentic coding assistant: $1.35/run, $67.5k/yr, 57% invisible in accumulated-diff history, agent-loop hops, and full-repo re-embedding. Firedog instruments every iteration across the engineering team.

Model 28%Prompt 16%Orchestration 10%Retrieval 13%History 33%
ComponentWhy it is unattributedcalls$ / run
Model · 28%Code generation and editing (Claude Sonnet 4)Each iteration sends the relevant repo files, the task, and the current diff to Sonnet 4 and receives edited code or a next-step plan.tokens in: 90,000 · tokens out: 7,000Visible on the invoice.10$0.38
Prompt · 16%Coding-agent system prompt and repo conventionsA 7,000-token prefix carrying the agent instructions, repo conventions, and tool schemas is resent on every iteration without prompt caching.tokens in: 70,000 · tokens out: 0Visible on the invoice.10$0.21
Orchestration · 10%Agent loop: plan, edit, test-run, PR hopsEach task runs a planner, file-editor, test-runner, and PR-writer as separate tool calls against GitHub/GitLab and CI. A 10-step task produces ~24 billed hops.tokens in: 25,000 · tokens out: 4,000The plan-edit-test-PR hops are abstracted into one 'agent task' in the tool's logs; the underlying billed calls are never broken out per step.24$0.14
Retrieval · 13%Codebase semantic search and re-embeddingThe agent runs semantic search over the repo on each iteration and re-embeds changed files - and often the whole repo - rather than updating incrementally.tokens in: 40,000 · tokens out: 0Codebase embedding runs on the embedding-provider invoice; full-repo re-embeds are a default that never surfaces in the engineering LLM spend view.20$0.18
History · 33%Conversation and accumulated diffs re-sent each iterationThe full agent conversation and every accumulated diff is resent on each iteration so the model retains prior reasoning. By step 10 this is 120k+ tokens re-billed each call.tokens in: 150,000 · tokens out: 0Accumulated agent state is framed as 'context window' by the coding tool, not as re-billed tokens, so it never appears in per-call spend reporting.10$0.45
An agentic coding task costs ~$1.35; run 8 a day across 25 engineers and it is ~$67.5k/yr - 57% of it accumulated-diff re-injection, agent-loop hops, and full-repo re-embedding no one instrumented.
$1.35
cost per run
$68k
per year
57%
unattributed today
$10.80
per user, per day
Scenario: ~25-engineer team, agentic coding assistant. 25 active users, 8 runs/day, 250 working days. 10 documents/run. Avg doc: 3,000 tokens.

Default model: claude-sonnet-4

Trigger: Per engineering task or ticket, plus inline completions throughout the day. A developer runs 6-12 agentic tasks daily; each task iterates 6-15 steps.

Who runs it: The engineering team building the product. Each developer runs the agent on tickets from Jira/Linear; it works against the GitHub/GitLab repo and posts results to Slack. Agentic loops and repo context make it the most expensive workflow per run.

What Firedog shows

  • Token cost per agent iteration, showing the step where accumulated-diff history overtakes actual code generation.
  • Which tasks trigger full-repo re-embedding versus incremental updates, and what that costs per developer.
  • Projected annual saving from capping iteration depth with summary compression and caching the agent system prompt.

Decisions this informs

  • Compress agent history into a rolling summary after step 5 to stop unbounded diff and conversation accumulation.
  • Cache the 7,000-token coding-agent system prompt and repo-conventions prefix; at 10 iterations/run this is a large recurring saving.
  • Switch codebase retrieval to incremental embedding so only files changed since the last run are re-embedded, not the whole repo.

Understand every AI dollar.

Book a demo to see how Firedog attributes every AI request across your organization, and what your leadership team can do with the data.