Q38: the prompt names skill tools the run cannot call, not a fake allowlist

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-10-08 07:14:41 -04:00
1 parent e726c36bac
commit f7530ba65b
4 files changed
+21 -5

No files matched your search

+6 -1
View File
@@ -41,6 +41,11 @@ export interface AgentRunLoopDeps {
onToolResults?: () => void;
}
/** Every tool the model can call in a run. */
export function runTools(externalTools: ToolDefinition[]): ToolDefinition[] {
return [...AGENT_TOOLS, ...WORKSPACE_TOOLS, ...WEB_TOOLS, ...externalTools];
}
/**
* Drives a real tool-use loop against the live provider: prompt the model with
* the agent tools, execute every tool call it makes, feed results back, and
@@ -48,7 +53,7 @@ export interface AgentRunLoopDeps {
* iteration cap is hit (which throws rather than silently truncating).
*/
export async function runAgentLoop(deps: AgentRunLoopDeps, input: AgentRunLoopInput): Promise<AgentRunLoopResult> {
const allTools = [...AGENT_TOOLS, ...WORKSPACE_TOOLS, ...WEB_TOOLS, ...(input.externalTools ?? [])];
const allTools = runTools(input.externalTools ?? []);
const messages: AgentTurnMessage[] = [{ role: "user", text: input.initialUserTurn }];
let toolCallCount = 0;
let lastRequestId = "";