()
| 20 | } |
| 21 | |
| 22 | export function getPlanModeV2AgentCount(): number { |
| 23 | // Environment variable override takes precedence |
| 24 | if (process.env.CLAUDE_CODE_PLAN_V2_AGENT_COUNT) { |
| 25 | const count = parseInt(process.env.CLAUDE_CODE_PLAN_V2_AGENT_COUNT, 10) |
| 26 | if (!isNaN(count) && count > 0 && count <= 10) { |
| 27 | return count |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | const { subscriptionType, rateLimitTier } = |
| 32 | getCurrentPlanModeSubscriptionState() |
| 33 | |
| 34 | if ( |
| 35 | subscriptionType === 'max' && |
| 36 | rateLimitTier === 'default_claude_max_20x' |
| 37 | ) { |
| 38 | return 3 |
| 39 | } |
| 40 | |
| 41 | if (subscriptionType === 'enterprise' || subscriptionType === 'team') { |
| 42 | return 3 |
| 43 | } |
| 44 | |
| 45 | return 1 |
| 46 | } |
| 47 | |
| 48 | export function getPlanModeV2ExploreAgentCount(): number { |
| 49 | if (process.env.CLAUDE_CODE_PLAN_V2_EXPLORE_AGENT_COUNT) { |
no test coverage detected