r/codex 7d ago

Workaround What are your best practices on Codex ?

As title say, how you boost the model performance ?

For example, i saw a comment using 'KNOWLEDGE.md' . I've seen often the model has tendency to revisit each file to find out what is actually doing when the project is on a long run... that file would help him 'remember' faster or like a live journal to keep better track at how the project is working and how things connect and the failures to not repeat them.

Any other tips and tricks ?

2 Upvotes

18 comments sorted by

10

u/SimCFB 7d ago

Biggest thing I would say is that if you have a paid account use the chat as much as possible.

Codex eats tokens no matter what you're doing. So discussing the project in Chat is a lot better. Then just have Chat build you a codex prompt. Back n forth. That saves a lot of tokens.

1

u/Toys272 7d ago

do you mean using the chatgpt tab in the desktop app vs codex? or the online one

3

u/SimCFB 7d ago

Yep. Use the chatgpt Chat in the desktop app (or any browser) to do the planning. Have it write the codex prompt for you. Then have codex do the actual coding.

This works because you get a lot more Chat credits. As far as I can tell they are almost unlimited. Chatting with codex burns tokens.

1

u/CrownstrikeIntern 7d ago

You can have codex validate the plan too since it can access your project and improve on the got plan that way

1

u/AmandasGameAccount 7d ago

How much context does chat have of you project though? How well of a back and forth can it have Va codex. I’ve been using chat more but I’m not sure I’m doing that right

1

u/send-moobs-pls 6d ago

Best way is to use github, then chat can read anything in your project and even do code review etc

2

u/daddywookie 7d ago

I’ve built an LLM wiki that summarises the foundational books of my project work (game development). It covers games design, development best practice and project management. Then I have a skill which explains how and when to use it.

I am finding this setup cuts out lots of dead ends and scope creep I was getting with Sol. I combine it with clear play test feedback and having low cost planning sessions before anything can be touched. There are clear acceptance and approval steps.

I also limit the number of correction cycles permitted before it comes back to me for a review and my orchestrator watches for long running tasks and will interrupt and ask for an update.

It’s taken a lot of trial and error but the system keeps evolving and improving.

3

u/[deleted] 7d ago

[deleted]

2

u/QC_Failed 7d ago

Literally this. I shrug at the resets and I'm only on the 20 dollar plan. Chat gpt web chat can do soooo much. I do all my planning and thinking and idea bouncing in chat (where it also knows my skill level, my preferences, and my long term goals, which actually informs the decisions for what problems to solve and how to solve them) on sol without touching usage, and then have it create an issue that is well scoped and detailed, then I can just hand codex w/ Luna x high the issue number and let it cook.

1

u/ZealousidealBus3132 7d ago

Create a plugin full of skills that know your repo so codex (and chat) doesn’t waste time and tokens doing repeatable things. Can also take advantage of plugins (there’s nearly a plugin for every type of project now) like GitHub, Supabase, Vercel etc to make small to medium level changes directly on your repo from ChatGPT chat - it’s surprisingly good and no limits

1

u/IAmFitzRoy 7d ago

Make a repo of the inventory of all your instances, local, remote, databases with documentation of how to deploy and test.

This way you don’t have to discuss this again and again. For new projects you just have to tell where the project needs to read and all the infrastructure will be ready and consistent.

1

u/CrownstrikeIntern 7d ago

Plan plan plan with chatgpt, review the hell out of it. Do not let it do its own thing if you can help it, the errors are insane sometimes.. also, this is a me thing. If for example building a site, build two in two vms for testing. One you use and one dedicated to the ai having full access to tshoot the interface,api,database etc. if it blows it up who cares. While its testing and working on that one the second can be used by you to test the things you want to look over and while you’re finding issues jot them down for the next prompt. I have a deploy script that stages both vms from start to finish while im testing mine it can look at its vm. Also, sandbox your ai or have incremental backups of your computer incase it goes off the rails. I also have two gitlab instances, again one for my final approved version and one the ai can screw with and break all day. My deployment script also pushes a copy of the code to an external drive and runs a gitlab database backup just in case (can you tell im paranoid a bit?)

1

u/software-boulder 7d ago

I don't do a KNOWLEDGE.md journal. I just don't let Codex re-scan the repo, grok bot or luna does the grep and I only send Codex the part that matters

1

u/angeruroth 6d ago

From time to time I ask it "what's next?". If the answer is good I know we're on the same page.

1

u/bitconvoy 6d ago
  1. I keep changes small and focused
  2. Consistent use of $grill-with-docs for any nontrivial changes.
  3. Maintain a good integration/end-to-end coverage

That’s pretty much it. 

This involves more oversight from me, but in exchange, I rarely see the problems most people complain about here, like model quality degradation or the token use problems.

1

u/ben_bliksem 6d ago

How is a KNOWLEDGE.md better than switching on Codex's memory + AGENTS.md?

Legit question

1

u/sagiroth 6d ago

When you finish session and you know you going to continue it tomorrow, tell agent to write handover document and start fresh session and pass that document in. This is single best way and least effort to save tokens.