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