Claude Code context low: what it means and what to do

This warning is about the conversation, not your plan. It is fixed in five seconds, and the useful part is understanding why the automatic fix is worse than doing it yourself.

By the Continuum team. We build a workbench that runs Claude Code, Codex, and their peers, so the model rates quoted here are the ones our own cost analytics ship with.

The short version

Context low means the conversation is approaching the model context window, which is per session and unrelated to your plan usage limit. Run /context to see what filled it, /compact with an instruction to summarise while keeping the decisions you care about, or /clear if the task is finished. /clear costs nothing; /compact is itself a large request because it reads the conversation it summarises. If you want the automatic pass to fire earlier, set the window with /autocompact.

What you need to know
  • This is the context window, not your usage quota. Different problem.
  • /context shows what filled it, and it is usually one large read.
  • /compact keeps decisions; /clear starts fresh and costs nothing.
  • Compact at a task boundary, not when the warning fires.
  • /autocompact 500k moves the threshold so the automatic pass fires earlier.
  • A full window also drains your quota faster, because every turn re-sends it.

Not the same as a usage limit

These two get confused constantly, and the confusion is expensive: people wait hours for a limit to reset when a five-second command would have fixed it.

Context lowUsage limit
ScopeThis conversationYour whole account
Fix/compact or /clearWait, or buy usage credits
Time to fixSecondsHours or days
Costs anything/clear is freeIt is what you pay for
Typical messagePrompt is too longYou've hit your session limit

Fixing it now

/context     # what is actually filling it, by category
/compact     # summarise, keep the decisions
/clear       # start fresh, if this task is finished
You can steer what survives a compaction, and you should.
/compact Keep the decision to use optimistic locking and why, and the final schema. Drop the exploration of alternatives and the failed first attempt.

You can also put standing compaction instructions in your project CLAUDE.md under a heading such as Compact instructions, which is worth doing once for a repository where the same things always matter: test output, migrations, the current diff.

What /context usually reveals

/context breaks the window down by category: system prompt, system tools, MCP tools, custom subagents and where each loaded from, memory files, skills, and conversation messages. Five culprits account for nearly every case.

CulpritFix
One enormous file read early onAsk for a line range or a function next time
A test run that printed thousands of linesScope the command, or filter it in a PreToolUse hook
A long conversation across unrelated tasks/clear between them
A large project memory fileSent every turn. Aim to keep CLAUDE.md under 200 lines.
Many MCP serversPrune them; check for one returning huge tool results
Two habits that pay for themselves within a session.
# move instructions that only matter sometimes out of CLAUDE.md
#   CLAUDE.md loads every session; a skill loads only when invoked
mkdir -p .claude/skills/db-migrations
$EDITOR .claude/skills/db-migrations/SKILL.md

# put context usage on the status line so you see it climbing
#   see the statusline docs for the context-window field

Why the automatic pass is worse, and how to move it

Automatic compaction fires as the conversation approaches the limit, which is the worst moment available: the summariser has the most material to compress and the least room to write the summary into. Compacting deliberately at a task boundary gives it something coherent to work with. "We finished the retry logic, here is what we decided" compresses well. "We are halfway through three things" does not, and that is what the automatic pass is usually handed.

You do not have to accept the default threshold. As of August 2026 the auto-compact window is settable in three places, and they override each other in a fixed order.

Setting the auto-compact window. Accepted range is 100K to 1M tokens.

WhereHowScope
In a session/autocompact 500kThis session and later ones; saved as autoCompactWindow
At launchclaude --autocompact 500kThat launch only, and not preempted by managed settings
In scripts and CICLAUDE_CODE_AUTO_COMPACT_WINDOWWins over all of the above; plain token count only
# accepted forms: 200000, 500k, 1M, or a bare 100-1000 meaning thousands
claude --autocompact 500k

# back to the window tuned for your model
claude --autocompact auto

If the conversation genuinely needs the room rather than the discipline, the other lever is a bigger window. Fable 5, Sonnet 5, and Opus 4.6 and later support a 1 million token context window, some through a [1m] model variant you select explicitly. Compaction behaves the same way at the larger limit; it just happens later.

What survives a compaction

Worth knowing before you rely on it, because two things people assume are permanent are not.

  • Skill bodies are re-injected after compaction, capped at 5,000 tokens per skill and 25,000 tokens in total, with the oldest invoked skills dropped first. Truncation keeps the start of the file, so put the instructions that matter near the top of SKILL.md.
  • Path-scoped rules and nested CLAUDE.md files do not survive. They loaded into message history when their trigger file was read, so compaction summarises them away with everything else. They reload the next time Claude reads a matching file. If a rule must persist, drop the paths: frontmatter or move it to the project-root CLAUDE.md.
  • Your working tree is untouched. Compaction and /clear affect the conversation only. Nothing on disk changes.

Filling the window slower

Ranked by effect on a typical session.

HabitEffect
/clear between unrelated tasksThe single biggest one
Naming files in promptsFar fewer speculative reads
Delegating verbose work to a subagentThe output stays in the subagent window
Scoping test commandsCommand output is next turn input
Short project memory fileSent every turn, so it compounds
Moving occasional instructions into skillsLoads on demand instead of always
Pruning unused MCP serversRemoves a class of very large tool results

Questions people ask

The conversation is approaching the model context window. It concerns this session only and is unrelated to your plan usage limit. Run /context to see what filled it, then /compact or /clear to fix it in seconds.

No. Context is per session and refills instantly with /clear. A usage limit is per account and only recovers with time or usage credits. They are related in one direction: a full context window makes your quota drain faster, because every turn re-sends the whole conversation.

Compact if you are mid-task and want to keep the decisions. Clear if the task is finished, which is also the better habit between unrelated pieces of work. Clear costs nothing; compact is itself a large request because it reads the conversation it summarises.

The window filled and older material was compacted or dropped. Path-scoped rules and nested CLAUDE.md files are summarised away too and only reload when Claude next reads a matching file. Run /context to see what consumed the window, then compact deliberately at the next clean boundary.

Yes. Pass instructions to /compact naming what to keep and what to drop, which produces a much better summary than letting it choose. For a rule that should apply every time, add a Compact instructions section to your project CLAUDE.md.

Run /autocompact with a token count, for example /autocompact 500k, which saves to your user settings as autoCompactWindow. Pass --autocompact for a single launch, or set CLAUDE_CODE_AUTO_COMPACT_WINDOW in scripts and CI, which overrides both. The accepted range is 100K to 1M tokens.

The conversation plus the files in it exceed the model context window. Run /compact to summarise earlier turns, /clear to start fresh, /context to see the breakdown, and disable MCP servers you are not using, which can return very large tool results.

Clear between unrelated tasks, name files in your prompts, scope test commands so they print less, delegate verbose reads to a subagent, keep CLAUDE.md under about 200 lines, and move occasional instructions into skills so they load only when invoked.

Sources

Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.

  1. Claude Code: explore the context window
  2. Claude Code: manage costs effectively
  3. Claude Code slash commands
Try it

Context creep,
visible.

Continuum shows the token split per session, so a session filling up is something you see rather than discover.

free app · your subscriptions · local-first