fix: document ctx_execute_file workspace boundary

This commit is contained in:
云服务部-叶林立
2026-08-19 09:40:42 +08:00
parent 1b79764858
commit 3d431a353d
2 changed files with 14 additions and 0 deletions
+6
View File
@@ -36,6 +36,12 @@ export function buildToolRoutingSection(selectedTools: SelectedTools): string {
);
}
if (hasTool(selectedTools, "ctx_execute_file")) {
rules.push(
"- ctx_execute_file is confined to the current project root. Do not call it for absolute paths outside the workspace, ../ traversal, or symlinks that resolve outside the workspace; host permission approval does not bypass this Context Mode boundary. Use another explicitly authorized tool for those files.",
);
}
if (hasTool(selectedTools, "read")) {
rules.push(
"- Use read directly when exact text is needed for editing or when a file is small. Do not read a complete large file merely to copy, compare, hash, count, or summarize it.",