Running Claude Code and Codex on Windows: 7 things that break, and the fixes I use
First posted on X. Updated for the current version.
I run Claude Code and Codex side by side on Windows all day, mostly inside WSL. Most of what goes wrong isn't the models. It's the plumbing around them.
Here's what breaks, and what I do about it.
1. /tmp disappears
With systemd on (systemd=true in /etc/wsl.conf), WSL empties /tmp every time it starts. If your agent puts a git worktree or a scratch clone there, a restart takes it with it, along with any work that only existed on disk.
Fix: keep worktrees inside the repo (I use .claude/worktrees/<topic>, ignored by git) and have agents commit work in progress early and often. Build caches can stay in /tmp; anything you'd miss can't.
2. Your agent can see all of C:
WSL mounts your Windows drives at /mnt/c. An agent running in WSL can read Downloads, Documents and everything else your Windows user can.
Fix: keep repos in your Linux home, not under /mnt/c. If you don't need Windows files from WSL, turn the mount off in /etc/wsl.conf:
[automount]
enabled = false
Run wsl --shutdown once for it to take effect. You lose easy access to C: from WSL, and that's the point. Windows tools on your PATH (like code .) also stop working from WSL, since they live under /mnt/c.
3. Repos on /mnt/c are slow
Codex and Claude Code read a lot of files. Across the Windows/Linux boundary that's slow, and file watching gets flaky.
Fix: run the agent in WSL against a repo that lives in WSL. Open it from Windows through \\wsl$ if you need to.
4. Close the terminal, lose the agent
Close the terminal window and the agent in it dies mid-task. And after the last WSL window closes, WSL can shut the whole distro down a few seconds later, background processes included.
Fix: run long sessions inside tmux, so closing a window only detaches you. Then stop WSL shutting down when idle. In %UserProfile%\.wslconfig add:
[general]
instanceIdleTimeout=-1
and run wsl --shutdown once. None of this survives a Windows restart, so commit before you walk away.
5. Long runs forget where they were
Sessions get compacted or restarted. Without notes, the agent redoes work or loses the thread.
Fix: a short state file that the agent rewrites after every step:
- done
- doing
- next
It's also the fastest way to check in without reading the whole transcript.
6. Agents approving their own requests
The easy mistake is letting an agent approve its own permission prompts, or text in a file it reads acting as approval. Files can ask. They shouldn't be able to approve.
Fix: keep a short never-self-approve list (deleting things, pushing, anything touching secrets or money), and keep auto-approve off for any session that can reach those.
7. Two agents, no shared memory
When Claude Code and Codex work on the same thing, chat messages between sessions get lost.
Fix: use messages between sessions for pings only. Decisions go in a dated notes file plus each session's state file. And have one model review the other's diff before it lands: they catch different things.
None of this needs special tools: plain WSL, tmux and a few text files go a long way.
Disclosure: I build SoluTerminal, an open-source Windows app that handles 4 and 6 for you. Sessions keep running when you close the window, and agents can't approve their own requests unless you allow it. Free during beta: https://soluterminal.com/?utm_source=devto&utm_campaign=oss-launch&utm_content=article-1 ยท source: https://github.com/soluterminal/soluterminal
What would you add?
Comments
No comments yet. Start the discussion.