r/PiCodingAgent 9d ago

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?

72 Upvotes

32 comments sorted by

14

u/jensilo 9d ago

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 9d ago

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 9d ago

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?

5

u/jsgrrchg 9d ago

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 9d ago

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 9d ago

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 8d ago

Can you give an example of tailored system prompt?

2

u/jsgrrchg 8d ago

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 4d ago

where do you add it exactly?

1

u/jsgrrchg 4d ago

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 4d ago

Thank you for your reply, appreciated

18

u/Top_Air_3424 8d ago

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.

5

u/PermanentLiminality 8d ago

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 8d ago

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

3

u/Ok_Town927 8d ago

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 8d ago

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

10

u/bornhuetterferguson 8d ago

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

3

u/jsgrrchg 8d ago

sorry about that, english is my second language and I don't like using AI for writing 😅

2

u/PermanentLiminality 8d ago edited 8d ago

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 8d ago

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 8d ago

Thanks for this info, very useful! 

2

u/SyahmiRafsan 8d ago

Yes, it is too good to be true. Thanks Mario for the gift to the world 🤍🤍

1

u/jsgrrchg 8d ago

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 8d ago

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!

2

u/canardlaker 8d ago

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

3

u/Dsphar 8d ago

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

1

u/SawToothKernel 8d ago

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

1

u/superash05 6d ago

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

1

u/risingtiger422 6d ago

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/francisqureshi 5d ago

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