ThinkFacility

Error messages

Prompt is too long

The message

Prompt is too long
Claude Code 2.1.280 read September 23, 2026Claude Codecontext window/compact

What it means

The request Claude Code tried to send was bigger than the model's context window. That counts the whole conversation plus the system prompt, every tool definition and anything you attached.

What to do

Run /compact. If it answers that there isn't enough to compact, run /clear and resend with less pasted in, then use /context to see what's taking the room.

Every message Claude Code sends to the model carries the whole conversation again, along with its own system prompt, the definitions of every tool it can call and whatever files you've attached. When that bundle is bigger than the model's context window (the most text it can take in at once), the API refuses it and Claude Code reports:

Prompt is too long

In an interactive session you'll usually see it phrased as the fix instead:

Context limit reached · /compact or /clear to continue

Both come from the same refusal. We read the strings out of Claude Code 2.1.280, checked them against Anthropic's error reference, and went through the GitHub reports. 371 issues in the Claude Code repo quote the message as of September 23, 2026, which makes it one of the most common errors the tool has.

What the API actually said

Underneath, the API's own error names both numbers. One user whose subagents kept failing posted the raw form:

prompt is too long: 209117 tokens > 200000 maximum

Claude Code parses those two numbers out of that line, and uses them to explain what went wrong when it can't compact its way out. Amazon Bedrock words the same refusal as Input is too long for requested model., and Claude Code treats the two identically.

The normal fix

Run /compact. It replaces the older part of the conversation with a summary and keeps the recent turns, which makes room for new ones. Auto-compact is supposed to do this for you before you ever hit the wall, so if you're seeing the error often, check you haven't switched it off. The interactive line tells you when you have:

Context limit reached · /compact or /clear to continue · auto-compact is off · /config to turn it on

If you'd rather start clean, /clear does that. Auto-compaction has a blind spot, though. One user's long session in the desktop app died mid-turn with no warning, and as they describe it, compaction can't step in once a single prompt (the conversation plus a big paste) is already over the limit.

When /compact can't help

This is where people get stuck. Compaction summarizes earlier exchanges, so if the conversation is one enormous first message there's nothing earlier to summarize. /compact then answers Not enough messages to compact., and the error explains itself in one of these longer forms:

Prompt is too long · this conversation is a single exchange and cannot be compacted

That version goes on to say the size comes mostly from the system prompt, tool definitions or attachments. When the API reported token counts, the message instead says how big the request was and whether your own text or the tooling is most of it. Either way the move is /clear and a smaller start: fewer files, a shorter paste.

Older versions were worse. Until 2.1.269, a session in that state could get "permanently stuck", in the changelog's words, with every new message returning the same error. One February report described exactly that in the VS Code extension, where the only way out was to close the tab and lose the context. If you're on something older, updating is the fix.

There's also Prompt is too long · automatic compaction failed: followed by another error. That means compaction itself broke, for example on an unavailable model or a login problem, and /compact will keep failing until you fix whatever it names.

The window can be full before you type

This surprised us most. The subagent report above had 209,117 tokens against a 200,000 limit, and the conversation wasn't the cause. That user had many MCP servers connected, each adding tool definitions to every request, and subagents inherit all of them, so Explore and Plan agents failed before doing any work.

Run /context to see the split between system prompt, tools, memory files and messages. Anthropic's error reference suggests turning off MCP servers you aren't using with /mcp disable <name>, and trimming large CLAUDE.md files or moving parts of them into rules that only load for matching paths.

If what stopped you is a usage cap rather than a size limit, that's a different family of messages: see what “Lower-priority mode isn't available right now.” means.

Other lines the same feature prints

Match yours against these if the one at the top of the page is not quite it. They come from the same code and mean related things.

  • Context limit reached · /compact or /clear to continue
  • Context limit reached · /compact or /clear to continue · auto-compact is off · /config to turn it on
  • prompt is too long: 209117 tokens > 200000 maximum
  • Input is too long for requested model.
  • Prompt is too long · automatic compaction failed:
  • Prompt is too long · this conversation is a single exchange and cannot be compacted
  • Conversation too long. Press esc twice to go up a few messages and try again.
  • Not enough messages to compact.