claude-code - 💡(How to fix) Fix Agent Teams: teammate spawn fails after brew upgrade due to hardcoded Caskroom version path [2 comments, 2 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#48889Fetched 2026-04-16 06:48:13
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Timeline (top)
labeled ×5commented ×2

When Claude Code is installed via Homebrew (brew install claude-code), Agent Teams appears to resolve and hardcode the absolute Caskroom path at spawn time:

/opt/homebrew/Caskroom/claude-code/<VERSION>/claude

After brew upgrade claude-code, the old version directory is removed, causing teammate spawn to fail because the hardcoded path no longer exists.

Root Cause

After brew upgrade claude-code, the old version directory is removed, causing teammate spawn to fail because the hardcoded path no longer exists.

Fix Action

Workaround

Restart Claude Code after brew upgrade.

Code Example

/opt/homebrew/Caskroom/claude-code/<VERSION>/claude
RAW_BUFFERClick to expand / collapse

Description

When Claude Code is installed via Homebrew (brew install claude-code), Agent Teams appears to resolve and hardcode the absolute Caskroom path at spawn time:

/opt/homebrew/Caskroom/claude-code/<VERSION>/claude

After brew upgrade claude-code, the old version directory is removed, causing teammate spawn to fail because the hardcoded path no longer exists.

Steps to Reproduce

  1. Install Claude Code via Homebrew
  2. Start a session and create an Agent Teams team (TeamCreate)
  3. Spawn a teammate (e.g., Agent with team_name)
  4. If brew upgrade claude-code has changed the version since the binary path was resolved, the teammate fails to start

Expected Behavior

Agent Teams should use the stable symlink path (/opt/homebrew/bin/claude) or re-resolve the binary path at spawn time, rather than caching or hardcoding the resolved Caskroom path.

Actual Behavior

Teammate spawn fails (the child process cannot be started because the resolved path points to a removed version directory).

Workaround

Restart Claude Code after brew upgrade.

Environment

  • macOS (Apple Silicon)
  • Claude Code installed via Homebrew Cask
  • Symlink chain: /opt/homebrew/bin/claude/opt/homebrew/Caskroom/claude-code/<VERSION>/claude

extent analysis

TL;DR

Update Agent Teams to use the stable symlink path /opt/homebrew/bin/claude instead of the hardcoded Caskroom path.

Guidance

  • Verify that the brew upgrade claude-code command is updating the symlink at /opt/homebrew/bin/claude to point to the new version of Claude Code.
  • Check the Agent Teams configuration to see if there's an option to specify the path to the Claude Code binary or to re-resolve the path at spawn time.
  • Consider modifying the Agent Teams code to use the which claude command to dynamically resolve the path to the Claude Code binary at spawn time.
  • Test the workaround of restarting Claude Code after brew upgrade to ensure it resolves the issue temporarily.

Example

# Example of using the which command to resolve the path to the Claude Code binary
claude_path=$(which claude)

Notes

The issue seems to be specific to the interaction between Agent Teams and the Homebrew installation of Claude Code. The solution may require changes to the Agent Teams code or configuration.

Recommendation

Apply the workaround of restarting Claude Code after brew upgrade until a permanent fix can be implemented, as it provides a temporary solution to the issue.

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