Codex Desktop freezes while running new-worktree environment setup command

Open 💬 0 comments Opened Jun 29, 2026 by dezchai

What version of the Codex App are you using?

Unknown from the About Codex dialog. Local CLI reports:

codex-cli 0.142.0

What platform is your computer?

macOS 26.5.1 (25F80), arm64

What issue are you seeing?

Codex Desktop freezes while spinning up a new worktree when the configured environment/setup command runs.

In my case, the setup command includes pnpm i, which takes a few seconds. During those seconds, the entire Codex app becomes unresponsive, as if the app/thread UI is blocked on the setup command completing. This does not look like just the current task waiting for setup; the whole app appears frozen until the command returns.

The command I am trying to run is:

src_root="$(git worktree list --porcelain | awk '/^worktree / { print substr($0, 10); exit }')" && dst_root="$(git rev-parse --show-toplevel)" && for file in .env.local .env.prod.local; do cp -p "$src_root/apps/web/$file" "$dst_root/apps/web/$file"; done && cd "$src_root" && pnpm i

This copies local env files from the primary checkout into the new worktree and then installs dependencies from the source checkout.

What steps can reproduce the bug?

  1. Use Codex Desktop on macOS.
  2. Configure an environment/setup command that runs when Codex spins up a new worktree.
  3. Use a setup command that takes a few seconds, such as the command above with pnpm i.
  4. Start a new Codex thread/worktree that triggers the setup command.
  5. Observe the Desktop app while the setup command is running.

What is the expected behavior?

Codex Desktop should remain responsive while a new-worktree environment/setup command runs.

At minimum:

  • The UI should keep painting and accepting input where possible.
  • The setup command should be shown as a running background/setup phase with elapsed time or progress.
  • Other app UI should not freeze just because this setup command is still running.
  • If setup command completion is required before the new thread can proceed, only that thread/worktree should wait.

What is the actual behavior?

The entire Codex Desktop app appears to freeze for the duration of the setup command. With pnpm i, this is only a few seconds, but it is still enough to make the app feel blocked and unresponsive.

Additional information

I looked for an existing public issue and did not find an exact duplicate for this specific symptom.

Adjacent issues that seem related but not exact duplicates:

  • #11090: Codex App UI freezes with worker/app-server/git-worktree failures.
  • #28345: Codex Desktop should distinguish local workspace I/O stalls from session/context stalls; mentions pnpm install, .worktrees, and package-manager I/O.
  • #4775: Shell commands need default timeout/progress feedback.
  • #25452: First-class project command environments for agent shell execution.

This report is specifically about the Desktop UI becoming unresponsive while a new-worktree environment/setup command is running.

View original on GitHub ↗