feat: Update Claude instructions to discourage direct codegraph tool usage in main session

Changes guidance to recommend spawning Explore agents for exploration questions instead of using codegraph_explore/codegraph_context directly in main session to avoid filling up context with large amounts of source code. Adds completeness signal to codegraph_explore output so agents know not to re-read files that already have source code included.
This commit is contained in:
Colby McHenry committed 2026-04-03 17:03:03 -05:00
1 parent b927492bc0
commit 4d65d60ded
2 files changed
+21 -12

No files matched your search

+5
View File
@@ -849,6 +849,11 @@ export class ToolHandler {
}
}
// Add completeness signal so agents know they don't need to re-read these files
lines.push('');
lines.push('---');
lines.push(`> **Complete source code is included above for ${filesIncluded} files.** You do NOT need to re-read these files — the relevant sections are already shown in full. Only use Read/Grep for files listed under "Additional relevant files" if you need more detail.`);
return this.textResult(lines.join('\n'));
}