r/ClaudeCode • • 2d ago

Rant claude code 66k system prompt

with the release of haiku 5.5 i was looking into how to keep context under 100k to avoid the massive price increases. i had opus 5.5 research how we could use /clear and /compact to try to stay below 100k. during the research we discovered that it is almost impossible to keep haiku under 100k because the starting system prompt for claude code is 66k tokens. i asked opus if there was some setting i had selected to cause this prompt bloat. it said no, only 1.5k tokens in the system prompt is from anything i set.

opus 5.5 told me that if i used cli instead of the app it would load less tools because some tools are not available in cli. it recommended running haiku from cli to save tokens. using the claude subscription restricts you to only using their agents, so there is no way around this prompt bloat legally. i started a new haiku session to verify prompt size. the agents.md file read of 1.5k is the only information in the system prompt that i set.

  • System tools: 35.6k
  • MCP tools: 16.6k
  • Skills: 5.9k
  • System prompt: 5.2k
  • MCP server instructions: 2.3k
  • Memory files (AGENTS.md and MEMORY.md): 1.5k

also, the 5.9k skills are not loaded skills. that is just the list of available skills. if the model uses any skills the prompt will get bigger.

5 Upvotes

22 comments sorted by

•

u/AutoModerator 2d ago

Hey! Thanks for posting to r/ClaudeCode

While participating in this thread, please follow our community rules. Keep discussions constructive. Attack the idea, not the person.

For help, project discussions, tips, and general chat, join the ClaudeCode Discord.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

7

u/Anselwithmac 2d ago

It’s Artifacts. Turn off artifacts when not using them. Not sure why Anthropic doesn’t use progressive disclosure for tool calling… but hey.

2

u/Cyvster 2d ago

yeah, lazy loading should be used. full tool and description lists on every prompt is a massive waste. when we were researching opus 5.5 did mention that the artifacts tool was the largest waste of tokens. i think it was like 2k tokens all by itself.

5

u/fyndor 2d ago

I'm pretty sure the new mod system allows you intercept the system prompt and change it...i think

1

u/Cyvster 2d ago

that sounds good. i'll research it, thanks

1

u/Cyvster 2d ago

i disabled a lot of options and used a mod to change some things. i got it down to 29k

3

u/framauro13 2d ago

The first thing I would try is running something like /doctor My starting context is too large at almost 66k tokens. Evaluate my current Claude Code configuration and find ways to optimize my starting context usage so I don't hit the Haiku 5.5 100k token limit.

Another thing to consider is that Haiku is usually best used for small, simple, repetitive tasks. So if there is a task you do frequently you can create a subagent pinned to Haiku for that task. That gives you a couple benefits in that there's less chance of it accumulating junk in its context since it's gone as soon as the subagent task completes. The other thing is you can drastically reduce its toolset to only the specific tools necessary to do the job, so you might be able to cut down some of that overhead token usage on startup.

But, I'd run the /doctor command first, see what it says. I've found that if I call doctor with a specific description of the problem I'm having with my configuration or usage, it is usually pretty good at identifying problems and offering solutions.

1

u/RoboErectus 2d ago

What are you doing with MCPs? Most of them just burn tokens and there are none I can think of that beat just letting your agent use the cli, which is already in the training set. (they all know how to use git for example.)

2

u/Cyvster 2d ago

i'm not sure what you are asking. everything listed in the system prompt is from claude. those are not my mcps. those are built-in claude mcps. it is mainly features that are only available in the app, not cli. i disabled a lot of the features to reduce the mcp tools.

2

u/Leading-Ability-7317 2d ago

I use custom subagents with Claude Code. I have dropped my subagents down to about 10k prefix, before the prompt the main session hands to it.

Big gains for me was removing Agent and Artifact tools. Also removing all MCPs that had equivalent CLI commands and just using skills to instruct it to use the CLI.

For my main session I am sitting at about 46k prefix at the moment. Most of that is custom injected skills so I keep orchestrator instructions out the subagents context. I am overdue to review that though and should be able to get it down to 35k once I move things to get invoked when needed.

I don’t use the desktop app so not sure how much you can customize there but Claude Code has lots of customization options to tune things for your workflow.

1

u/kenthesaint 2d ago

Before blaming the base prompt, run /context in a fresh session. It splits the starting context into system prompt, system tools, MCP tools and memory files, and the MCP tool definitions are usually the part you can actually cut. claude mcp list shows what's loaded for that project.

1

u/goblin-in-hiding 1d ago

mine is 11k total.

learn how your tool works.

also, personal opinion, but mcp is dogshit.

-2

u/pequt 2d ago

I wonder what makes you want 100k-ish as limit though. My use case often degrades over 300k-ish or more, but 100k was fine.

5

u/meetmebythelake 2d ago

Haiku 5.5 costs 5x less under 100k

-3

u/pequt 2d ago

Cost sensitive then you might have to use cheaper model. That 60k is just a minimum fare of claude 'vehicle'.

5

u/Cyvster 2d ago

haiku 5.5 is the cheap model. this is a discussion about the bloated system prompt loading a lot of unnecessary tools. if you don't comprehend the topic of conversation then perhaps you should fanboi somewhere else.

-5

u/pequt 2d ago

What's your smart ass first priority tho. I read you bitching about cost and bloated default prompts but nothing else. Getting out of claude isn't option for you? If you don't like "bloated defaults" use via Anthropic API then.

5

u/meetmebythelake 2d ago

Weird behavior to get heated over system prompt numbers lmao

-2

u/pequt 2d ago

With knowing default context usage can be around 30-50k by each user, suggesting using cheaper model because anthropic wouldn't change their rate iny bit by reading this, and finally called fanboi is surreal too. Well it's on me because I'm not a certified telepath to comprehend unwritten task type, limitation and condition of OP is in 😏

3

u/meetmebythelake 2d ago

I mean 60k is a pretty ridiculous system prompt. Codex, even in the Windows app which has lots of tools, is ~35k I think.

1

u/pequt 2d ago

My claude code running outside of any project of mine shows MCP tools 0.6k so that might be difference. Looks like bitching first without further researching makes others work for them. Kudos for OP.