Insanely inefficient on windows / powershell
Resolved 💬 20 comments Opened Oct 2, 2025 by dellis23 Closed Oct 9, 2025
💡 Likely answer: A maintainer (gpeal, contributor)
responded on this thread — see the highlighted reply below.
What version of Codex is running?
codex-cli 0.42.0
Which model were you using?
_No response_
What platform is your computer?
Microsoft Windows NT 10.0.19045.0 x64
What steps can reproduce the bug?
Try to get codex to make a very small change to a file
What is the expected behavior?
It does so in a reasonable time frame
What do you see instead?
Codex spends an insane amount of time just trying to figure out how to edit text. Here's part of the output (it also gets screwed up when I try to scroll) for a case where it took 20+ minutes to make a ~10 line change to an HTML file.
… +7 lines
… +7 lines
Code hygiene
- Do not leave leftover comments referencing removed code or temporary notes. Remove obsolete blocks entirely to
avoid confusion.
└ rg : The term 'rg' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
… +4 lines
+ FullyQualifiedErrorId : CommandNotFoundException
└ Select-String : A parameter cannot be found that matches parameter name 'Recurse'.
At line:1 char:41
… +3 lines
+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.SelectStringCommand
• Ran powershell.exe -Command 'Get-ChildItem -Recurse -File | Select-String -Pattern nickname'
• Ran powershell.exe -Command 'Get-ChildItem -Recurse -File web | Select-String -Pattern nickname'
└
• Ran powershell.exe -Command 'Get-ChildItem -Recurse -File frontend | Select-String -Pattern nickname'
└
• Updated Plan
└ □ Inspect backend and frontend code paths handling player profile editing to understand current nickname handling.
□ Implement backend and frontend changes to make nickname editable on the player profile edit page.
□ Review changes and note manual verification steps (tests intentionally not run).
• Ran powershell.exe -Command 'Get-Content web/backend/forms.py'
└ from django import forms
from .models import Player, PlayerAvailability, Team, LeagueMatch, MatchIntentToJoin, MatchIntentToCreate
… +7 lines
web\backend\forms.py:47:class PlayerProfileEditForm(forms.ModelForm):
… +7 lines
… +7 lines
</script>
{% endblock %}
… +7 lines
… +7 lines
</div>
{% endblock %}
• Updated Plan
└
web\backend\migrations\0041_player_email.py:9: ('backend', '0040_player_nickname'),
… +5 lines
└ At line:1 char:11
+ python - <<'PY'
… +7 lines
+ FullyQualifiedErrorId : MissingFileSpecification
• Ran powershell.exe -Command "python -c \"from pathlib import Path; path = Path('web/backend/forms.py'); text =
│ path.read_text(); old = \\\" fields = ['commitment_level', 'days_available', 'roles', 'timezone']\\\"; new
^
SyntaxError: unterminated string literal (detected at line 1)
• Ran powershell.exe -Command "(Get-Content web/backend/forms.py) -replace \" fields = \\['commitment_level',
│ 'days_available', 'roles', 'timezone'\\]\", \" fields = ['nickname', 'commitment_level', 'days_available',
│ 'roles', 'timezone']\" | Set-Content web/backend/forms.py"
└ Block not found
At line:30 char:43
… +3 lines
+ FullyQualifiedErrorId : Block not found
• Ran powershell.exe -Command 'Get-Content web/backend/templates/backend/profile_edit.html | Select-Object -Index 27..60'
└ Select-Object : Cannot bind parameter 'Index'. Cannot convert value "27..60" to type "System.Int32". Error: "Input
string was not in a correct format."
… +4 lines
+ FullyQualifiedErrorId : CannotConvertArgumentNoMessage,Microsoft.PowerShell.Commands.SelectObjectCommand
• Ran powershell.exe -Command 'Get-Content web/backend/templates/backend/profile_edit.html | Select-Object -Skip 40
│ -First 40'
└
<div class="info-item" style="margin-top: 1rem;">
… +7 lines
<!-- Commitment Level -->
<div style="margin-bottom: 1.5rem;">
• Ran powershell.exe -Command '$path = '"'web/backend/templates/backend/profile_edit.html'; "'$content = Get-Content
• Ran powershell.exe -Command '$path = '"'web/backend/templates/backend/profile_edit.html'; "'$content = Get-Content
│ $path -Raw; $addition = '"'
│
│ … +23 lines
… +3 lines
+ FullyQualifiedErrorId : Pattern not found
• Ran powershell.exe -Command "python -c \"from pathlib import Path; text = Path('web/backend/templates/backend/
│ profile_edit.html').read_text(); idx = text.index('Active Status'); snippet = text[idx-120:idx+200];
│ print(repr(snippet))\""
└ ' </div>\n\n <div class="info-item" style="margin-top: 1rem;">\n <div
class="info-label">Active Status</div>\n <div class="info-value">\n {% if
player.inactive %}\n <span style="color: #fca5a5;">Inactive</span>\n {% e'
│ profile_edit.html'); text = path.read_text(); block = ' <div class=\\\"info-item\\\" style=\\
│ \"margin-top: 1rem;\\\">\\n <div class=\\\"info-label\\\">Active Status</div>\\n <div
from pathlib import Path; path = Path('web/backend/templates/backend/profile_edit.html'); text =
path.read_text(); block = ' <div class=" info-item\
… +7 lines
+ FullyQualifiedErrorId : CommandNotFoundException
• Ran powershell.exe -Command "'python -c \"from pathlib import Path; path = Path(\\\"web/backend/templates/backend/
│ profile_edit.html\\\"); text = path.read_text(); block = \\\"\\\"\\\" <div class=\\\\\\\"info-item\\\\\\
│ \" style=\\\\\\\"margin-top: 1rem;\\\\\\\">\\n <div class=\\\\\\\"info-label\\\\\\\">Active Status</
│ … +14 lines
└ python -c "from pathlib import Path; path = Path(\"web/backend/templates/backend/profile_edit.html\");
text = path.read_text(); block = \"\"\" <div class=\\\"info-item\\\" style=\\\"margin-top: 1rem;
\\\">\n <div class=\\\"info-label\\\">Active Status</div>\n <div class=\\
\"info-value\\\">\n {% if player.inactive %}\n <span style=\\
\"color: #fca5a5;\\\">Inactive</span>\n {% else %}\n <span style=\
\\"color: #86efac;\\\">Active</span>\n {% endif %}\n </div>\n </
div>\"\"\"; addition = \"\"\"\n\n <div style=\\\"margin-top: 1.5rem;\\\">\n <label
for=\\\"{{ form.nickname.id_for_label }}\\\" style=\\\"display: block; margin-bottom: 0.5rem; font-weight:
600; color: var(--pico-color);\\\">\n {{ form.nickname.label }}\n </label>\n
p>\n {% endfor %}\n </div>\n {% endif %}\n <p
style=\\\"margin-top: 0.5rem; font-size: 0.85rem; color: var(--pico-muted-color);\\\">\n This
nickname appears to other players in place of your Discord username.\n </p>\n </div>\"\"\";
-Command "& python -c \"...\"" or by creating a temporary Python script file via Set-Content, running it, and then
deleting it—all executed sequentially in one PowerShell command line. This approach might simplify handling the tricky
quoting issues.
• Ran powershell.exe -Command '$script = @'"'
• Ran powershell.exe -Command 'Get-Content web/backend/templates/backend/profile_edit.html | Select-Object -Skip 40
│ -First 40'
└
<div class="info-item" style="margin-top: 1rem;">
• Ran powershell.exe -Command "Select-String -Path web/backend/forms.py -Pattern \"fields = \\['\""
└
web\backend\forms.py:64: fields = ['nickname', 'commitment_level', 'days_available', 'roles', 'timezone']
• Updated Plan
└ ✔ Inspect backend and frontend code paths handling player profile editing to understand current nickname handling.
✔ Implement backend and frontend changes to make nickname editable on the player profile edit page.
□ Review changes and note manual verification steps (tests intentionally not run).
• Ran powershell.exe -Command 'git diff'
└ diff --git a/web/backend/forms.py b/web/backend/forms.py
index b9e8c46..4366806 100644
… +7 lines
<div class="info-item" style="margin-top: 1rem;">
<div class="info-label">Teams</div>
✔ Review changes and note manual verification steps (tests intentionally not run).
> - Added nickname to the allowed fields in PlayerProfileEditForm so profile saves now persist user edits (web/backend/
Manual check:
Tests were not run (per your instruction).
▌ Make the blocks in this order: discord username, steam id, email, active status, team, then nickname. Put the first
▌ four inside the same row, then team on a row by itself, then nickname on a new row.
│ <div class=\"info-grid\">
│ … +138 lines
└ Original block not found
At line:133 char:41
… +3 lines
└ color-accent); margin-top: 2rem;">Account Information</h3>
• Ran powershell.exe -Command "python -c \"from pathlib import Path; text = Path('web/backend/templates/backend/
start=text.index(' <div class=
│ profile_edit.html').read_text(); start=text.index(' <div class=\\\"info-grid\\\">'); end=text.index('
• Ran powershell.exe -Command "python -c \"from pathlib import Path; text=Path('web/backend/templates/
└ -1
• Ran powershell.exe -Command "Select-String -Path web/backend/templates/backend/profile_edit.html -Pattern '<div
│ class=\"info-grid\"'"
└
web\backend\templates\backend\profile_edit.html:23: <div class="info-grid">
• Ran powershell.exe -Command "python -c \"from pathlib import Path; text=Path('web/backend/templates/backend/
SyntaxError: unterminated string literal (detected at line 1)
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text()
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text()
│ … +4 lines
└ 574 3654
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
│ path = Path(\"web/backend/templates/backend/profile_edit.html\")
│ … +75 lines
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text()
│ … +2 lines
└ ''
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text()
│ … +2 lines
└ 0
• Ran powershell.exe -Command 'Get-Item web/backend/templates/backend/profile_edit.html'
└
… +6 lines
• I see the file got truncated to zero length, likely from a partial write attempt that failed due to encoding issues. To
• Ran powershell.exe -Command 'Get-Content web/backend/templates/backend/profile_edit.html | Select-Object -Skip 20
│ from pathlib import Path
│ path = Path(\"web/backend/templates/backend/profile_edit.html\")
│ … +4 lines
└ The string is missing the terminator: '@.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : TerminatorExpectedAtEndOfString
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text()
│ … +4 lines
└ <!-- Read-only fields -->
│ from pathlib import Path
│ path = Path(\"web/backend/templates/backend/profile_edit.html\")
│ … +60 lines
• Ran powershell.exe -Command '$script = @'"'
class="info-value">{{ player.discord_username }}</div>\n </div>\n <div
class="info-item">\n <div class="info-label">Steam ID</div>\n <div
class="info-value">\n {% if player.steam_id3 %}\n <a
href="{{ player.get_statlocker_link }}" target="_blank" style="color: var(--color-accent); text-decoration:
0; padding-left: 1.25rem;">\n {% for team in player.teams.all %}\n {%
for membership in player.memberships.all %}\n {% if membership.team == team %}\n
<li>{{ team.get_name_with_divisions_and_region }} ({{ membership.get_role_display }})</li>\n
{% endif %}\n {% endfor %}\n {% endfor %}\n </ul>\n
</div>\n {% endif %}\n\n '
• Ran powershell.exe -Command '$script = @'"'
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
│ path = Path(\"web/backend/templates/backend/profile_edit.html\")
│ … +37 lines
… +7 lines
web\backend\forms.py:64: fields = ['nickname', 'commitment_level', 'days_available', 'roles', 'timezone']
web\backend\forms.py:105: fields = ['availability_type', 'recurrence_type']
M web/backend/templates/backend/profile_edit.html
• Ran powershell.exe -Command 'git diff'
│ … +3 lines
└ <span class="info-icon" data-content="Just here to play – I want to show up on tournament days, play my matches and
have fun. No scrims or extras.
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text(encoding=\"utf-8\")
│ … +5 lines
Fully committed – I want a dedicated team that scrims often, gets coached, reviews matches and sticks to a set
practice schedule.">ⓘ</span>
• Ran powershell.exe -Command "python - <<'PY'
│ from pathlib import Path
│ text = Path('web/backend/templates/backend/profile_edit.html').read_text(encoding='utf-8')
│ … +4 lines
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text(encoding=\"utf-8\")
│ from pathlib import Path
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text(encoding=\"utf-8\")
• Ran powershell.exe -Command "(Get-Content web/backend/templates/backend/profile_edit.html) -replace
│ '{{ player.steam_id3 }} \\?', '{{ player.steam_id3 }} ↗' | Set-Content web/backend/templates/backend/
│ profile_edit.html"
• Ran powershell.exe -Command '$script = @'"'
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text(encoding=\"utf-8\")
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text(encoding=\"utf-8\")
│ … +3 lines
└ '{{ player.steam'
• Ran powershell.exe -Command '$script = @'"'
• I’m noticing that replacing the arrow character failed likely due to encoding problems with PowerShell’s default
│ from pathlib import Path
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text(encoding=\"utf-8\")
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text(encoding=\"utf-8\")
│ … +3 lines
' '
└ 25 32 ' '
26 32 ' '
│ from pathlib import Path
33 32 ' '
34 32 ' '
└ 0 '{' 123
• Ran powershell.exe -Command '$script = @'"'
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
• Ran powershell.exe -Command 'Select-String -Path web/backend/templates/backend/profile_edit.html -Pattern "↗"'
│ from pathlib import Path
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text(encoding=\"utf-8\")
│ … +2 lines
└ 1204
│ … +3 lines
│ … +4 lines
└ 1204
'am_id3 }} ?\n '
• Ran powershell.exe -Command '$script = @'"'
│ s = \"↗\"
│ print(repr(s))
│ … +1 lines
└ '?'
• Ran powershell.exe -Command '$script = @'"'
│ s = \"↗\"
│ print(ord(s))
│ path = Path(\"web/backend/templates/backend/profile_edit.html\")
│ … +4 lines
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
│ … +5 lines
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text(encoding=\"utf-8\")
│ … +4 lines
└ diff --git a/web/backend/forms.py b/web/backend/forms.py
index b9e8c46..4366806 100644
… +7 lines
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text(encoding=\"utf-8\")
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
└ 0
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text(encoding=\"utf-8\")
│ … +8 lines
└ 0 0x4a
1 0x75
… +7 lines
108 0x73
109 0x2e
• I see that the file's text got corrupted due to improper encoding, mixing UTF-8 bytes with Latin-1 characters causing
dashes to appear as –. To fix this, I'll revert the file to the last committed version and carefully reapply the
needed changes using UTF-8-safe Python string operations that insert new HTML blocks without unintentionally altering
dash characters or other text. My plan involves expanding the info grid by moving and combining email and active status
into it, adding a new nickname block after the team block, and ensuring the overall layout remains consistent. I'll do
this mostly via string replacement and insertion commands, controlling for encoding by using Unicode escape sequences
as needed.
• Ran powershell.exe -Command 'git checkout -- web/backend/templates/backend/profile_edit.html'
• Ran powershell.exe -Command 'Get-Content web/backend/templates/backend/profile_edit.html | Select-Object -Skip 20
│ -First 80'
└
<!-- Read-only fields -->
… +7 lines
</div>
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
│ path = Path(\"web/backend/templates/backend/profile_edit.html\")
│ … +37 lines
• Ran powershell.exe -Command 'Get-Content web/backend/templates/backend/profile_edit.html | Select-Object -Skip 20
│ -First 80'
└
<!-- Read-only fields -->
… +7 lines
Light commitment – I'm looking for a fun group to play with in an organized setting. I'm open to occasional scrims
if people want them.
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text(encoding=\"utf-8\")
│ … +3 lines
└ ['0x7b', '0x7b', '0x20', '0x70', '0x6c', '0x61', '0x79', '0x65', '0x72', '0x2e', '0x73', '0x74', '0x65', '0x61',
'0x6d', '0x5f', '0x69', '0x64', '0x33', '0x20', '0x7d', '0x7d', '0x20', '0x2197', '0xa', '0x20', '0x20', '0x20',
'0x20', '0x20']
• Ran powershell.exe -Command '$script = @'"'
│ from pathlib import Path
│ text = Path(\"web/backend/templates/backend/profile_edit.html\").read_text(encoding=\"utf-8\")
│ … +4 lines
└ 0x2013
• Ran powershell.exe -Command 'git status --short'
└ M web/backend/forms.py
M web/backend/templates/backend/profile_edit.html
• Ran powershell.exe -Command 'git diff web/backend/templates/backend/profile_edit.html'
└ diff --git a/web/backend/templates/backend/profile_edit.html b/web/backend/templates/backend/profile_edit.html
index bbb5798..5c7bc72 100644
… +7 lines
<h4 style="margin-top: 2rem; margin-bottom: 0.5rem; color: var(--color-accent);">Team Matching
Information</h4>
<p style="margin-bottom: 1rem; color: var(--pico-muted-color); font-size: 0.9rem;">
Additional information
_No response_
20 Comments
Its unusable rn because of this
Agreed. 20 minutes to make a straightforward edit is a non starter.
For what it’s worth I’ve seen it have some inefficiency in the past but either the latest client or model update seems to have done something to make it drastically worse.
Will stdout/stderr decoding break if child process does not output UTF-8? https://github.com/openai/codex/blob/b07aafa5f55b74eadaaff404d871f4dc7694a389/sdk/typescript/src/exec.ts#L90-L124
I gave up on Windows, I'm using WSL to continue my work.
Is it difficult to set it up? Ive never tried it and im kinda tired of codex.
I had to use WSL, because Windows was horrible. No idea if is the model that needs more specific training or the prompt sent to the model are broken, but directly in windows was like impossible. Directly in windows has its benefits because it could more easily build projects and analyze the output. That is why I am using codex to plan (since it is smarter model) and cc for actual implementation as it seems to be better at tooling.
Such a serious bug has been delayed for so long without being fixed. I wonder what they are doing?
Claude seems to be working better than ever (handles tasks like this in 20 seconds instead of 20 minutes), so I guess I'll try that for a while.
Claude Code has other short-comings, you will find out ;-)
So does my microwave, but I can at least use it for _something_.
It's useless on Windows.
I renewed my subscription to see what the hype was about and how it compared to Claude Code.
All I asked was to add the context7 MCP server to it's _config.toml_ (without the last part it tries adding it to my project!)
Then it needs me to provide the config details (which I do).
320k tokens later _it can't even figure out how paths work!_ 😵
<img width="215" height="152" alt="Image" src="https://github.com/user-attachments/assets/2c5cc8af-359e-42ad-8c32-d8f71a79c4e1" />
If I let it slog for hours I doubt it would be any closer to completing the simplest request I could think of...
That solves the problems with line ending. I am developing in Java/Maven and in WSL running tests by mvn is at least 5x slower than in PowerShell. So I have to choose either wait Codex fighting with CRLF (and eating tokens) or endless waiting to mvn test to execute.
I got increasingly frustrated with Codex CLI experience on windows that I created an MCP to give it the tools that most other CLIs have. Please use it at your own risk but in my testing I've found Codex to be much faster with these tools on Windows rather than trying random PS and Python scripts for basic operations.
https://github.com/BumpyClock/code-tools-mcp
I got it working in WSL again, but it for some reason is still taking forever to finish basic tasks (e.g. rename this method, change the return type, and update the seven or so places that call it). I’m not sure if it’s a model issue or a windows issue at this point.
Wow! This is such a great Idea to solve things in the meanwhile. Thanks! The downside is that it eats some context. But in the meanwhile, can be a good workaround. On my side what I did was that I recreated everything on the Linux (WSL) side. Installed .net for Linux and compiled other tools for Linux. It still hits the sandbox sometimes. Some issues of permission with sockets, but it finds some workaround and continues from there. Not clear to me which one, but it builds and executes a subset of the test suite on Linux and gets feedback. For php, I installed php for Linux in WSL too, and also python since I was seeing sometimes codex tried to call python to patch files and was failing. Then tried something else but that meant more tokens with the retry. So, I just fed it python as well.
There are MCP servers for refactoring. No idea on what language you are using, but for c# there are some. Search github. You could also "vibecode" your own reusing some library or some parser for your language if you don't find any. If you use that instead, you are going to save a lot of tokens and time. If you are not going to use MCP, you should definitely not use thinking. Use lowest setting since for those simple tasks it is faster and they are done perfectly with those faster settings. But then I would not do that with AI at all, I would use refactoring tool. Click and rename etc.
1 - Use refactoring tool (no AI), best but requires refactoring software
2 - Use refactoring MCP, second best but more complex to deploy
3 - Lower model settings, worse option but is the simplest to use
yeah it def eats some context but I figured it's a tradeoff. Codex loves to gather context before making a decision so I took inspiration from Gemini CLI and gave it a read-many-files tool along with read file, glob, and grep. makes it more reliable so it wastes less time in gathering information before applying a patch, also wastes less time writing a powershell command/script failing and then writing a python script to perform basic tasks. I assume it's less context than repeatedly generating python scripts to do the same operations. I'm still iterating on the prompts and reliability and could def be placebo but codex definitely feels faster to me after giving it these tools.
I use serena mcp which integrates LSP's and give's it some great tools. That combined with the MCP I shared above I've had way better success in Windows / Powershell
Hi all, we're well aware of a number of serious Windows issues. We've made some improvements over the last couple of weeks and have many more coming soon.
I'm going to dupe this against #2552 (there are others with the windows-os label as well) to keep the noise down but we hear you loud and clear and plan on making Windows much better very soon.