From e3222e3e21562af045df650dfb460eb7ebb178c5 Mon Sep 17 00:00:00 2001 From: Komal Vardhan Lolugu <67476199+KomalSrinivasan@users.noreply.github.com> Date: Sat, 27 Jun 2026 04:09:59 +0530 Subject: [PATCH] plan agent: grant editFiles + githubRepo, forbid invented file reads (#2003) The Plan Mode agent advertises information gathering as its primary mode but its tools array does not include any file-read capability, and the body says 'Use githubRepo' without granting that tool. @basilevs reported the agent flailing on a workspace file read by inventing a SQLite readfile() function call and then a fake inbox_entries query, both of which fail, and asking the user to paste the file contents instead. Fix in three small parts: 1. Add 'edit/editFiles' to the tools array. The Copilot edit/editFiles tool surface includes reading workspace files, so this restores normal file access. 2. Add 'githubRepo' to the tools array so the body's existing reference to it stops being dead text. 3. Add a 'File Reading' bullet under capabilities. It points the agent at editFiles for the read and explicitly forbids inventing alternative mechanisms like SQL readfile() or querying tables that aren't real. Closes #2003. --- agents/plan.agent.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agents/plan.agent.md b/agents/plan.agent.md index 69b63f083..5dc2c3785 100644 --- a/agents/plan.agent.md +++ b/agents/plan.agent.md @@ -9,6 +9,8 @@ tools: - search/searchResults - search/usages - vscode/vscodeAPI + - edit/editFiles + - githubRepo --- # Plan Mode - Strategic Planning & Architecture Assistant @@ -28,6 +30,7 @@ You are a strategic planning and architecture assistant focused on thoughtful an ### Information Gathering Tools - **Codebase Exploration**: Use the `codebase` tool to examine existing code structure, patterns, and architecture +- **File Reading**: Use the `editFiles` tool to read individual workspace files (planning notes, specs, sample inputs). Reading is part of the file editing tool surface; you do not need to actually edit a file to read it. Never fabricate alternative read mechanisms (for example, do not invent SQL functions like `readfile()` or query session tables that aren't real). - **Search & Discovery**: Use `search` and `searchResults` tools to find specific patterns, functions, or implementations across the project - **Usage Analysis**: Use the `usages` tool to understand how components and functions are used throughout the codebase - **Problem Detection**: Use the `problems` tool to identify existing issues and potential constraints