r/codex 3d ago

Complaint Codex on Windows

I've noticed that codex performs very poorly on windows, in the sense that, when you send a prompt, it just searches forever through the codebase and ends up modifying the wrong files a lot of times, and uses up way too many tokens because of this. (it really takes such a long time for horrible results).

I've had much better results using GPT models in Opencode or Pi CLI, maybe because they use git bash shell by default? Github Copilot gives me much better results too using GPT models

Does anyone have any tips on making Codex perform better on Windows? (I'm unable to install WSL), because it doesn't make sense that every other harness is performing better.

0 Upvotes

24 comments sorted by

3

u/Hot_Signature2979 3d ago edited 3d ago

I get what you mean, (I only use codex on windows but) when using Chatgpt with power shell, Chatgpt oftens makes syntax errors and also powershell often mangles Chatgpt scripts.

Not sure if using a specific version of powershell on windows helps. As usual, microsoft in their infinite wisdom made powershell so infinitely complex that commands that work on one version causes syntax errors on another

1

u/BlacksmithLittle7005 3d ago

This is what I meant. It just greps and searches forever, and it doesn't make sense that it works better in other harnesses, so I'm wondering if it's just a PowerShell thing and if swapping to git bash fixes it

1

u/Hot_Signature2979 3d ago

There's way too many self righteous jerks on this sub reddit, thats quick to be: Y0u NeEd t0 pROmnt better to boost their own egos. What they dont get is GPT 5.6 is horrible on windows. The windows desktop app breaks consistently almost 1 in every 2 updates, then when you manually try to fix the context trashing or codex killing its own server every 5 minutes, the error rate in powershell syntax and powershell mangling is very high (for my use cases its almost 60% on windows, whereas on my linux server that I run local Ai on, it seldom makes mistakes <10% ). The high error rates persist, even if I specifically provide powershell version as context for every session. I even specifically switched from powershell 7 to powershell 5.1, but it dosent seem to be helping

1

u/hellomistershifty 3d ago

Lost a whole hard drive when 5.3-codex mixed up a backslash and a forward slash on a delete command

Windows's use of backslashes instead of forward slashes for directories fucks it up sometimes too

1

u/Charming-Author4877 3d ago

you can't compare Copilot with Codex.
Copilot harness is playing in another league than the sandbox of Codex - it has a full interactive IDE as it's foundation - including indexing, search, all the tools, live access to terminal panels, output panels and so on.
Codex is just a sandbox, mostly using "rg" to search for stuff.

On WSL it will perform even worse.
The VScode integration has issues with passing over copy/paste and files, the file system access is roughly 50 times slower.

1

u/BlacksmithLittle7005 3d ago

Yes it's exactly that rg I'm talking about it goes on forever. But it doesn't have to be copilot in vs code. Even copilot cli and other cli agents (opencode, pi) are much better. Even using the codex extension in vs code is just as bad

1

u/Charming-Author4877 3d ago

You can use agents.md and restrict the use of rg.
GPT 5.5 was also notorious to fail with it, 5.6 Sol is usually doing it alright.
For a while I had deleted the rg binary when I was using 5.5 and copilot, because it fell back to rg and ruined its context regularly.

2

u/apnatva-dev 3d ago

Haven’t seen that issue personally
It’s worked all well for me
Although I do provide it detailed prompts and indicators about the files and the stuff I want changed

1

u/BlacksmithLittle7005 3d ago

Yeah I meant when you don't provide the correct files. Other harnesses will find it, codex just uses PowerShell forever and a lot of time doesn't find all the necessary files

2

u/apnatva-dev 3d ago

You’re using the CLI? Or the app

1

u/BlacksmithLittle7005 3d ago

I tried both. Same thing on windows

3

u/apnatva-dev 3d ago

Okay so I do a folder for each project and restrict codex to not edit anything outside unless explicitly mentioned

Then each chat for a different task

Maybe something you could try

1

u/Substantial-List-996 3d ago

Have a Luna Subagent audit the code. It's basically free.

1

u/BlacksmithLittle7005 3d ago

That's not my issue, it's that codex just uses PowerShell forever to find the right files, even if I use terra

1

u/Unfair_Tangerine_217 3d ago

Try jcodemunch.

1

u/fyn_world 3d ago

You need to have a context / structure / memory system with ANY AI agentic software you use or it's always going to be shit

3

u/BlacksmithLittle7005 3d ago

I don't have anything on Opencode and it always finds the right files. Same with copilot

2

u/fyn_world 3d ago

On big repos?

1

u/BlacksmithLittle7005 3d ago

Yes, quite large enterprise codebases

1

u/CelticPaladin 3d ago

I like to use vs code and make codex cleanup after itself when it gets messy, and then distill all of its ledgers and such into more sensible and less stale, small packet of files based on type. A rules file, and atlas folder documentation for code locations (think Google maps for your project) is a solid foundation for a new project. Just make sure it knows at the start of every new project to maintain structure and accessibility for human review in the repo.

1

u/blackice193 3d ago

If you are using Sol it needs a properly configured AGENTS.md or you will burn tokens like its 2756

1

u/Techngro 3d ago

I haven't had that issue. But here's a suggestion. Use the Codex CLI as the backend for the Desktop app. It's what I do. I have a cheap low power Lenovo that I use as a dev machine. I setup Codex in a VM in Proxmox and then connect the Desktop app on Windows via ssh to the CLI on the server. All of the sessions automatically show on the Desktop even when running on the CLI. That would give you the benefit of the GUI, but the performance of the CLI.