claude-code - 💡(How to fix) Fix [BUG] FleetView dispatched agents doesn't properly use the correct version when dispatching an agent with an up to date version while an existing previous version is running on the background [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#58560Fetched 2026-05-14 03:45:09
View on GitHub
Comments
2
Participants
3
Timeline
10
Reactions
0
Assignees
Timeline (top)
labeled ×4commented ×2renamed ×2assigned ×1

Error Message

When dispatching an agents with the new agents view with an up to date claude code in a terminal while a process using a previous version is still active, the claude code session with latest version is unable to dispatch an agent without an ENOENT error

Error Messages/Logs

Root Cause

Likely root cause on their side: the parent caches process.execPath at startup and reuses it to spawn workers. Fix is to either re-resolve /opt/homebrew/bin/claude (or the PATH-found claude) at spawn time, or detect ENOENT on spawn and retry through PATH.

Fix Action

Fix / Workaround

When dispatching an agents with the new agents view with an up to date claude code in a terminal while a process using a previous version is still active, the claude code session with latest version is unable to dispatch an agent without an ENOENT error

Claude agents view should dispatch agents without errors

  1. Install Claude Code via Homebrew cask, launch a session.
  2. While the session is running, let the cask auto-upgrade (or run brew upgrade --cask claude-code@latest).
  3. Dispatch any agent / FleetView worker — posix_spawn ENOENTs on the old versioned path even though /opt/homebrew/bin/claude already points to the new version.
  4. Quitting the UI doesn't fix it if any host process survives (e.g. --continue reattaches to the same poisoned host).

Code Example

[worker crashed (ENOENT: no such file or directory, posix_spawn '/opt/homebrew/Caskroom/claude-code@latest/2.1.139/claude') — respawning…]
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

When dispatching an agents with the new agents view with an up to date claude code in a terminal while a process using a previous version is still active, the claude code session with latest version is unable to dispatch an agent without an ENOENT error

What Should Happen?

Claude agents view should dispatch agents without errors

Error Messages/Logs

[worker crashed (ENOENT: no such file or directory, posix_spawn '/opt/homebrew/Caskroom/claude-code@latest/2.1.139/claude') — respawning…]

Steps to Reproduce

  1. Install Claude Code via Homebrew cask, launch a session.
  2. While the session is running, let the cask auto-upgrade (or run brew upgrade --cask claude-code@latest).
  3. Dispatch any agent / FleetView worker — posix_spawn ENOENTs on the old versioned path even though /opt/homebrew/bin/claude already points to the new version.
  4. Quitting the UI doesn't fix it if any host process survives (e.g. --continue reattaches to the same poisoned host).

Likely root cause on their side: the parent caches process.execPath at startup and reuses it to spawn workers. Fix is to either re-resolve /opt/homebrew/bin/claude (or the PATH-found claude) at spawn time, or detect ENOENT on spawn and retry through PATH.

Similar bug #18019 and #25364

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.139

Claude Code Version

2.1.140

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

No response

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING