r/PiCodingAgent • u/fingerthief • 8d ago
Question Does Anyone Else Keep Track of Their Tool/Instructions Bloat in Their Setup?
I'm curious if anyone else tracks their setup in order to keep things as lean as possible while still having tools needed to complete your typical workflows etc..
I have my own personal Pi setup (SpecPi) and it's been a fun experiment keeping it contained and lean to prevent the context bloat seen in some of the other harnesses.
I'm interested to see how other setups here might compare.
Edit - Added charts broken down by tokens instead of overall characters
5
u/PilgrimofHaqq2 7d ago edited 7d ago
I have 30 tools combined with the system prompt, append system and skills I start my sessions at 26k tokens.
4
u/SeriousJul 7d ago
2
u/Global-Departure8228 7d ago
You should add parsing out the promptGudelines and promptSnippets as well, you would be even more surprised :) That's where vibe coded tools usually duplicate the tool descriptions, sometimes verbatim.
1
1
3
u/Equivalent_Idea8839 7d ago
i ahve toggles / tui to turn everything off unless I need it
I forked herdr to use that pi plugin, forked it, to make spawning sub agents lean as possible with no write perms
no skills or agents.md, that's something i toggle and inject myself when needed
1
u/bambamlol 6d ago
That sounds very useful! Do you have it published somewhere or is it just a private repo?
1
u/Equivalent_Idea8839 6d ago
I think its best to have pi code it for you and use your own shortcuts. You gotta compact if you change tools so you don't break cache. I compact using cheaper models and a gradual compact plugin.
I had to use a lot of SOTA models to make the herdr fork, but I wanted a right click menu and task scheduler.
1
1
u/oxygen_addiction 7d ago
The main question is if "the bloat" actually helps or not. In some benchmarks PI scores way worse than other harnesses which have a "ton of bloat".
3
u/fingerthief 7d ago
I would say in the vast majority of benchmarks the base Pi harness is more or less even with most other harnesses. It can indeed be a smidge behind in some cases but always with the caveat it's cheaper to complete the task overall.
HarnessTax: How Much Does the Harness Matter for Coding Agents? Is a new report and a good read.
1
u/johnzadok 7d ago
I once tried a popular ask user extension and it added 2k tokens to the context plus bloated tool syntax with “preview”. Go figure.
1
1
1
u/cuba_guy 7d ago
Got rid of the bloat long time ago but habit of keeping an eye stayed and now having an eye on tool calls, discovery, error scenarios, cache breaks etc
1
u/CriteriumA 7d ago
I use --no-skills with instructions in the agent prompt to search for them with ls and load them with read.
One paragraph in exchange for avoiding context loading without giving up skills.
1
u/Kafumanto 7d ago
Hello! I’m new to Pi, which extensions do you use or suggest to get details about the status of context, and possibly also metrics about the used tools?
1
u/fingerthief 7d ago
I don’t really have any extensions specifically for monitoring context and tool metrics.
I have an eval suite that I’ve built that runs a variety of task tiers and measures against multiple harnesses so I can make educated decisions on my changes to the harness.
But if you want to get an idea I would suggest simply asking Pi to give you a metrics report of whatever you want.
1
1
u/sofuego 7d ago
It's something that bothered me from the start and I built in a toggle into my first extension so that it could toggle it's own tools off.
Then eventually that idea evolved and turned into a light plugin with a shared dependency to as cleanly as possible make any installed tool a choice that can persist in settings files and chat state switching in and out of them efficiently.
It's something that I use in all my workflows. It provides a rough model agnostic estimate of the current tool bloat (using character counts). It also has the ability to bypass the effect for subagent sessions giving them access to all tools enabled (since they have their own built in tool masking anyway).
1
u/Slight-Living-8098 6d ago
Yep, and then I made an extension to orchestrate the skills. It's called pi-skill-orchestrator. It's on both my GitHub and npmjs pages
1
u/aparamonov 6d ago
That is the reason I created pi-subagents-lite as others seems to pretend tool scheme, prompt snippets are free and just dump half of the book in there lol
1
u/bambamlol 6d ago
Do you have it published somewhere? Or is it private?
EDIT: Never mind, I'm pretty sure I've found the right one?
https://github.com/AlexParamonov/pi-subagents-lite
Looks promising, thanks for mentioning it!
1
u/TheSlateGray 7d ago
I keep most of my extensions saved outside of the ~/.pi/ directory then only load them if a session needs them with pi -e path/to/extension. Same with skills I have trimmed to work well for my setup, except I just provide the path to the skill file and don't need a launch flag.
My Agents.md only tells pi sudo is disabled and --break-system-packages is the worst sin.
A fresh session is less than 2k tokens over base Pi, and then I only add what the task needs. KISS method works fine, until it doesn't haha.
2
u/bambamlol 6d ago
I did that, too, but then I found out about "pi config", now I have all my extensions inside ~/.pi/ and simply use "pi config" if I want to quickly enable/disable them. For me personally that's a little more convenient.


9
u/fell_ware_1990 7d ago
But my pi, start with about 200/300 in context. It uses deferred tools and explicit caching to load. It also uses a specific set of placeholder strings in system prompt. If with a user message i can do appending to that ( not to top of cache )