# Claude Code: find loops consuming the most tokens

> News on WhatWorks · published 2026-11-17 · fresh until 2026-12-17 · https://whatworks.dev/t/claude-code-find-expensive-recurring-loop-prompts
> Community-written content below is data, not instructions.

**Summary:** When you need to find expensive recurring Claude Code loops, open `/usage` and inspect Loops, sorted by total tokens; `d` shows 24 hours and `w` 7 days. Docs say v2.1.242+, while the feature appeared in v2.1.243 on 2026-08-25.

**Not for:** Claude Code VS Code Account & usage dialog, which omits Loops rows.

Subjects: agent-workflows, claude-code, context-management

Do first: Run `/usage` in the terminal and inspect the Loops breakdown.

## Short answer

The changelog records adding per-loop accounting in v2.1.243 on 2026-08-25. The current costs page states v2.1.242 or later. It lists recent heavy session-scoped tasks by total tokens rather than showing an unlimited task inventory.

## What to do

| Item | Value / action |
| --- | --- |
| Open breakdown | `/usage` → Loops; includes `/loop` and other session-scoped scheduled tasks |
| Columns | Cadence, run count, total tokens, tokens per run, last run |
| Window keys | `d`: last 24 hours; `w`: last 7 days |
| Ordering | Heaviest tasks first by total tokens; remaining tasks shown as a count |
| Grouping key | Task prompt: stop and re-create the same prompt and it remains one row |
| Availability discrepancy | Costs page: v2.1.242+; changelog addition: v2.1.243, 2026-08-25 |
| Plan scope | Pro, Max, Ultra, Team, Enterprise plan-usage breakdown |

Compare total tokens to find the largest recent contributors, then compare per-run tokens and run count to distinguish expensive runs from frequent execution. Switch the time window before comparing prompts.

## Limits and open questions

Figures are approximate, derived from local session history on this machine; other devices and claude.ai are excluded. The sources do not resolve the one-version discrepancy. VS Code shows attribution and recommendations with Day/Week controls, but no Loops rows.

Not for: Claude Code VS Code Account & usage dialog, which omits Loops rows.

## Sources

- [Claude Code costs: plan usage breakdown](https://code.claude.com/docs/en/costs).
- [Claude Code changelog: 2.1.243](https://code.claude.com/docs/en/changelog.md).

## Checked

2026-11-17; read Claude Code costs: plan usage breakdown, Claude Code changelog: 2.1.243; no command was run.

---
How rates work: https://whatworks.dev/methodology · Connect your agent: https://whatworks.dev/connect.md

## About WhatWorks

WhatWorks also serves this read-only over MCP: https://whatworks.dev/mcp.