Claude Code keeps hitting my limits

Short answerKeep Claude Code and point it at Lyceum's Anthropic-compatible endpoint, which runs open coding models such as Kimi and GLM through its serverless inference, billed per token with no base fee. If you stay on Claude, turn on usage credits for peak days instead of upgrading. Free basics: check /usage, clear context between tasks, plan before you build and use Sonnet or Haiku for routine edits.

01

Point Claude Code at Lyceum's Anthropic-compatible endpoint

Lyceum's serverless inference has an Anthropic-compatible endpoint for Claude Code. You set ANTHROPIC_BASE_URL to Lyceum's endpoint, ANTHROPIC_AUTH_TOKEN to your Lyceum API key and ANTHROPIC_MODEL to a supported open model, then start claude as before. Usage is billed per token with no base fee, and the model library tags models such as Kimi K3.1 Pro and GLM-5.3 for coding and agents. Try it on a few of your real tasks before you move the whole team.

Good if most of your limits or API bill go on routine coding sessions

Skip if a task only works well on a Claude model

Serverless and dedicated inference · Model library and inference pricing

Tool
Cost€
EffortLow
HelpsToday
02

Turn on usage credits for peak days instead of upgrading

On Pro, Max and Ultra plans, usage credits let you keep working after you reach your session or weekly limit, billed at standard API rates. Turn them on under Settings > Usage, set a monthly spend limit and buy credits. Credits only start once your plan's included usage is used up, so you pay extra only on the days you go past it.

Good if you hit the limit a few days a month, not every day

Skip if you hit it every day, then compare the next plan with the fix above

Manage usage credits for paid Claude plans · Use Claude Code with your Pro, Max, or Ultra plan

Tool
Cost€
EffortLow
HelpsToday
03

Run /usage to see what eats your limit

On a Pro, Max, Ultra, Team or Enterprise plan, /usage shows what counts against your plan limits: recent usage by skills, subagents, plugins and MCP servers, each as a share of the total. It also lists recommendations, such as trimming a large CLAUDE.md. Start with the row that takes the biggest share, and use /status to see how much of your allocation is left.

Good if you do not know why the limit comes so early

Claude Code Docs · Claude Help Center

Do it yourself
CostFree
EffortLow
HelpsToday
04

Clear or compact the context between tasks

Stale context costs tokens on every following message. Run /clear when you switch to unrelated work, and /rename the session first so you can /resume it later. If you need to keep going in the same session, /compact with an instruction such as "Focus on code samples and API usage" tells Claude what to keep.

Good if you work on several unrelated things in one long session

Claude Code Docs

Do it yourself
CostFree
EffortLow
HelpsToday
05

Use Sonnet or Haiku for routine edits

Anthropic's cost guide says Sonnet handles most coding tasks well and costs less than Opus, so keep Opus for complex architecture decisions or multi-step reasoning. Switch with /model during a session or set a default in /config, and set model: haiku for simple subagent tasks. Lowering the effort level with /effort also cuts cost where deep reasoning is not needed.

Good if Opus is your default for every task

Claude Code Docs

Do it yourself
CostFree
EffortLow
HelpsToday
06

Plan first and ask for one specific change at a time

Press Shift+Tab to switch to plan mode before Claude writes code: it explores the codebase and proposes an approach for you to approve, which saves expensive rework. Ask for one concrete change, such as input validation for the login function in auth.ts, instead of "improve this codebase", which makes Claude scan widely. Press Escape as soon as it heads the wrong way.

Good if Claude often rewrites code after a wrong first attempt

Claude Code Docs

Do it yourself
CostFree
EffortLow
HelpsToday
07

Turn off MCP servers you don't use

Run /context to see what takes up space in the context window, and /mcp to see your configured servers and disable the ones you are not using. CLI tools such as gh or aws add no per-tool listing, so Claude can run them directly instead.

Good if you added several MCP servers and forgot about some of them

Skip if you use no MCP servers

Claude Code Docs

Do it yourself
CostFree
EffortLow
HelpsToday

When it's bigger than a quick fix

Get help when your team hits its limits every week even after these steps, or when nobody can say which sessions drive the API bill. Bring the /usage breakdown to whoever owns the budget and decide between a bigger plan, usage credits with a spend limit, or open models for routine work.

If an ANTHROPIC_API_KEY environment variable is set, Claude Code uses it instead of your subscription, and you pay API rates. Check your environment today if API charges show up that you did not expect.

Use Claude Code with your Pro, Max, or Ultra plan · Manage usage credits for paid Claude plans · Claude Code Docs

Questions people ask

Is there a cheaper alternative to Claude Code?

You can keep Claude Code and point it at an Anthropic-compatible endpoint that serves open models billed per token. Test such a model on your own tasks before you switch.

Is it cheaper to use the Claude API or a subscription?

It depends on how much you use. A Pro or Max subscription includes usage up to a five-hour session limit and a weekly limit, while usage credits and the API are billed at standard API rates.

Why do I hit my Claude Code limit so fast?

Stale context costs tokens on every following message, and every subagent sends its own requests on top. /usage shows which of them takes the biggest share.

How do I check my Claude Code usage?

Run /usage for a breakdown of what counts against your plan limits, or /status to see how much of your allocation is left.

When do Claude Code limits reset?

On Pro and Max plans, the session limit resets every five hours and the weekly limit once a week.

Sources

  1. Lyceum: Serverless and dedicated inference
  2. Lyceum: Model library and inference pricing
  3. Claude Help Center: Manage usage credits for paid Claude plans
  4. Claude Help Center: Use Claude Code with your Pro, Max, or Ultra plan
  5. Claude Code Docs: Manage costs effectively