Skip to content

Basic Token Saving Strategies

Why it matters

Token typeWhat you're charged forRelative cost
InputSystem prompt + history + your message + files1× baseline
OutputEvery token the model generates in response3–5× input
Model TierExampleInput (per 1M)Output (per 1M)
BudgetClaude Haiku, mini modelsup to $0.25up to $2.00
Mid-rangeGPT-5 / Claude Sonnetup to $3.00up to $15
PremiumClaude Opusup to $5.00up to $25

Choose model wisely

Different AI models are good at different kinds of work.

If you use the right model for the right task, you can save a lot of money without losing much quality.

1. Premium models: planning and architecture

These models are best when the task requires deep reasoning, tradeoffs, or big-picture thinking.

  • System design
  • Architecture decisions
  • Technical planning

Example: “Design the architecture for a SaaS project management app that supports real-time collaboration, role-based permissions, and multi-tenant scaling. Explain the tradeoffs between microservices and a modular monolith.”

2. Mid-range models: implementation

These models are usually the best balance of speed, cost, and coding quality.

  • Writing features
  • Generating APIs
  • Refactoring
  • Unit tests

Example: “Build a REST API endpoint in Node.js and Express for creating tasks. Include validation, error handling, and PostgreSQL integration using Prisma.”

3. Budget models: cleanup and repetitive work

Cheap models are often enough for structured, low-reasoning tasks.

  • Formatting
  • Summaries
  • Documentation cleanup
  • Simple transformations

Example: “Rewrite these release notes into a short, professional changelog for customers. Keep it under 150 words and use bullet points.”

Example

Feature: Add profile picture upload to an app

Premium model prompt: “Design the best approach for secure profile picture uploads, including validation, storage, and edge cases.”

Mid-range prompt: “Create the React upload component and Express API endpoint for profile picture uploads.”

Budget model prompt: “Update the project wiki with setup instructions and document the new profile picture upload feature for developers and QA.”

Reduce input tokens

Every token you send is re-sent on each follow-up message.

StrategyHow to applyWhy it works
Start fresh conversations oftenKeep threads to 15–20 turns maxStops history from compounding
Separate planning from executionWrite plans to .md files, then open a new session to buildKeeps planning context out of every implementation turn
Convert docs before feeding them inConvert PDFs, HTML, spreadsheets to markdown firstRaw formats carry formatting overhead
Keep AGENTS.md leanProject structure + key commands onlyThis file loads on every single turn

Reduce output tokens

Output is the expensive side. Give the model clear boundaries on what to produce.

TechniqueHow to prompt itEffect
Specify format and length"Answer in 3 bullet points" / "Use under 100 words"Model stops generating early
Request diffs, not full rewrites"Show only changed lines" / "Return minimal diff"Avoids re-outputting unchanged code
Ask for the decision, not the reasoning"Just give the fix, no explanation"Reduces reasoning tokens
Batch related questionsAsk multiple related questions in one promptFewer back-and-forth turns
Use inline edits/completionsNo prompt but manual writing for small parts of codeIt is cheaper than prompt

Manage context during a session

Keep your context window between 40–60% for optimal performance. Use /context to check current usage.

StrategyWhen to UseHow to Do It
Intentional DiscardTask is complete and next task needs different context/clear or /new to start fresh
Intentional CompactNeed to keep progress but reduce noise/compact or ask agent to summarize progress to a file
Task decompositionTask is too broad for current context windowBreak into subtasks; consider sub-agents for independent work
Sub-AgentsSpecific research or task that doesn't need full contextUse Agent tool to run task in isolated context window

Example: Compacting mid-session

When context fills with logs and tool outputs but you need to preserve progress:

text
Write everything we did so far to progress.md: the goal, our approach,
steps completed, and current blocker. Keep it under 100 lines.

Then use /compact to compress the conversation or use a personalized skill.

For the full list of session management commands and shortcuts, see the Claude Code keybindings and Copilot CLI keybindings references.


References

Copyright © MSG Systems Romania AI Labs