Claude Code

Claude Code /cost and /usage: check token spend, usage limits and reduce costs

How do I check my Claude Code costs and usage limits, and how do I spend less?

Run /usage (or its aliases /cost and /stats) to see session cost, plan usage limits and activity stats. Subscribers on Pro, Max, Team or Enterprise also get a breakdown of what counts against their limits. To spend less, /clear between tasks, pick a cheaper model with /model, lower /effort, and trim context with /context.

Check your usage

/usage shows the current session's token usage and an estimated dollar cost computed locally at list price. /cost and /stats are aliases. The totals reset when /clear starts a new session.

Inside Claude Code

/usage

On Pro and Max, the session cost figure is not relevant for billing because usage is included in the plan. You see plan usage bars instead. For authoritative API billing, use the Usage page in the Claude Console.

On Pro, Max, Team and Enterprise, /usage also shows attribution to skills, subagents, plugins and MCP servers, and flags behaviors such as long context or cache misses that account for 10% or more of recent usage. Press d or w to switch between the last 24 hours and 7 days.

What typical usage costs

Across enterprise deployments, Anthropic reports an average of around $13 per developer per active day and $150 to $250 per developer per month, with costs below $30 per active day for 90% of users. Background functions typically use under $0.04 per session. For plan prices, see claude.com/pricing.

Usage limit messages

  • You've hit your session limit or weekly limit: a seat-based window shared across all models. Switching models does not help. The message shows when it resets
  • You've hit your Opus limit or Sonnet limit: switch to a model outside that family with /model to keep working
  • Run /usage-credits to turn on or request usage credits to work past your plan limit (requires claude.ai login, not an API key)

Team and Enterprise allowances reset on a rolling five-hour window and a weekly window, shared with Claude chat and Cowork.

Reduce token usage

  • /clear when switching to unrelated work. Use /rename first, then /resume to return
  • /compact with focus instructions, for example /compact Focus on code samples and API usage
  • /model sonnet for most coding. Reserve Opus for complex reasoning
  • /effort to lower thinking effort on simple tasks
  • /context to see what is filling context, and /mcp to disable unused servers
  • Move workflow-specific instructions out of CLAUDE.md into skills. Aim for CLAUDE.md under 200 lines
  • Delegate verbose work like test runs to subagents so only a summary returns

Custom compaction instructions in CLAUDE.md

# Compact instructions

When you are using compact, please focus on test output and code changes

Track spend in scripts and teams

claude -p with --output-format json returns total_cost_usd. A status line script can read cost.total_cost_usd. API teams can set workspace spend limits in the Claude Console, and OpenTelemetry export works on every setup.

Cost from a headless run

claude -p "Summarize this project" --output-format json | jq '.total_cost_usd'

Sources

More on Claude Code

Other guides

Cursor: allow all terminal commandsClaude Code: allow commands without promptsCodex CLI: approval and sandbox modesGemini CLI: YOLO mode, auto_edit and allowing specific shell commandsCursor Privacy Mode: telemetry, training and data retentionClaude Code telemetry and data retention: what is sent and how to turn it offGemini CLI: turn off usage statistics and telemetryCLAUDE.md: where it goes, how it loads, and how it works with AGENTS.mdClaude Code hooks: format on save, block risky edits, get notifiedClaude Code subagents: create one, limit its tools, and call itAdd MCP servers to Cursor with mcp.json: Keep files out of Cursor with .cursorignore: Configure Codex with config.toml: Configure Gemini CLI with settings.json: Add MCP servers to Claude Code (claude mcp add, .mcp.json, scopes): Claude Code custom slash commands and skills (SKILL.md): GitHub Copilot custom instructions: Adding MCP servers to GitHub Copilot: Claude Code settings.json: file locations, precedence, and key settingsClaude Code plugins and marketplaces: install, create, and shareGemini CLI extensions and custom commands: Configuring OpenCode with opencode.json: Cline Rules: workspace, global, and conditional rulesKiro steering files: .kiro/steering, inclusion modes, and AGENTS.mdZed agent: instruction files, MCP servers, tool permissions, and ACP agentsCursor CLI: install, headless mode, permissions and CIAider: CONVENTIONS.md, .aider.conf.yml and API keysJunie guidelines, MCP and the Action Allowlist: Amp AGENTS.md, settings.json and MCP: Configure Goose extensions, hints, recipes and permissions: Customize OpenHands with skills, AGENTS.md, setup.sh and MCP: Configure Factory Droid CLI: AGENTS.md, settings.json, autonomy, custom droids and MCPConfigure Qwen Code: settings.json, providers, QWEN.md, MCP and approval modesCursor hooks: hooks.json, beforeShellExecution, afterFileEdit and exit codesCursor sandbox: sandbox.json, network allowlist and run modesCursor settings: settings.json, Cursor Settings and the ~/.cursor config filesCursor browser agent: @browser, browser automation and approval modesCursor subagents: .cursor/agents, frontmatter, built-in Explore, Bash and BrowserCursor telemetry and OpenTelemetry export (Privacy Mode, OTLP, Analytics API): Cursor rules setup: .cursor/rules, .mdc frontmatter, globs, alwaysApply and AGENTS.mdClaude Code headless mode: claude -p, --output-format json, --bare and CI flagsClaude Code statusline: custom status bar in settings.json with context %, cost and git branchClaude Code /model: switch models, aliasesClaude Code VS Code extension: install, shortcuts, settings and /ideCodex AGENTS.md: global, project and override instruction files explainedCodex MCP servers: codex mcp add and [mcp_servers] in config.tomlCodex sandbox modes: read-only, workspace-write, danger-full-access and network accesscodex exec: run Codex non-interactively in scripts and CI with JSON outputCodex skills: create SKILL.md, skill folder locations and $skill invocationGEMINI.md in Gemini CLI: context file locations, imports and /memoryGemini CLI MCP servers: gemini mcp add and mcpServers in settings.jsonGemini CLI custom slash commands: TOML files, {{args}}, !{shell} and @{file}Gemini CLI headless mode: gemini -p, JSON output and exit codes for scripts and CIGemini CLI sandbox: enable Docker, Podman, macOS Seatbelt or gVisorcopilot-setup-steps.yml: set up the GitHub Copilot cloudGitHub Copilot CLI permissions: --allow-tool, --deny-tool, --allow-all-tools and trusted directoriesGitHub Copilot custom agents: .github/agents/*.agent.md profiles, tools and frontmatterGitHub Copilot code review settings: automatic PR reviews, rulesets, effort level and approvals

Get the weekly agent stack update

New official MCP servers, spec changes and harness releases, checked against the source. One email a week, no fluff.

Reviewed Oct 13, 2026. Settings change often; the linked vendor docs are the source of truth.