Skip to content

Conversation

@uinstinct
Copy link
Contributor

@uinstinct uinstinct commented Dec 11, 2025

Description

This PR introduces isolated sub agents to work on specialized tasks.

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? ]


Summary by cubic

Introduce subagents to the CLI. You can now spawn a specialized agent via the Subagent tool to handle multi‑step tasks autonomously with live streaming output.

  • New Features

    • Added Subagent tool with parameters: description, prompt, subagent_name.
    • Built-in “general” agent with its own system prompt.
    • Executor runs subagents in a child session, isolates system message, and temporarily disables chat history interference.
    • Allows all tools inside subagents for now.
    • Streams tool call output using toolCallId; UI shows live subagent output and truncates long logs.
    • Added task metadata footer with status.
    • Subagent tool listed among built-ins and always available.
  • Migration

    • Tool.run now supports an optional second parameter: context?: { toolCallId: string }.
      • If your TypeScript settings are strict, update custom tools to match the new signature:
        • Before: run(args) => Promise
        • After: run(args, context?) => Promise

Written for commit 2003128. Summary will update automatically on new commits.

@continue
Copy link
Contributor

continue bot commented Dec 11, 2025

All Green - Keep your PRs mergeable

Learn more

All Green is an AI agent that automatically:

✅ Addresses code review comments

✅ Fixes failing CI checks

✅ Resolves merge conflicts

continue bot added a commit that referenced this pull request Dec 11, 2025
Add comprehensive documentation for the new Subagent feature including:
- Architecture overview and execution flow
- Built-in agents (general agent)
- When to use subagents
- Tool interface and parameters
- Output streaming behavior
- Implementation details and migration notes
- Error handling
- Future enhancements

Also update AGENTS.md to reference the new subagents documentation.

This documentation is for PR #9128.

Generated with [Continue](https://continue.dev)

Co-Authored-By: Continue <[email protected]>
Co-authored-by: nate <[email protected]>
@continue
Copy link
Contributor

continue bot commented Dec 11, 2025

📚 Documentation PR created!

I've reviewed the changes in this PR and created PR #9129 with comprehensive documentation for the Subagent feature.

The documentation includes:

  • Architecture overview and execution flow
  • Built-in agents (general agent)
  • When to use subagents vs. direct tool calls
  • Tool interface, parameters, and examples
  • Output streaming behavior
  • Implementation details and migration notes for custom tools
  • Error handling
  • Future enhancements

The docs are added to extensions/cli/docs/subagents.md and extensions/cli/AGENTS.md is updated to reference them, following the same structure and level of detail as existing CLI documentation like artifact-uploads.md and storage-sync.md.

Please review when you have a chance!

@continue
Copy link
Contributor

continue bot commented Dec 11, 2025

📚 Documentation PR #9129 is ready for review

I've created comprehensive documentation for the Subagent feature. The PR is experiencing some transient CI failures (sqlite download 503 errors) that are unrelated to the documentation changes - all code quality checks (prettier, lint, core-checks, etc.) are passing.

The documentation covers:

  • Architecture overview and execution flow
  • Built-in agents (general agent)
  • When to use subagents vs. direct tool calls
  • Tool interface, parameters, and examples
  • Output streaming behavior
  • Implementation details and migration notes for custom tools
  • Error handling
  • Future enhancements

Feel free to review the docs while the CI infrastructure issues resolve themselves!

@continue
Copy link
Contributor

continue bot commented Dec 15, 2025

🤖 All Green agent started: View agent

continue bot and others added 5 commits December 15, 2025 03:50
Move services import to lazy evaluation inside the run function to avoid
circular dependency between ToolPermissionService -> allBuiltIns -> subagent -> services -> ToolPermissionService.

This fixes the 'ToolPermissionService is not a constructor' error in tests.

Co-authored-by: nate <[email protected]>
Move services import to lazy evaluation inside executeSubAgent function
to avoid circular dependency. Pass services as parameter to
buildAgentSystemMessage helper function.

Co-authored-by: nate <[email protected]>
Create builtInToolNames.ts with just the tool name constants to avoid
importing the actual tool implementations. This breaks the circular
dependency chain: ToolPermissionService -> allBuiltIns -> subagent ->
executor -> services -> ToolPermissionService.

Co-authored-by: nate <[email protected]>
Update BUILT_IN_TOOL_NAMES to match the actual tools in allBuiltIns.ts,
including UploadArtifact which was missing. Remove incorrect tool names
that don't exist.

Co-authored-by: nate <[email protected]>
Move BUILT_IN_TOOL_NAMES import to proper position according to eslint
import/order rules.

Co-authored-by: nate <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant