/effort for routine work), turn on fast mode with /fast only when latency matters more than cost, keep context small with /clear between unrelated tasks and /compact with focus instructions, send verbose work such as test runs to subagents, and check /usage and /context to see where tokens go. Prompt caching is automatic, but it expires after a few minutes of inactivity, so long idle sessions do not stay cheap.1. Leverage Prompt Caching for Repeated Tasks
Prompt caching is one of the most effective ways to reduce costs and latency. When you send the same context repeatedly, Claude caches it and processes only the new parts, significantly reducing token usage.
- Reuse large context: If you frequently analyze the same codebase or document, keep it in your context instead of re-submitting it
- Session continuity: Use
/resumeto pick up previous sessions. The conversation comes back, but a cold cache means the first request re-processes the history - Batch similar tasks: Group similar questions to maximize cache hits and minimize redundant processing
- MCP servers: Disable servers you are not using with
/mcp; their tool names and instructions still take up context
2. Choose the Right Model for Your Task
Claude Code gives you multiple model options, each optimized for different use cases. Selecting the right model directly impacts both speed and cost:
Fast Mode (⚡ For Latency-Sensitive Work)
- Toggle with
/fast(or/fast on//fast off) - Same model and quality, up to 2.5x faster output, at a higher price per token
- Supported on recent Opus and Fable models, not on Sonnet or Haiku
- On subscription plans it is billed from usage credits, so turn it on for live debugging and rapid iteration, not long autonomous runs
Balanced Mode (Default)
- Best for general development tasks
- Good balance between speed and output quality
- Use for code reviews, debugging, and architecture decisions
High Effort (For Complex Work)
- Use for deep analysis, complex refactoring, or critical decisions
- Slower response but superior output quality
- Worth the wait for important architectural changes
/model and adjust thinking depth with /effort. A lower effort level answers faster with less thinking; fast mode keeps quality and costs more. You can combine both for quick, simple tasks.3. Optimize Token Usage
Tokens directly affect both speed and cost. Minimizing unnecessary tokens improves performance across the board:
- Clear context strategically: Use
/clearwhen you're starting a new task to avoid processing irrelevant conversation history - Use compact mode: Run
/compact [focus]to compress your conversation while keeping relevant context - Provide precise instructions: Clear, concise prompts require fewer tokens to process than vague or rambling requests
- Avoid unnecessary file includes: Only mention files you actually need in your conversation
- Use file mentions efficiently: Reference files with
@filesyntax instead of pasting entire contents when possible
⌃O) to identify where tokens are being consumed. This helps you refine your workflow for efficiency.4. Parallel Execution and Background Tasks
Don't let lengthy operations block your workflow. Claude Code supports parallel execution to maximize efficiency:
- Background tasks: Use
⌃Bto run time-consuming operations in the background while you continue working - Stop background agents: Press
Ctrl+X Ctrl+Ktwice within 3 seconds to stop all running background subagents - Background work: Run
/tasksto see running shells and subagents;⌃Ttoggles Claude's to-do checklist - Scheduling: Use
/scheduleto run tasks on a recurring basis automatically
5. Optimize for Network Latency
While you can't control network speed, you can optimize how you interact with Claude Code:
- Batch requests: Group multiple questions into single prompts to reduce API calls
- Work offline when possible: Many Claude Code operations (file editing, local bash commands) don't require network access
- Keep context lean: Smaller requests return faster; clear or compact before large new tasks
6. Monitor and Debug Performance
Understanding where time is spent helps you optimize effectively:
- Transcript viewer: Press
Ctrl+Oto see detailed tool usage, with a timestamp and model on each message - Check usage and context:
/usageshows session cost, plan limits and a breakdown of what uses them;/contextshows what fills the context window;/statusshows version, model and account - Monitor agent performance: Track background agent timing to identify bottlenecks
- Review cache metrics:
/usagereports the share of input tokens served from cache and recent cache misses
7. Best Practices Checklist
- ✅ Clear sessions between unrelated tasks; long idle sessions lose their cache
- ✅ Use fast mode (
/fast) when latency matters more than cost - ✅ Batch related questions into single prompts
- ✅ Use
/compactbefore starting new major sections of work - ✅ Run tests and builds in background with
⌃B - ✅ Clear conversation history when switching contexts with
/clear - ✅ Check
/usageand/contextto see where tokens go - ✅ Choose the right effort level for each task