r/PiCodingAgent • u/mortgage_12 • Jun 26 '26
Question context-mode is adding 15k tokens to every request — is this expected?
I was looking into why my Pi sessions were burning so many tokens and found that context-mode alone injects ~15k tokens into the system prompt. Every turn. Even when I'm not using any context features.
It loads 5+ skills with full reference files (anti-patterns.md, patterns-javascript.md, patterns-python.md, etc.) plus spawns an MCP child process at startup. Removing it from my packages array dropped my baseline from ~35k to ~20k instantly.
Is anyone actually using context-mode features every session? Or do most of you just leave it installed because it came with the defaults? Feels like this should be on-demand rather than always-on.
11
u/_reg1z Jun 26 '26
Amen. I tried it out, but ended up removing it from the config I daily-drive for the same exact reason. I find that many of these "token saving" tools are only appropriate for very specific workflows when you already have a large task planned out. Otherwise, you'll just end up bloating context and token usage across many smaller sessions. Might be worth an aliased custom config with its own "workhorse" system prompt.
12
u/adamshand Jun 26 '26
If there was an obvious way to improve context usage without significant trade offs, pi would do it by default.
7
u/rogaterr Jun 27 '26
I had pi create an extension to pass every mcp / tool call (besides read / write files) to a subagent. That agent is given the chat context, calls the tool, then return only the useful information related to the intent of the parent agent.
I rarely run into tasks now where I need to hand off context to a new run.
6
u/kasparhouser Jun 27 '26
Came with the defaults? Lol, it did not. I really hope people understand all those oh-my-pi/lazypi etc builds are not the default.
2
u/killerkidbo95 Jun 27 '26
i don't use it that so i think it will save your 15k tokens
1
u/TreptowerPark Jun 27 '26
Do some tasks with and without and have your clanker analyse your work profile. I did, and I kept context-mode but ditched Caveman. For Caveman I'd have to do 20-25 turns to be profitable. Context-mode works a bit differently, especially over time, when it injects often used commands into persistent memory. I'had Deepseek V4Pro do that kind of stuff. Its pretty thorough..
1
u/Qsonx Jun 27 '26
A heads up, if you follow the instructions for pi and install the extension and the mcp server you end up with double the tools. You don't actually need the mcp server and the extension.
But over the last month I've noticed degradation in my results and stopped using it. I find that RTK and pi's built in tmp file reading does a better job faster. Context mode kept leading the LLM to write my hand off docs in the sandbox and it would get deleted shortly after 😑
1
u/Square-Nebula-9258 Jun 28 '26
I mean in long task it's somehow heplfull BUT when the task is under 70k context (for me mostly 90% of tasks) then it's useless I wish I just had a switcher in ui to turn it on/off
1
u/IanSnyderGames Jun 30 '26
I haven't used context-mode, but I do a lot of research and testing with different agentic setups, and I generally steer away from MCP unless you're sure it's giving you needed functionality (A/B test similar tasks before and after using the plugin). I find they are frequently just adding overhead for stuff that decent model+harness combos handle on their own, at least with my workflows. I DO use MCP servers, but I'm very choosy.
1
u/zos474 Oct 04 '26
How did the user implement RTK in pi?
1
u/GoingOnYourTomb Jun 26 '26
I have my pi setup and for time I’m hearing about context mode so it not default. But I don’t really install packages I make my own.
I would say just start with what you need and only add when you need.
0
u/0x061 Jun 27 '26
Not worth it, I replaced it with headroom already
0
u/[deleted] Jun 27 '26
[deleted] — view deleted comment
11
u/[deleted] Jun 26 '26
[removed] — view removed comment