Skip to content

feat: builtin subagents#10830

Open
uinstinct wants to merge 9 commits intocontinuedev:mainfrom
uinstinct:cli-default-subagents
Open

feat: builtin subagents#10830
uinstinct wants to merge 9 commits intocontinuedev:mainfrom
uinstinct:cli-default-subagents

Conversation

@uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Feb 25, 2026

Description

Add 2 builtin subagents: navigator and code reviewer.

  • is added automatically only when anthropic provider is present with a local api key
  • also fix tool calls hung in subagent
  • fix nested subagent execution
  • put subagent tool out of beta

AI Code Review

  • Team members only: AI review runs automatically when PR is opened or marked ready for review
  • Team members can also trigger a review by commenting @continue-review

Checklist

  • [] I've read the contributing guide
  • [] The relevant docs, if any, have been updated or created
  • [] The relevant tests, if any, have been updated or created

Screen recording or screenshot

[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]

Tests

[ What tests were added or updated to ensure the changes work as expected? ]


Continue Tasks: ❌ 7 failed — View all


Summary by cubic

Adds built-in Navigator and Generalist subagents (auto-added when using Anthropic with a local API key) and enables the subagent tool by default. Fixes tool call results in subagents and prevents nested subagent execution.

  • New Features

    • Built-in subagents: navigator and generalist; included when Anthropic has a direct API key.
    • Subagent tool is always on; removes the --beta-subagent-tool flag.
    • Clearer subagent tool description and listing of available subagents.
  • Bug Fixes

    • Tool call results are captured in subagents even without ChatHistoryService; no more hangs.
    • Blocks nested subagent invocation with a clear error.

Written for commit af13df6. Summary will update on new commits.

@uinstinct uinstinct requested a review from a team as a code owner February 25, 2026 13:57
@uinstinct uinstinct requested review from sestinj and removed request for a team February 25, 2026 13:57
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Feb 25, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 8 files

Copy link
Contributor

@sestinj sestinj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now, I think we should still make sure that we have a way to disable sub-agents, even if we have them on by default, just in case we need to roll something back. e.g. CN_DISABLE_SUBAGENTS=1.

Your output should be concise and actionable, starting with a brief summary of what you found and listing the key files/paths, functions, symbols, and important relationships or flows between them in plain language. If you cannot find something, describe what you searched for, where you looked, and suggest next places or strategies to investigate.`,
};

export const CODE_REVIEWER_SUBAGENT: BuiltInSubagent = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel the code-reviewer agent might be a bit too specific. I wonder if we could instead do a task agent that can be given any general task, such as simple refactors. I find that Claude Code's Task subagent is used very frequently, but I don't often see it using sub-agents for review, so I worry that Claude just wouldn't use this subagent very often

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

implemented!

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Mar 1, 2026
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 4 files (changes from recent commits).

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="extensions/cli/src/tools/subagent.test.ts">

<violation number="1" location="extensions/cli/src/tools/subagent.test.ts:6">
P2: Mock path no longer matches the imported module path, so getAgentNames/getSubagent won’t be mocked and vi.mocked(...).mockReturnValue may fail or run real logic.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

import { serviceContainer } from "../services/ServiceContainer.js";
import { executeSubAgent } from "../subagent/executor.js";
import { getAgentNames, getSubagent } from "../subagent/get-agents.js";
import { getAgentNames, getSubagent } from "../subagent/getAgents.js";
Copy link
Contributor

@cubic-dev-ai cubic-dev-ai bot Mar 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: Mock path no longer matches the imported module path, so getAgentNames/getSubagent won’t be mocked and vi.mocked(...).mockReturnValue may fail or run real logic.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At extensions/cli/src/tools/subagent.test.ts, line 6:

<comment>Mock path no longer matches the imported module path, so getAgentNames/getSubagent won’t be mocked and vi.mocked(...).mockReturnValue may fail or run real logic.</comment>

<file context>
@@ -3,7 +3,7 @@ import { beforeEach, describe, expect, it, vi } from "vitest";
 import { serviceContainer } from "../services/ServiceContainer.js";
 import { executeSubAgent } from "../subagent/executor.js";
-import { getAgentNames, getSubagent } from "../subagent/get-agents.js";
+import { getAgentNames, getSubagent } from "../subagent/getAgents.js";
 
 import { subagentTool } from "./subagent.js";
</file context>
Fix with Cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

2 participants