CompareWhich plan fits me?RouterCLIPlan pickerAlertsStatusFree toolsChange logClaude CodeOpenAI CodexCursorGitHub CopilotGemini CLIGoogle AntigravityWindsurf

Make Claude Code usage last longer

Anthropic says usage scales with context size: Claude Code sends your whole conversation with each request. These are the steps Anthropic itself recommends. Each tip below cites the official doc it comes from (read 2026-10-20). We don't estimate how much each one saves; vendors don't publish that.

  1. See what is using your plan

    On Pro/Max, /usage shows plan usage bars plus a breakdown with recommendations. Press d or w to switch between 24 hours and 7 days, and f to apply the fixes it can. /context shows what fills the context window.

    /usage
    /context

    code.claude.com checked 2026-10-20

  2. Clear between unrelated tasks

    Stale context costs tokens on every later message. /clear costs nothing; /rename first so you can /resume later.

    /rename auth-refactor
    /clear
    # later:
    /resume

    code.claude.com checked 2026-10-20

  3. Compact with a focus

    /compact summarises the conversation (it is itself a large request on a big context). Tell it what to keep, or put standing instructions in CLAUDE.md.

    /compact Focus on code samples and API usage
    
    # CLAUDE.md
    # Compact instructions
    When you are using compact, please focus on test output and code changes

    code.claude.com checked 2026-10-20

  4. Use Sonnet for most work

    Anthropic: Sonnet handles most coding tasks well and costs less than Opus; reserve Opus for complex architecture or multi-step reasoning. For simple subagents set model: haiku.

    /model
    
    # in a subagent definition (frontmatter):
    model: haiku

    code.claude.com checked 2026-10-20

  5. Lower thinking effort for simple tasks

    Thinking tokens bill as output. Lower effort with /effort (or in /model), or turn thinking off in /config where the model allows it. On fixed-budget models you can cap it with MAX_THINKING_TOKENS.

    /effort
    
    # fixed thinking-budget models only:
    export MAX_THINKING_TOKENS=8000

    code.claude.com checked 2026-10-20

  6. Disable MCP servers you are not using

    Prefer CLI tools such as gh or gcloud, which add no per-tool listing. Turn off unused servers in /mcp.

    /mcp

    code.claude.com checked 2026-10-20

  7. Keep CLAUDE.md short; move workflows to skills

    CLAUDE.md loads at every session start; skills load only when invoked. Anthropic suggests keeping CLAUDE.md under 200 lines.

    # CLAUDE.md: essentials only, under ~200 lines

    code.claude.com checked 2026-10-20

  8. Filter noisy test output with a hook

    A PreToolUse hook can rewrite test commands so only failures reach Claude. Save the script from the docs as ~/.claude/hooks/filter-test-output.sh and chmod +x it.

    {
      "hooks": {
        "PreToolUse": [
          { "matcher": "Bash",
            "hooks": [ { "type": "command", "command": "~/.claude/hooks/filter-test-output.sh" } ] }
        ]
      }
    }

    code.claude.com checked 2026-10-20

  9. Plan first, stop early

    Shift+Tab cycles to plan mode for complex tasks. Press Escape as soon as it heads the wrong way; /rewind (or double Escape) restores an earlier checkpoint.

    Shift+Tab   # plan mode
    Esc         # stop
    /rewind

    code.claude.com checked 2026-10-20

  10. Watch long, idle sessions

    The first message after a break longer than the cache lifetime re-processes your full context. Scheduled /loop tasks, subagents and agent teammates all send their own requests. Agent teams use about 7x more tokens than standard sessions when teammates run in plan mode.

    /clear      # instead of resuming a stale, huge session

    code.claude.com checked 2026-10-20

Your plan's limits: Claude Code plans. Hit a limit? What to do. Is it down rather than limited? Status board. Other playbooks: Codex · Cursor
Get an email when a plan or limit changes: pick your tools and sign up on the Alerts page → or subscribe on beehiiv