Claude Code limits concurrent sessions per account. To run many agents in parallel (10+), you need to distribute them across multiple Claude subscriptions using profile wrappers.
This guide applies to Claude Code provider only. Other providers (OpenCode, Codex) have different scaling mechanisms.
Authenticate each profile with its corresponding Claude account:
# MAX plan 1CLAUDE_CONFIG_DIR=~/.config/claude-profiles/max-1 claude auth login# MAX plan 2 CLAUDE_CONFIG_DIR=~/.config/claude-profiles/max-2 claude auth login# Pro plan 1CLAUDE_CONFIG_DIR=~/.config/claude-profiles/pro-1 claude auth login
Follow the prompts and sign in with each account.
4
Create wrapper scripts
Create executable wrappers that set CLAUDE_CONFIG_DIR before calling claude:
~/bin/claude-max-1
#!/bin/bashexport CLAUDE_CONFIG_DIR="$HOME/.config/claude-profiles/max-1"exec claude "$@"
~/bin/claude-max-2
#!/bin/bashexport CLAUDE_CONFIG_DIR="$HOME/.config/claude-profiles/max-2"exec claude "$@"
~/bin/claude-pro-1
#!/bin/bashexport CLAUDE_CONFIG_DIR="$HOME/.config/claude-profiles/pro-1"exec claude "$@"
Symptom: Agent fails to spawn with auth errorCause: Profile not authenticated or token expiredSolution:
# Re-authenticate the profileCLAUDE_CONFIG_DIR=~/.config/claude-profiles/max-1 claude auth login# Verify auth statusCLAUDE_CONFIG_DIR=~/.config/claude-profiles/max-1 claude auth status
Session limit exceeded
Symptom: “Too many concurrent sessions” errorCause: More agents spawned than profile capacitySolution:
Check active sessions for that profile
Reduce maxConcurrentTasks on agents using that profile
Or distribute agents across more profiles
Wrapper script not found
Symptom: “command not found: ~/bin/claude-max-1”Cause: Path not expanded or script not executableSolution:
# Use full path without ~executablePath: '/home/username/bin/claude-max-1'# Verify executable permissionls -l /home/username/bin/claude-max-1# Should show: -rwxr-xr-x
Cross-profile session leaks
Symptom: Sessions from one profile appearing in anotherCause: CLAUDE_CONFIG_DIR not set correctly in wrapperSolution: Verify each wrapper sets the env var before calling claude:
#!/bin/bashexport CLAUDE_CONFIG_DIR="$HOME/.config/claude-profiles/max-1"exec claude "$@"