The Complete Claude Guide
← Back to topic
Chapter 30 · CLI

Costs, privacy, troubleshooting and full index

The final chapter closes the CLI part: cost management and usage tracking, privacy and security principles, common troubleshooting, and a full index of commands, settings, environment variables and tools for self-lookup.

Verified against source on 2026-09-30

Video

Run it for real: costs, privacy and staying unblocked

You will read your actual usage, cut waste, know what leaves your machine and have a plan for common failures. Outputs are illustrations.

Cost, troubleshooting and settings sources checked September 30, 2026 describe token-based charging, plan-attributed usage, and the levers that reduce spend. Numbers here are from the docs as of today; check current pricing before making budget decisions.

Read your real usage first

/usage shows session token statistics; the dollar figure is a local estimate, and the Console Usage page is authoritative for billing. On plans, the same screen attributes recent usage to skills, subagents, plugins and MCP servers, with 24-hour and 7-day views, computed from this machine's history only.

Review my usage breakdown with me.
Identify which features account for most tokens this week.
Suggest one change that would cut spend without cutting the work.
Do not change any settings.

Enterprise averages in the docs are around $13 per developer per active day, with most users below $30; your number is the one that matters. Set a monthly spend limit with /usage-credits if you use credits, and note that changing it needs billing access.

The levers that actually cut cost

Clear between unrelated tasks with /clear so stale context stops being billed on every message; /rename first so you can resume later. Give compaction instructions, keep CLAUDE.md lean, prefer smaller models for teammates and routine work, and keep agent teams and workflows small and cleaned up. Prompt caching and auto-compaction already help; the rest is context discipline.

Know what leaves your machine

Local sessions send conversation content to the model provider. Beyond that, each feature has its own boundary: artifacts publish a page to claude.ai; channels relay through chat platforms; Remote Control passes through Anthropic's servers; cloud sessions move files to Anthropic infrastructure; CI actions send repository content to the workflow run. Review each feature's data path before enabling it for sensitive projects, and check the data-usage documentation for retention questions.

A short troubleshooting loop

Most recurring problems follow one pattern: reproduce minimally, read the actual error, check version, then settings.

1. Reproduce in an empty practice directory.
2. Read the error text; search it in the official troubleshooting page.
3. Check your version against the feature's minimum.
4. Review settings scope: user, project, local, managed.
5. Only then change configuration, one variable at a time.

/doctor-style diagnostics and the debug log (claude --debug or /debug) show what was actually loaded. When a hook fails non-blocking, the transcript notice names it; the full stderr is in the debug log.

Keep the index close

The official docs index lists every command, setting, environment variable and tool reference. When this guide and the live docs disagree, the live docs win for behavior, and dated examples here explain the reasoning pattern. Re-verify load-bearing features against current sources before teaching or selling a workflow that depends on them.

Graded practice

Easy: usage

Read your own breakdown. Success: name the top token source this week.

Intermediate: waste cut

Apply one context-discipline change. Success: measurable usage drop on a repeated task.

Challenging: incident

A feature silently stopped working after an update. Success: version-minimum and settings-scope diagnosis.

Troubleshooting

Bill higher than expected: check usage attribution and per-run JSON costs.

Feature missing: minimum version, plan and provider constraints.

Slow sessions: context size, MCP servers and background tasks.

Settings not applying: scope precedence and managed settings.

Guide vs docs: trust the live source and note the difference.

Filmed demo · Video is added in the media phase

Recap

Comprehension check

What is the best way to control Claude Code costs?

Recap

Sources and further reading

← Previous Back to topic