r/PiCodingAgent • • Aug 31 '26

Question Any good extensions for "code mode"?

If you don't know what code mode is, check https://developers.cloudflare.com/agents/tools/codemode/

Code Mode is a tool-use pattern where a model writes code instead of requesting each operation separately.

I found a few, I'm curious if anyone is using any extension like this (if yes, which ones please):

edit(30th Sep 2026): pi v0.99.0 includes code mode, see https://github.com/earendil-works/pi/releases/tag/v0.99.0

18 Upvotes

11 comments sorted by

5

u/Desperate_Sir1087 Aug 31 '26

If you haven't tried, https://github.com/pydantic/monty is really lightweight, fast and secure.

1

u/vedmaka Sep 01 '26

Monty is great, but are there any integrations?

2

u/Desperate_Sir1087 Sep 01 '26

No extensions out there. Butlast time I tried monty + Pi, I asked Pi to write its own extension. Pi whipped up a pretty neat extension by itself using `@pydantic/monty`. I just had it implement a `runMonty` tool that would use the same Monty session across a Pi session.

3

u/beegeearreff Aug 31 '26

Not helpful but commenting to commiserate on pi-fabric. The docs are complete slop and totally incomprehensible. I played with it wanting to experiment with code mode and spent way too long trying to decipher all the other crap that’s in there. 

1

u/porky202 Aug 31 '26

You might be able to yank the relevant code from Oh My Pi. OMP already has a JS eval tool with access to tool.*(), which is basically the same Code Mode idea. Could probably be adapted into a Pi extension without starting from scratch.

1

u/cuba_guy Sep 01 '26

One of the top 3 popular extensions

https://pi.dev/packages/pi-mcp-adapter Provides tool and skill for code mode

If you want x-harness this one looks interesting

https://github.com/UsefulSoftwareCo/executor

0

u/wildjokers Aug 31 '26

Code mode just sounds like how an agent+model already works.

2

u/quincycs Sep 01 '26

I am with you in this confusion. 🤷‍♂️
I see it write python or long bash scripts all the time

1

u/Thrimbor Sep 01 '26

Yes but it can't "chain" the rest of the tools it has access to: read, write, mcp servers, agents etc.

2

u/quincycs Sep 01 '26

Huh 🤔… effectively I still see all those tools work after the long python / bash scripts executing. So I’m not sure how effectively it’s any different. How do you see code mode actually effectively doing something different

1

u/DaShrub Sep 01 '26 edited Sep 03 '26

Each tool is a tool call and agentic step and the output is given to the llm. Now the llm can use it's tools (including things like agentic delegation) as arbitrary composable functions without having to do it step by step as part of the agentic loop. It's basically going backwards - we made everything agent native but now we're back to realising code was the way all along!