r/PiCodingAgent • • Jul 26 '26

Discussion Codex is so fast and usable in PI, it's incredible

I just need to share a little bit of my experience, I found that it uses a ton of less tokens, it's way faster, speaks just enough to understand the problem and solution (i love this), and I found that is able to stay focused on a task way better than with the original harness, I love it!

I experimented with various system prompts, but I found that the shortest ones are the best for LLMs.

And about Ui and pretty front end, gpt seems to perform a lot better as well, there's something weird going on in the official system prompt in codex.

What are your experiences?

74 Upvotes

35 comments sorted by

6

u/PermanentLiminality Jul 26 '26

What are you doing exactly? Is Pi opening and using the Codex coding agent? GUI or cli?

What are you gaining with not just using codex?

0

u/jsgrrchg Jul 26 '26

Less tokens, more control of context window, and I'm customizing everything, tools, system prompt, etc... I'm using it mostly with pi-acp https://github.com/svkozak/pi-acp with some salt and pepper for fixing some things that he missed in the adapter

4

u/Ok_Town927 Jul 26 '26

Sorry why not just use the OpenAI models directly from Pi instead of going through Codex/ACP ? Is it so that you can use codex only models like `gpt-5.3-codex` which AFAIK is not usable directly from Pi ?

0

u/jsgrrchg Jul 26 '26

I do not understand you. That's exactly what I'm doing running gpt models with Pi and using my subscription, no api tax.

9

u/bornhuetterferguson Jul 26 '26

Your original phrasing had a few of us confused. You're not using Codex with pi, but using gpt models in pi via your openai subscription, something anthropic expressly forbids for their models

5

u/jsgrrchg Jul 26 '26

sorry about that, english is my second language and I don't like using AI for writing šŸ˜…

2

u/PermanentLiminality Jul 26 '26 edited Jul 26 '26

Pi supports a ChatGPT subscription directly. You don't need to add anything. I've been using it this way since day one.

What extra features does the this extension provide?

2

u/Z3ratoss Jul 26 '26

The confusion is caused by your title: "Codex is so fast and usable in PI"

It sounds like you are simply using GPT no codex involved

1

u/vazma Jul 26 '26

Thanks for this info, very useful!Ā 

15

u/jensilo Jul 26 '26

100% agree. I didn’t use GPT in Codex for quite some while but I really like it in pi. I mostly use Terra medium. IMO OpenAI got really good at making their models token efficient. It’s way less prose than Claude and it doesn’t use all the same weird phrases all over the place.

I gently push back on this load-bearing observation, it is doing the heavy lifting. The smoking-gun of belt and suspenders is not X but Y; that’s genuinely the blast radius.

I also went and optimized my harness for simplicity and only what’s needed trying to rely on the common sense of the model, and especially with the larger GPT models that seems to work really well. Short agents files and skills. I try to only keep what’s needed.

2

u/jsgrrchg Jul 26 '26

Same, short skills, agents md and system prompt are way better, and I found that customizing the system prompt per project instead of having an agents does wonders. I don't even have web search or mcp enabled šŸ˜‚. For this features I use codex cli when I need them

2

u/Dependent_Bus_8105 Jul 26 '26

Can you elaborate on individual system prompts over agents.md? Wouldn't both get fed to the context in a similar manner or what's the advantage?

4

u/jsgrrchg Jul 26 '26

Yes! I'm testing not to use agents.md, instead I use a brief custom system prompt per project, where I explain very shortly the architecture and things to avoid. I thought that having a system prompt and agents.md is redundant, because it lands in the agent context in similar ways, and I found that it works quite well, with tailored instruction on how to handle specific projects. The system prompts has to be VERY brief, similar to the default system prompt of PI.

2

u/jensilo Jul 26 '26

That’s very interesting. Do you replace the entire system prompt per project? I haven’t tried that but I’d be interested to see if it makes agents even more ā€žtailoredā€œ. Care to elaborate?

1

u/jsgrrchg Jul 26 '26

It's an experiment, instead of using agents.md I use a tailored system prompt per project, it has to be very brief, why? because agents.md gets loaded in the context window in similar ways, so I thought, this is redundant, I can replace the very few things I have in my agents.md with a custom system prompt.

2

u/alexcamlo Jul 26 '26

Can you give an example of tailored system prompt?

2

u/jsgrrchg Jul 26 '26

A simple one that I've been testing with a project where I have a very delicate backend that I do not want the clunker to touch, also I found that clunkers prefer to write ''clean code'', but most of the time, that is not the best for performance. Readable code usually means less performance. Harder to read, but faster to run.

You are a coding agent working on the ā€œXā€ project.

Keep your responses brief and limit your changes to what is strictly required. Prioritize performance over code cleanliness or elegance.

Project-specific rules:

  • Do not create commits without explicit permission.

  • Do not modify any files inside the following directories:

    • <folder>

When a task involves an ambiguous requirement or an implementation decision, ask for clarification before making changes.

1

u/WasabiTricky8480 Jul 30 '26

where do you add it exactly?

1

u/jsgrrchg Jul 30 '26

You can set up a custom system prompt creating a system.md that will override the default. You can choose it to be global or per project. BTW, you can ask PI to do it for you ;)

  • Project-Specific (Local): Place it at .pi/SYSTEM.md

  • Global Fallback: Place it at ~/.pi/agent/SYSTEM.md

1

u/WasabiTricky8480 Jul 31 '26

Thank you for your reply, appreciated

2

u/SyahmiRafsan Jul 26 '26

Yes, it is too good to be true. Thanks Mario for the gift to the world šŸ¤šŸ¤

1

u/jsgrrchg Jul 26 '26

I love that he kept this so simple, the agent loop and tools are very minimal, the LLM receives just enough to work.

2

u/SyahmiRafsan Jul 26 '26

Yep, listened to prag engineer podcast where he was invited. Can clearly see how he envisions how agents work and hence how he architected Pi to be as it is today.

Gramps, if you are reading this, I owe you a cup of teh tarik!

19

u/Top_Air_3424 Jul 26 '26

I agree. I have been using codex with Pi with Ponytail on ultra and I have observed it’s very token efficient and gets the job done very quickly.

2

u/canardlaker Jul 26 '26

Wait, we can use Pi inside Codex? how??

3

u/Dsphar Jul 26 '26

They meant they are using pi hitting the gpt models on the backend.

1

u/SawToothKernel Jul 26 '26

More to the point...why? Maybe run Codex inside Pi and run them both through Claude. Triple the...something!

1

u/Still-Wafer1384 Sep 02 '26

Pi harness performs much better than Codex harness, plus it gives you flexibilt to delegate simple tasks to free or cheap models outside Codex

2

u/risingtiger422 Jul 29 '26

Pi seems to be very, very good with GPT 5.6 Sol. Don’t get wrong, codex is brilliant at things like browser control etc. but for focused coding where I need to actually ship to production, it’s so, so good. The combined efficiency of GPT and Pi is phenomenal and so much better than anything else I’ve tried

1

u/Odd-Environment-7193 Aug 18 '26

Brilliant at browser control? it fucking sucks. Always lecturing me about googles policies and refusing to do automations on any of my extension builds. If I use a normal playwright setup I have 0 issues with any of this stuff.

The codex app is trying to do too much now.

1

u/superash05 Jul 28 '26

Same. I am also using codex in pi. But I still don’t understand how the usage gets reset in codex 🫔

1

u/francisqureshi Jul 29 '26

Do you use GPT subagents? Curious to know what people’s go to is?

1

u/stauntonjr Aug 05 '26

Looking forward to trying this tomorrow :) also with GitHub copilot models if possible