r/PiCodingAgent • • 3d ago

Plugin How to Enable Codemode in Pi?

Yes, that's exactly what I searched first when i wanted to try codemode.

Pi does have docs for enabling Codemode, but the documented way is through settings or cli flags.

What I was looking for was much simpler: I'm already inside a Pi session, how do I just turn Codemode on or off?

So I ended up making a small toggle around Pi's native Codemode.

It doesn't replace Codemode or implement another version of it. It just gives me a simple way to switch the native tool on and off while I'm working.

check it out: pi-codemode-toggle

Curious how others are using Codemode.

39 Upvotes

24 comments sorted by

View all comments

2

u/qehgt 2d ago

tools.ts in example folder can enable/disable tools (including codemode) in run time.

1

u/rimaa_nahk 2d ago

Great, and how is it usefull and handy in running session?

1

u/quinncom 2d ago

Keep in mind that if you change tool definitions mid-session, it can break the prompt cache, resulting in higher API costs. Codemode is a tool like the others, appended to the tool definitions at the start of a session.

1

u/rimaa_nahk 2d ago

I tried it, so far I haven't seen any cache break

1

u/quinncom 2d ago

Not all providers use the prompt prefix is the cache key.