Skip to content

Commit 4bdfbe7

Browse files
committed
fix(controller): resolve agent ID matching for namespaced IDs
Support both exact and namespaced agent ID matching when finding controller agent
1 parent 0d84087 commit 4bdfbe7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/workflows/controller/view.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ export async function runControllerView(
8181

8282
// Find the controller agent from available agents (needed for both paths)
8383
const allAgents = await collectAgentDefinitions(cwd);
84-
const controller = allAgents.find(a => a.id === definition.agentId);
84+
// Resolve agent ID - try exact match first, then namespaced (e.g., "bmad:bmad-po" for "bmad-po")
85+
const controller = allAgents.find(a => a.id === definition.agentId)
86+
?? allAgents.find(a => a.id.endsWith(`:${definition.agentId}`));
8587

8688
// Check if controller session already exists
8789
const existingConfig = await loadControllerConfig(cmRoot);

0 commit comments

Comments
 (0)