Conversation
when chathistoryservice is disabled in subagent, manually update the last tool state with output and status
explorer and code reviewer
fe31959 to
131d4d7
Compare
142bc50 to
c65c213
Compare
There was a problem hiding this comment.
4 issues found across 20 files
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/services/SubAgentService.ts">
<violation number="1" location="extensions/cli/src/services/SubAgentService.ts:127">
P2: Parallel subagent executions race on the global chatHistorySvc.isReady override, so completion order can restore a stale override and leave chat history disabled or re-enable it while another subagent still runs.</violation>
</file>
<file name="extensions/cli/src/tools/subagent.test.ts">
<violation number="1" location="extensions/cli/src/tools/subagent.test.ts:5">
P2: The updated import now points to `getAgents.js`, but the test still mocks `get-agents.js`, so Vitest won’t apply the mock and the test will call real implementations. Update the mock path to match the import specifier.</violation>
</file>
<file name="extensions/cli/src/ui/components/SubAgentOutput.tsx">
<violation number="1" location="extensions/cli/src/ui/components/SubAgentOutput.tsx:57">
P2: `contentLines` grows without bound even though only the last 15 lines are rendered, which can lead to unnecessary memory usage and O(n) updates for long-running or chatty subagents.</violation>
</file>
<file name="extensions/cli/src/ui/ToolResultSummary.tsx">
<violation number="1" location="extensions/cli/src/ui/ToolResultSummary.tsx:119">
P2: Removed Subagent-specific summary handling while Subagent outputs still include `<task_metadata>` tags. The generic summary now surfaces raw metadata (or only line/char counts) and loses the prior “Subagent executing…” state for metadata-only updates, regressing the user-facing CLI summary.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
| : undefined; | ||
|
|
||
| if (chatHistorySvc && originalIsReady) { | ||
| chatHistorySvc.isReady = () => false; |
There was a problem hiding this comment.
P2: Parallel subagent executions race on the global chatHistorySvc.isReady override, so completion order can restore a stale override and leave chat history disabled or re-enable it while another subagent still runs.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At extensions/cli/src/services/SubAgentService.ts, line 127:
<comment>Parallel subagent executions race on the global chatHistorySvc.isReady override, so completion order can restore a stale override and leave chat history disabled or re-enable it while another subagent still runs.</comment>
<file context>
@@ -0,0 +1,277 @@
+ : undefined;
+
+ if (chatHistorySvc && originalIsReady) {
+ chatHistorySvc.isReady = () => false;
+ }
+
</file context>
| import { executeSubAgent } from "../subagent/executor.js"; | ||
| import { getAgentNames, getSubagent } from "../subagent/get-agents.js"; | ||
| import { subAgentService } from "../services/SubAgentService.js"; | ||
| import { getAgentNames, getSubagent } from "../subagent/getAgents.js"; |
There was a problem hiding this comment.
P2: The updated import now points to getAgents.js, but the test still mocks get-agents.js, so Vitest won’t apply the mock and the test will call real implementations. Update the mock path to match the import specifier.
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 5:
<comment>The updated import now points to `getAgents.js`, but the test still mocks `get-agents.js`, so Vitest won’t apply the mock and the test will call real implementations. Update the mock path to match the import specifier.</comment>
<file context>
@@ -1,14 +1,17 @@
-import { executeSubAgent } from "../subagent/executor.js";
-import { getAgentNames, getSubagent } from "../subagent/get-agents.js";
+import { subAgentService } from "../services/SubAgentService.js";
+import { getAgentNames, getSubagent } from "../subagent/getAgents.js";
import { subagentTool } from "./subagent.js";
</file context>
| ...prev, | ||
| [data.executionId]: { | ||
| ...agent, | ||
| contentLines: updatedLines, |
There was a problem hiding this comment.
P2: contentLines grows without bound even though only the last 15 lines are rendered, which can lead to unnecessary memory usage and O(n) updates for long-running or chatty subagents.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At extensions/cli/src/ui/components/SubAgentOutput.tsx, line 57:
<comment>`contentLines` grows without bound even though only the last 15 lines are rendered, which can lead to unnecessary memory usage and O(n) updates for long-running or chatty subagents.</comment>
<file context>
@@ -0,0 +1,132 @@
+ ...prev,
+ [data.executionId]: {
+ ...agent,
+ contentLines: updatedLines,
+ },
+ };
</file context>
| } | ||
|
|
||
| // Handle all other cases with text summary | ||
| const getSummary = () => { |
There was a problem hiding this comment.
P2: Removed Subagent-specific summary handling while Subagent outputs still include <task_metadata> tags. The generic summary now surfaces raw metadata (or only line/char counts) and loses the prior “Subagent executing…” state for metadata-only updates, regressing the user-facing CLI summary.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At extensions/cli/src/ui/ToolResultSummary.tsx, line 119:
<comment>Removed Subagent-specific summary handling while Subagent outputs still include `<task_metadata>` tags. The generic summary now surfaces raw metadata (or only line/char counts) and loses the prior “Subagent executing…” state for metadata-only updates, regressing the user-facing CLI summary.</comment>
<file context>
@@ -115,57 +115,6 @@ const ToolResultSummary: React.FC<ToolResultSummaryProps> = ({
- }
-
// Handle all other cases with text summary
const getSummary = () => {
// Check if this is a user cancellation first
</file context>
Description
add parallel subagents
requires #10830 to merged first
AI Code Review
@continue-reviewChecklist
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
Enables parallel subagent execution in the CLI with isolated per-run context and live streaming output. Adds a parallel task runner and built-in Navigator and Generalist subagents, and shows each subagent’s output live (including parallel runs).
New Features
Refactors
Written for commit 698e237. Summary will update on new commits.