Skip to content

Commit f08d66d

Browse files
author
Test User
committed
fix(crossfile): add built-in subagent whitelist to prevent false positives
Added builtInSubagentTypes map to exclude Claude Code runtime subagents (general-purpose, Explore, Plan, etc.) from "missing agent" validation. These agents exist in the runtime, not as user files.
1 parent 5b0a9a2 commit f08d66d

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

internal/cli/crossfile.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ import (
99
"github.com/dotcommander/cclint/internal/discovery"
1010
)
1111

12+
// builtInSubagentTypes are Task() targets that exist in Claude Code's runtime,
13+
// not as user-defined agent files. These should not trigger "missing agent" errors.
14+
var builtInSubagentTypes = map[string]bool{
15+
"general-purpose": true,
16+
"statusline-setup": true,
17+
"Explore": true,
18+
"Plan": true,
19+
"claude-code-guide": true,
20+
}
21+
1222
// CrossFileValidator validates references between components
1323
type CrossFileValidator struct {
1424
agents map[string]discovery.File
@@ -72,6 +82,11 @@ func (v *CrossFileValidator) ValidateCommand(filePath string, contents string, f
7282
continue
7383
}
7484

85+
// Skip built-in subagent types (they exist in runtime, not as files)
86+
if builtInSubagentTypes[agentRef] {
87+
continue
88+
}
89+
7590
// Check if agent exists - OUR OBSERVATION (consistency check)
7691
if _, exists := v.agents[agentRef]; !exists {
7792
seenAgentErrors[agentRef] = true

0 commit comments

Comments
 (0)