Skip to content

Commit 6a9a14d

Browse files
committed
Replace inSubAgent flag with subAgentInvocationId for tool calling loop checks
1 parent 9eb218e commit 6a9a14d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/extension/prompt/node/searchSubagentToolCallingLoop.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export class SearchSubagentToolCallingLoop extends ToolCallingLoop<ISearchSubage
5454
context.tools = {
5555
...context.tools,
5656
toolReferences: [],
57-
inSubAgent: true
57+
subAgentInvocationId: randomUUID()
5858
};
5959
}
6060
context.query = this.options.promptText;

src/extension/tools/node/codebaseTool.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export class CodebaseTool implements vscode.LanguageModelTool<ICodebaseToolParam
152152
const isAnonymous = !this.authenticationService.anyGitHubSession;
153153

154154
// Don't trigger nested tool calling loop if we're already in a subagent
155-
if (this._input?.tools?.inSubAgent) {
155+
if (this._input?.tools?.subAgentInvocationId) {
156156
return false;
157157
}
158158

0 commit comments

Comments
 (0)