r/PiCodingAgent • u/Simusid • Oct 28 '26
Question Stop Pi From Running find /
I'm on a giant shared server and "find /" might take an hour. I've been unable to persuade pi to stop issuing it. In settings.json I changed defaultTools to defaultTools": ["read", "bash", "edit", "write", "grep", "ls"] and in AGENT.md I added a rule "don't ever run find /" and similar message in my README.md but it continues to issue "find /"
How can I enforce this?
11
Upvotes
20
u/TBMonkey Oct 28 '26
Regex hook that intercepts the call and returns it failed with a reminder to not use that?
27
u/MrCatberry Oct 28 '26
Running pi on a "giant shared server"... unsandboxed of course...
10
u/Majestic_Department7 Oct 28 '26
Put it in a container
8
u/bitzap_sr Oct 28 '26
You have multiple answers already. Let me just add a couple notes:
5
u/LordMoridin84 Oct 28 '26
https://pi.dev/packages/@gotgenes/pi-permission-system?name=permission
4
u/Wayne_Kane Oct 28 '26
Use pi permission system extension and block find / pattern
3
u/ChampionshipIcy7602 Oct 28 '26
Just don't use bash find, instead use the find tool
2
u/cryowastakenbycryo Oct 28 '26
install locate and ask nicely? good luck
2
u/greenhilltony Oct 29 '26
Let Pi write an extension to intercept calls with `find` and to hint the model to use `fd`. I did the port to TS from my Claude Code plugin: https://github.com/TonyWu20/no-find-grep
1
u/CyberTod Oct 28 '26
I added the block in cc-safety-net.
1
u/PrimaryHuckleberry11 Oct 28 '26
for me it was enough to instruct in AGENT.md not to use it ever for / But even if I say to disallow it for all, it still respect this guardrail. What model are you using?
1
u/o_sht_hi Oct 28 '26
Loool create an alias
1
u/Khurrame Oct 29 '26
Use fff plugin.
1
u/jensilo Oct 28 '26
”Stoppning pi from doing x“ is like saying „stopping my car from driving in the wrong lane“. It’s the driver, not the vehicle.
1
u/ali0une Oct 28 '26
Maybe with a wrapper in ~/bin/find in your PATH that translates 'find /' in 'echo "do not use find /"
0
u/fell_ware_1990 Oct 28 '26
Just block it > use XYZ, or even translate its call.
0
u/Ambitious_Spare7914 Nov 01 '26
Pi, prevent agents from running
find /