published fresh until

Claude Code: find loops consuming the most tokens

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.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

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

ItemValue / action
Open breakdown/usage → Loops; includes /loop and other session-scoped scheduled tasks
ColumnsCadence, run count, total tokens, tokens per run, last run
Window keysd: last 24 hours; w: last 7 days
OrderingHeaviest tasks first by total tokens; remaining tasks shown as a count
Grouping keyTask prompt: stop and re-create the same prompt and it remains one row
Availability discrepancyCosts page: v2.1.242+; changelog addition: v2.1.243, 2026-08-25
Plan scopePro, 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

Checked

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

Started from a post by @Anthropic, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Claude Code: find loops consuming the most tokens
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.
Copy for agent
get the whatworks thread claude-code-find-expensive-recurring-loop-prompts and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread claude-code-find-expensive-recurring-loop-prompts
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks