[BUG] Team feature hardcodes claude as subprocess binary, breaks custom aliases/profiles

Resolved 💬 4 comments Opened Feb 11, 2026 by brannow Closed Mar 14, 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?

When using the agent teams feature in tmux split-pane mode, Claude Code hardcodes claude as the binary name when spawning teammate subprocesses. If the user invokes Claude Code via a different alias (e.g. claude-work), the spawned teammates fail to communicate with the lead — they start but sit idle and never receive instructions.

Environment

  • macOS (Apple Silicon)
  • Claude Code (latest, 2.1.39 (Claude Code))
  • tmux split-pane mode
  • Multiple Claude Code profiles via aliases

Setup

Using separate Claude Code profiles for work and private use:

alias claude-work="CLAUDE_CONFIG_DIR=~/.claude-work claude"
alias claude-private="CLAUDE_CONFIG_DIR=~/.claude-private claude"

Invoked via claude-work inside a tmux session.

Actual Behavior

  • Teammates are spawned using the hardcoded claude command
  • Because claude resolves to a different config dir than the lead's claude-work, the teammates cannot communicate with the lead
  • Teammates sit idle at the welcome screen and never receive their task instructions
  • The lead reports it cannot reach the teammates

Additional Note

Even when explicitly instructing the lead agent to use the custom alias (e.g. "use claude-work when spawning teammates"), the spawned subprocesses still use the hardcoded claude binary. This suggests the binary name is not configurable at the prompt level and is hardcoded in the team spawning logic.

What Should Happen?

Teammates spawn using the same binary/alias and config that the lead was invoked with. Teammates receive instructions and begin working.

Error Messages/Logs

Steps to Reproduce

  1. Set up a custom alias pointing to a different config dir (e.g. alias claude-work="CLAUDE_CONFIG_DIR=~/.claude-work claude")
  2. Start a tmux session
  3. Launch Claude Code via the alias: claude-work
  4. Spawn a team with teammates
  5. Observe tmux panes

Claude Model

Not sure / Multiple models

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

2.1.39

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗