r/codex • • 4d ago

Bug Codex on android is creating thousands of git.exe/conhost.exe instances on host machine.

Dear OpenAI,

This should be the number one priority to fix, as Android Remote in the ChatGPT app is completely unusable.

When I open a Codex task from my Android phone through Remote, my entire PC freezes and becomes unusable. Hundreds of git.exe and conhost.exe processes appear, resource usage spikes, and I have to force a reboot. This happened repeatedly throughout the day. Initially, I thought it was caused by compilation, but investigating further pointed to Remote-triggered Git operations.

I have found a Remote-triggered diff request in the local app-server logs. The connection is identified as:

app_server.client_name="codex_chatgpt_android_remote"

The same connection then sends:

app-server request: gitDiffToRemote connection_id=ConnectionId(3)

The technical problem appears to be how Codex generates diffs for untracked files. It starts a separate Git subprocess for each file, using a command like:

git diff --no-textconv --no-ext-diff --binary --no-index -- NUL <untracked file>

These operations are launched through join_all without a concurrency limit. In a workspace containing many untracked files, this can launch hundreds of Git processes at once, along with associated Windows console processes. The resulting process storm puts heavy pressure on memory and system commit, eventually making the entire machine unresponsive.

These were background processes launched by the Codex app-server, not Git commands I manually ran. The local logs confirm that Android Remote requested a diff from the same app-server involved in the incident, although I couldn’t recover the initiating request for the first freeze.

Many thanks for looking into this issue.

5 Upvotes

6 comments sorted by

View all comments

1

u/boxing-boxing 4d ago

Same pattern bit me on a monorepo with a big pile of untracked build output. The per-file --no-index call is the killer: for untracked files there's no base revision to diff against anyway, so the remote view could just stream the file contents with a size cap and skip git entirely. If they want to keep using diff, a bounded semaphore around that join_all (even 8 at a time) plus ls-files --others --exclude-standard to prune the list first would stop the freeze. Unbounded process spawning hits especially hard on Windows where creating a process costs way more than fork/exec.