()
| 3 | import { isEnvDefinedFalsy, isEnvTruthy } from './envUtils.js' |
| 4 | |
| 5 | export function getPlanModeV2AgentCount(): number { |
| 6 | // Environment variable override takes precedence |
| 7 | if (process.env.CLAUDE_CODE_PLAN_V2_AGENT_COUNT) { |
| 8 | const count = parseInt(process.env.CLAUDE_CODE_PLAN_V2_AGENT_COUNT, 10) |
| 9 | if (!isNaN(count) && count > 0 && count <= 10) { |
| 10 | return count |
| 11 | } |
| 12 | } |
| 13 | |
| 14 | const subscriptionType = getSubscriptionType() |
| 15 | const rateLimitTier = getRateLimitTier() |
| 16 | |
| 17 | if ( |
| 18 | subscriptionType === 'max' && |
| 19 | rateLimitTier === 'default_claude_max_20x' |
| 20 | ) { |
| 21 | return 3 |
| 22 | } |
| 23 | |
| 24 | if (subscriptionType === 'enterprise' || subscriptionType === 'team') { |
| 25 | return 3 |
| 26 | } |
| 27 | |
| 28 | return 1 |
| 29 | } |
| 30 | |
| 31 | export function getPlanModeV2ExploreAgentCount(): number { |
| 32 | if (process.env.CLAUDE_CODE_PLAN_V2_EXPLORE_AGENT_COUNT) { |
no test coverage detected