fix(core): clarify code mode tool boundary (#38785)

This commit is contained in:
Aiden Cline 2026-07-24 20:49:55 -05:00 committed by GitHub
commit 1291dc1f11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 12 deletions

View file

@ -6,9 +6,7 @@ import { Instructions } from "../instructions/index"
import { CodeModeCatalog } from "./catalog"
// prettier-ignore
const prompt = (hasMoreTools: boolean) => `The Code Mode tool catalog below is ${hasMoreTools ? "partial" : "complete"}.
Inside Code Mode, \`tools\` contains only the tools shown below${hasMoreTools ? " or returned by `search`" : ""}; surrounding top-level agent tools are not available and must not be called from the code.${hasMoreTools ? `
const prompt = (hasMoreTools: boolean) => `The Code Mode tool catalog below is ${hasMoreTools ? "partial" : "complete"}.${hasMoreTools ? `
## Search