feat: Implement advanced agent workflow enhancements #5006
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This commit introduces three major architectural enhancements to Roocode:
Asynchronous Operations & Advanced Workflow Control:
dispatch_taskfor non-blocking sub-task creation.get_task_statusto check on active dispatched tasks.consolidate_resultsto await and gather results from multiple tasks.cancel_taskto terminate dispatched tasks.release_tasksfor cleaning up terminated task records from memory.Task.tsto manage status, final results, and a global active task list to support these operations.Centralized Task Lifecycle Management:
taskCompletionMediatorModeEnabled,taskCompletionMediatorAgentMode) to enable a mediator agent.attemptCompletionToolto intercept task completions, set the original parent to await mediation, and launch a mediator task (as a child of the original parent or new root) in the configured mode.resume_parent_tasktool for the mediator to call, which allows the original parent task to resume with the (potentially modified) result.Task.tsandClineProvider.tsto handle the mediation state and result passing.Conversational Task Framework ("Debate Mode"):
start_conversationtool to manage a structured debate between two dynamically defined AI agents.Task.tsandClineProvider.ts), turn-by-turn message passing, and a referee LLM check for a termination condition.All new tools have been integrated into the system prompt schema and message handling logic. Placeholder i18n keys for new error messages have been added to
tools.json.Note:
pnpm testfailed due to a pre-commit hook linting issue (ESM/CJS related) that seems to be an environment/tooling setup problem rather than a direct consequence of these code changes. The core feature implementation is complete.Related GitHub Issue
Closes: #
Description
Test Procedure
Pre-Submission Checklist
Screenshots / Videos
Documentation Updates
Additional Notes
Get in Touch
Important
Enhances task management with asynchronous operations, centralized lifecycle management, and a new conversational framework for AI agent interactions.
dispatch_task,get_task_status,consolidate_results,cancel_task,release_taskstools inpresentAssistantMessage.ts.Task.tsto manage task status, results, and active task list.ClineProvider.ts.attemptCompletionTool.tsto handle task mediation.resume_parent_tasktool for mediation.start_conversationtool for AI agent debates.tools.jsonfor i18n keys.package.json.This description was created by
for cdd5113. You can customize this summary. It will automatically update as commits are pushed.