MCPcopy Index your code
hub / github.com/claude-code-best/claude-code / getPlanModeV2AgentCount

Function getPlanModeV2AgentCount

src/utils/planModeV2.ts:5–29  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { isEnvDefinedFalsy, isEnvTruthy } from './envUtils.js'
4
5export 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
31export function getPlanModeV2ExploreAgentCount(): number {
32 if (process.env.CLAUDE_CODE_PLAN_V2_EXPLORE_AGENT_COUNT) {

Callers 1

Calls 2

getSubscriptionTypeFunction · 0.85
getRateLimitTierFunction · 0.85

Tested by

no test coverage detected