Codex App: non-git saved workspace roots can trigger renderer high CPU and Git warning loops

Resolved 💬 1 comment Opened Apr 23, 2026 by SKYhuangjing Closed Apr 23, 2026

Environment

  • Codex desktop app: 26.417.41555 (1858)
  • Subscription: ChatGPT Plus
  • Model: gpt-5.4
  • Platform: macOS 26.5 (25F5058e), Apple Silicon

What happened

If Codex App has a saved workspace root that is a real directory but not a Git repository, the app can get into a high-CPU loop.

In my case:

  • two Codex Helper (Renderer) processes each sat around 110% CPU in Activity Monitor
  • logs were flooded with repeated Git metadata failures
  • renderer sampling was hot in Electron/V8 JS execution and microtask processing, not blocked on I/O

I also saw a related failure path where a workspace value of literal ~ was passed into Git worktree discovery and kept producing:

  • failed to list worktrees for dir=~
  • Failed to resolve origin for workspace

Repro

  1. Save one or more workspace roots in Codex App that are directories but not Git repositories.
  2. Keep Codex App running with background refresh / workspace metadata refresh active.
  3. Watch Activity Monitor and Codex desktop logs.

Example roots that reproduced this for me:

  • /Users/sky/develop/source/todo-list-app
  • /Users/sky/1data/source/control

Expected

  • Non-git workspace roots should be treated as a cheap negative result.
  • The app should not retry aggressively enough to burn renderer CPU.
  • Literal ~ should never be passed into Git worktree resolution as a real directory.
  • Removing or fixing a saved workspace root should stop the bad refresh loop immediately.

Evidence

  • In the bad state I saw over 100000 repeated stable-metadata / Not a git repository warnings in one log set.
  • Representative warnings:
  • warning [electron-message-handler] worker_rpc_response_error ... method=stable-metadata ... errorMessage="Not a git repository"
  • warning [git-origins] failed to list worktrees for dir=~
  • warning [git-origin-and-roots] Failed to resolve origin for workspace
  • After I either removed the bad root or ran git init in every saved root, the warnings stopped and renderer CPU dropped back to normal.

Workaround

Locally I mitigated it by making every saved workspace root a valid Git repo or removing it from Codex App.

Implementation clue

From inspecting the packaged desktop app JS, one workspace-refresh path appears to special-case ~, but a Git origin / worktree resolution path still tries to resolve ~ directly and logs repeated failures. The retry / refresh behavior also seems too aggressive when stable-metadata returns Not a git repository.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗