feat(core): Disable topic updates for subagents (#25567)

This commit is contained in:
Christian Gunderman
2026-04-17 17:35:17 +00:00
committed by GitHub
parent 8379099e85
commit f7b2632939
5 changed files with 68 additions and 7 deletions
+2 -1
View File
@@ -55,8 +55,9 @@ export const GeneralistAgent = (
return {
systemPrompt: getCoreSystemPrompt(
context.config,
/*useMemory=*/ undefined,
/*userMemory=*/ undefined,
/*interactiveOverride=*/ false,
/*topicUpdateNarrationOverride=*/ false,
),
query: '${request}',
};
@@ -82,6 +82,7 @@ import { CompleteTaskTool } from '../tools/complete-task.js';
import {
COMPLETE_TASK_TOOL_NAME,
ACTIVATE_SKILL_TOOL_NAME,
UPDATE_TOPIC_TOOL_NAME,
} from '../tools/definitions/base-declarations.js';
/** A callback function to report on agent activity. */
@@ -189,6 +190,10 @@ export class LocalAgentExecutor<TOutput extends z.ZodTypeAny> {
return;
}
if (tool.name === UPDATE_TOPIC_TOOL_NAME) {
return;
}
// Clone the tool, so it gets its own state and subagent messageBus
const clonedTool = tool.clone(subagentMessageBus);
agentToolRegistry.registerTool(clonedTool);