Do not keep shortening a one-line message and sending it again. Claude Code sends the conversation, attached files, tool results, memory files, and system context with every turn. Your visible sentence can be tiny while the complete request is too large. Run /context first. The result tells you whether to compact the session, remove one oversized input, or update a client that is rejecting a request too early.
What “prompt is too long” actually means
Prompt is too long means the conversation plus attached content exceeded the model’s context window. Request too large means the raw HTTP body crossed the API byte limit before tokenization, often because of one attachment or pasted payload. Usage limit and 429 rate limit are account or pacing limits. 529 overloaded is Anthropic capacity. These messages can interrupt the same task, but they do not have the same fix.
This guide is checked against Anthropic’s current Claude Code error reference, its interactive context-window guide, its MCP tool-search documentation, and the Claude Code changelog. The recovery order below follows the product’s documented behavior, not copied forum advice.
Diagnose the cause in 60 seconds
Run `/context`, read the percentage and largest categories, then match what you see:
/compact before the session locks. If compaction already fails, press Esc twice, step back several turns, then compact again.claude update, restart the terminal or VS Code extension, then use claude doctor if it persists. Claude Code has shipped fixes for false early blocking./compact cannot make that one payload smaller.Current Claude Code versions defer most MCP tool definitions until they are used, so “disable every MCP server” is no longer good blanket advice. /context shows the real cost. Trim a server only when its tools are materially consuming the window. Large tool results, long conversations, global memory, and oversized attachments are often the bigger target.
Recover the session without guessing
- Run
/context. Confirm that the context is actually full. If it is not, update Claude Code and restart the client before sacrificing the session. - Run
/compactwith a focus. Use a command such as/compact keep the current plan, changed files, failing tests, and unresolved decisions. A focused summary preserves more of what you need than an unqualified reset. - If
/compactfails, pressEsctwice. Open the message list, step back several turns, then run/compactagain. Anthropic documents this exact recovery for a session too full to compact itself. - Use
/clearonly after the recovery attempt. It starts the working context fresh but does not delete the saved transcript. The earlier conversation remains available through/resume. - Remove the thing that refills the window. Split huge logs and attachments, trim global CLAUDE.md instructions, move rules behind path scopes, and keep heavy research in a subagent so only its summary returns.
- Update if the numbers do not make sense. Run
claude update, restart the IDE, and checkclaude doctor. Recent releases fixed premature context blocking and compaction failures, so an old client can make correct context advice look useless.
When the error will not go away
A one-word message can fail because the one word is not the full request. The existing conversation still travels with it. Do not spend ten retries proving the same thing. Preserve the session in this order:
- Try
/compactonce. If the window filled gradually, this usually works. Add a focus so the summary keeps the plan, changed files, test state, and remaining work. - Rewind with double
Esc. PressEsctwice, choose a point several turns earlier, then compact. The dropped tail remains in the saved transcript even though it leaves the active context. - Run
/clear. The active conversation goes, but the saved session remains available. Start with a short handoff containing the goal, changed files, test state, and next action. - If the UI itself is wedged, restart and resume. Quit Claude Code, run
claude update, restart the terminal or VS Code, and useclaude doctorif a fresh session still rejects short prompts. That pattern points to the client, not the content window.

The same wall in the Claude app
The chat app at claude.ai hits the identical limit, it just words it differently: Your prompt is too long on a single message, or Claude hit the maximum length for this conversation when the chat itself is full. There is no /compact there, so the play is manual. Ask Claude to summarize the conversation and the current state of the work in a few paragraphs, copy that, and paste it as the first message of a fresh chat. For big reference documents, upload them to a Project instead of pasting them into the conversation, so they stop being resent with every message.

How to stop it happening again
Leave auto-compaction enabled, use /compact with a focus before a long implementation turn, and run unrelated work in fresh sessions. Keep permanent rules in a lean CLAUDE.md, move specialized rules behind path scopes, split giant outputs, and use subagents for research that does not need to stay in the main conversation. Modern Claude Code already defers MCP definitions by default, so measure with /context instead of disabling useful servers on reflex.

That habit, keep the context small and deliberate, is one of the behaviors kitstarter builds in. The kit’s commands checkpoint and reset your work in clean steps so the window never quietly fills to the point of breaking, and a lean CLAUDE.md keeps the baseline small. Context bloat is not just an error message. It is the same thing that makes a long session slow and forgetful.
Common questions
What does “prompt is too long” mean in Claude Code? It means the complete request exceeded the model's context window. That request includes the conversation, attached files, tool results, memory files, and system context, not just the sentence visible in the input box.
Does “prompt is too long” mean I hit my usage limit? No. Prompt is too long is a context-size failure. Usage limit and 429 messages concern account allowance or request pace, while 529 means Anthropic is overloaded. Compacting a conversation does not restore quota or server capacity.
How do I fix the Claude Code prompt too long error? Run /context first. If the context is nearly full, use /compact with a focus. If compaction fails, press Escape twice, step back several turns, and compact again. Use /clear as the final reset. If a fresh session with free context still fails, run claude update and restart the client.
Why does a new Claude Code session say prompt is too long? A new session rejecting a short prompt while /context shows free space is likely a client or extension problem, not genuine context exhaustion. Update Claude Code, restart the terminal or VS Code extension, and run claude doctor if it continues.
Why does Claude Code keep saying prompt is too long after every message? Because the whole conversation and its tool results are sent again with every input. A one-word follow-up still carries the oversized session. Run /compact, or press Escape twice and step back before compacting. If the context is not full, update and restart Claude Code.
Is request too large the same as prompt is too long? No. Request too large means the raw body crossed the API byte limit before tokenization, usually because of a large attachment, image, log, or piped input. Prompt is too long means the tokenized conversation and attached context exceeded the model window. Split the single payload for request too large; compact the session for prompt is too long.
What if /compact also says conversation too long? Press Escape twice to open the message list, step back several turns, and run /compact again. This removes the latest turns from active context so the summary request can fit. If that still fails, use /clear and resume from a concise handoff.
Does /clear delete my saved Claude Code conversation? No. /clear starts a fresh active context, but the previous transcript remains saved and can be opened from /resume. Do not immediately resume the same oversized tail, or the error may return.
How do I stop it from happening again? Keep auto-compaction enabled, compact with a focus before long implementation work, start unrelated tasks in fresh sessions, keep CLAUDE.md lean, split giant tool outputs and attachments, and use subagents so research stays outside the main context.
Keep the context lean by default
kitstarter builds the habits that stop context bloat before it breaks, for Claude Code, Codex, and Antigravity.
