GuidesUpdated

Coding-agent session suddenly burning through usage? Diagnose it

Pause the session, tell context growth from repeated work or a stale estimate, then restart it with a smaller, verified scope.

On this page

A usage spike can come from a long context, repeated tool output, a retry loop, another active session or a stale estimate catching up. Find which signal changed before you switch models or delete history.

Illustrative Canopy Statistics view grouped by CLI and model
Illustrative Canopy Statistics view grouped by CLI and model · Illustrative data; displayed costs are estimates, not provider bills.

Pause and capture a baseline

Stop prompting the session and note the time, CLI, model, task and last action. In Canopy, check its usage signal beside your other agents and record the ‘as of’ time and units. Plan-limit percentage, context fullness, estimated dollars and your bill are four different measurements.

Find what grew

Did the agent read a huge generated file, reprint a long log, search a broad directory or retry a failing command? Was another agent running? Anthropic's Claude Code guidance separates context growth from rate limits and documents /context, /compact and /clear. Use your CLI's own commands; Canopy doesn't rewrite its history or billing.

Check the provider before naming a cost

Canopy's estimate applies an equivalent token price to supported signals. Subscriptions, allowances, caching, discounts and delayed reporting change what you're charged, so check the provider's usage page first. An old snapshot can't diagnose a new turn.

Restart at a smaller boundary

Write down the last accepted result: goal, branch, changed files, checks and next action. To continue the same task, compact if the CLI supports it and check the summary kept key decisions. For a different task, start fresh with that handoff. A model switch won't fix an infinite retry.

Confirm the cause is gone

Run one small prompt and record usage, time and outcome before resuming. If growth continues, check the CLI's settings and active tools, then reproduce with a minimal task. Compare completed work, not one turn's tokens. Redact account details, transcripts and usage screenshots before posting a public bug report.

Want to check the arithmetic? Enter your own token counts and rates in the session cost calculator →

Copyable resources

Runaway-session triage log

Use the same units and timestamps before and after.

Observed at: [time and timezone]
CLI / model / session: [ ]
Task, branch, last accepted result: [ ]
Canopy usage signal: [value, unit, as-of time, estimated or reported]
Provider signal: [value, unit, as-of time, plan or API billing]
Context fullness (if shown): [ ]
Recent large reads, logs, retries or parallel sessions: [ ]
Action: [pause, compact, fresh session, narrower scope, settings check]
One-prompt retest: [outcome, usage delta, elapsed time]
Still unknown: [ ]

Frequently asked questions

Does a full context window mean I hit my plan limit?

No. Context fullness is what one model call can consider; a plan or rate limit is a separate allowance. Check the CLI and provider for the signal you're seeing.

Will switching to a cheaper model fix runaway usage?

It changes the price per token, but repeated failed work or a large carried context continues. Find the cause, bound the next step and compare the complete result.

Is the cost shown in Canopy the amount I was billed?

No. It's an estimate from available CLI signals. Your provider's billing record shows actual charges and limits.

More questions and answers →

Sources and further reading