[BUG] [Desktop] CCD 2.1.209 regression: "Shell environment extraction" blocks main process for 25s on every app start (Linux)

Status Open
Reported on v2.1.205
Maintainer reply None cached
Activity 0 comments · opened Jul 21, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Since the CCD component auto-updated from 2.1.205 to 2.1.209 (2026-07-20), every start of Claude Desktop on Linux stalls the Electron main process for ~25 seconds during "Shell environment extraction". App startup went from a few seconds to ~30 seconds. 2.1.205 and earlier did not show this — the jump correlates exactly with the CCD update, the app binary itself was unchanged.

Environment:

  • Claude Desktop 1.22209.0 (community build claude-desktop-unofficial, Electron 42.5.1 — the CCD component itself is stock and auto-updated)
  • Fedora Linux 44, Sway (Wayland), --ozone-platform=wayland
  • App runs as a dedicated non-login user via sudo -u <user> dbus-run-session <launcher>; SHELL=/bin/bash, no TTY

What I ruled out:

  • The shell itself is fast. Reproducing the extraction manually with the exact environment of the app process (env -i SHELL=/bin/bash TERM=unknown HOME=… PATH=… bash -ilc 'echo ok' </dev/null, no TTY) completes in 0.1s, including all /etc/profile.d snippets. No conda/nvm/slow rc files.
  • Setting TERM=xterm-256color and cd $HOME before launching (verified present in the app process env) changes nothing — still 25s.
  • Not machine load: stalls were <1s for a week on the same box until the CCD update.

Impact: every cold start takes ~25s longer, and the extraction apparently runs synchronously on the main process (the event-loop-stall warning matches the 25s timeout exactly), so the whole UI is delayed, not just CCD. Window-management automation that waits for the app window breaks.

What Should Happen?

  • Shell environment extraction should not block the main process / window creation; and/or
  • the spawn mechanism should succeed in environments where bash -ilc env demonstrably completes in 0.1s (headless-ish Wayland session, no TTY, dedicated user); and/or
  • a documented opt-out (env var or setting) to skip extraction and use process.env.

Error Messages/Logs

Every start since 2.1.209 (from `~/.config/Claude/logs/main.log`):


[info]  [CCD] Initialized with version 2.1.209
[warn]  [event-loop-stall] main process blocked for 25138ms [likely sleep: duration_heuristic]
[warn]  [CCD] Shell environment extraction failed (attempt 1/5, willRetry=true), using process.env:
        Error: Shell environment extraction timed out


Stall history:


2026-07-17 06:06:27  524ms   (CCD 2.1.205)
2026-07-18 08:01:58  967ms   (CCD 2.1.205)
2026-07-20 06:54:20  25248ms (CCD 2.1.209, first start after auto-update)
2026-07-20 18:30:53  25005ms
2026-07-21 07:54:52  25138ms
2026-07-21 08:24:55  25212ms


Happy to provide full logs or test a debug build.

Steps to Reproduce

  1. Linux machine (Fedora 44, Sway/Wayland). Claude Desktop with CCD component ≥ 2.1.209 (arrived via auto-update on 2026-07-20; CCD 2.1.205 on the same setup did not show the issue).
  2. Launch the Claude Desktop app (in my setup: as a dedicated non-login user via sudo -u <user> dbus-run-session <launcher>, SHELL=/bin/bash, no TTY — plain bash -ilc env in this exact environment completes in 0.1s).
  3. Watch ~/.config/Claude/logs/main.log during startup.
  4. Observed on every start: [CCD] Shell environment extraction failed (attempt 1/5, willRetry=true) … Shell environment extraction timed out preceded by [event-loop-stall] main process blocked for ~25000ms — the app window appears ~25s later than with CCD 2.1.205.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.205 (CCD component)

Claude Code Version

2.1.209 (CCD component auto-updated inside Claude Desktop 1.22209.0)

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

Not terminal-related — this is about the Claude Desktop app itself (CCD component). The app runs in an isolated setup (dedicated Linux user, dbus-run-session, Sway/Wayland), but the shell environment was verified fast and reachable in that exact context (0.1s, see "What's Wrong?"). Full main.log excerpts available on request.

View original on GitHub ↗