Commit Graph

1745 Commits

Author SHA1 Message Date
Adam Weidman
d5c0212b01 # PR Description: Refactor read_file Tool to Discourage Pagination
## Changes
- Removed `offset` and `limit` parameters from the `read_file` tool and the underlying `processSingleFileContent` utility.
- Updated `read_file` to always return the first 2000 lines of a text file if it exceeds that length.
- Added explicit guidance in the tool's truncation message and description, distinguishing between `grep_search` for pattern finding and `run_shell_command` (specifically `sed`) for extracting specific line ranges.
- Simplified `ProcessedFileReadResult` by removing `linesShown`.
- Updated all internal callers (including `ReadManyFilesTool`, `planCommand`, and `ExitPlanModeDialog`) to match the new signature of `processSingleFileContent`.
- Updated unit tests in `read-file.test.ts` and `fileUtils.test.ts` to verify the new 2000-line default truncation and remove pagination-related test cases.

## Motivation & Feedback
These changes were made to address feedback regarding how the model interacts with large files:
- **Discouraging Inefficient Pagination:** Feedback noted that providing `offset` and `limit` encouraged models to "paginate" through files chunk-by-chunk, which is often an inefficient "looping" behavior.
- **Encouraging Targeted Search:** By removing pagination parameters, we push the model toward more powerful and standard search behaviors. As the feedback stated: *"In my experience it's better to encourage the model to use grep or more complex bash commands to find what it needs."*
- **Compatibility with Search Results:** Models frequently use `grep -n` to find points of interest. Standard Unix tools like `sed` and `grep` are more compatible with 1-based line numbers and sophisticated searching than a manual 0-based `offset`/`limit` implementation.
- **Clarity on Truncation:** Addressed the feedback *"Could be useful to specify how will it be truncated"* by explicitly stating the 2000-line limit in the tool's output and description.
2026-02-09 13:56:02 -05:00
N. Taylor Mullen
fe70052baf fix(evals): update save_memory evals and simplify tool description (#18610) 2026-02-09 01:06:03 -08:00
Andrew Garrett
8cbe851339 Fix newline insertion bug in replace tool (#18595) 2026-02-09 06:37:53 +00:00
N. Taylor Mullen
d45a45d565 chore: strengthen validation guidance in system prompt (#18544) 2026-02-09 05:32:46 +00:00
N. Taylor Mullen
cb73fbf384 feat(core): transition sub-agents to XML format and improve definitions (#18555) 2026-02-09 02:25:04 +00:00
Jerop Kipruto
375c104b32 fix(core): ensure enter_plan_mode tool registration respects experimental.plan (#18587) 2026-02-09 01:57:01 +00:00
N. Taylor Mullen
97a4e62dfa feat(core): conditionally include ctrl+f prompt based on interactive shell setting (#18561) 2026-02-09 00:23:22 +00:00
Tommaso Sciortino
29a6aecffc propagate abortSignal (#18477) 2026-02-08 21:56:26 +00:00
N. Taylor Mullen
92012365ca fix(core): correct escaped interpolation in system prompt (#18557) 2026-02-08 21:08:17 +00:00
Abhi
11951592aa feat(core): pause agent timeout budget while waiting for tool confirmation (#18415) 2026-02-08 04:03:47 +00:00
Abhi
bc8ffa6631 feat(context): add remote configuration for tool output masking thresholds (#18553) 2026-02-08 03:04:46 +00:00
N. Taylor Mullen
86bd7dbd4f chore: remove feedback instruction from system prompt (#18560) 2026-02-08 02:22:50 +00:00
N. Taylor Mullen
eee95c509d refactor(core): remove memory tool instructions from Gemini 3 prompt (#18559) 2026-02-08 01:57:53 +00:00
Abhi
a1f2aacd1e feat(core): exempt high-signal tools from output masking (#18545) 2026-02-07 23:56:45 +00:00
Jerop Kipruto
be6723ebcc chore: remove redundant planning prompt from final shell (#18528) 2026-02-07 19:45:09 +00:00
N. Taylor Mullen
9178b31629 feat(core): overhaul system prompt for rigor, integrity, and intent alignment (#17263) 2026-02-07 03:13:07 +00:00
Sandy Tao
19dc40825e fix(core): expand excludeTools with legacy aliases for renamed tools (#18498) 2026-02-07 00:49:25 +00:00
Jerop Kipruto
e3796d137a fix(core): prevent subagent bypass in plan mode (#18484) 2026-02-06 22:55:00 +00:00
Sandy Tao
28805a4b2d refactor: simplify tool output truncation to single config (#18446) 2026-02-06 21:41:19 +00:00
Abhi
63f7e30790 feat(core): implement persistence and resumption for masked tool outputs (#18451) 2026-02-06 21:22:22 +00:00
joshualitt
7a8d6f6095 bug(core): Fix bug when saving plans. (#18465) 2026-02-06 20:45:37 +00:00
Shreya Keshive
f062f56b43 feat(admin): apply MCP allowlist to extensions & gemini mcp list command (#18442) 2026-02-06 18:07:00 +00:00
Sehoon Shon
61d92c4a21 Remove previewFeatures and default to Gemini 3 (#18414) 2026-02-06 18:02:57 +00:00
christine betts
099fea2434 Add extension registry client (#18396) 2026-02-06 17:14:14 +00:00
joshualitt
6fb3b09003 Shorten temp directory (#17901) 2026-02-06 16:10:17 +00:00
Abhi
30354892b3 feat(core,cli): implement session-linked tool output storage and cleanup (#18416) 2026-02-06 06:36:42 +00:00
Abhi
8ec176e005 feat(context): implement observation masking for tool outputs (#18389) 2026-02-06 01:53:11 +00:00
Adib234
4ffc349c18 feat(plan): create a metric for execution of plans generated in plan mode (#18236) 2026-02-05 23:46:34 +00:00
Adib234
fe975da91e feat(plan): implement support for MCP servers in Plan mode (#18229) 2026-02-05 21:37:28 +00:00
Philippe
2498114df6 fix: resolve infinite loop when using 'Modify with external editor' (#17453)
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
Co-authored-by: ehedlund <ehedlund@google.com>
2026-02-05 20:52:41 +00:00
Tommaso Sciortino
9ca7300c90 Fix permission check (#18395) 2026-02-05 20:19:17 +00:00
Jerop Kipruto
dc09b4988d feat(plan): integrate planning artifacts and tools into primary workflows (#18375) 2026-02-05 20:07:33 +00:00
Adib234
bce57ca1af feat(plan): fix invalid tool calls in plan mode (#18352) 2026-02-05 20:04:03 +00:00
Jerop Kipruto
6860556afe feat(plan): add guidance on iterating on approved plans vs creating new plans (#18346) 2026-02-05 19:11:45 +00:00
Alisa
5b9ea35b63 Improving memory tool instructions and eval testing (#18091) 2026-02-05 18:07:47 +00:00
Jerop Kipruto
4a6e3eb646 feat(plan): support replace tool in plan mode to edit plans (#18379) 2026-02-05 17:51:35 +00:00
Tommaso Sciortino
e4c80e6382 fix: Windows Specific Agent Quality & System Prompt (#18351) 2026-02-05 17:50:12 +00:00
Peter Friese
1cae5ab158 fix(core): handle non-compliant mcpbridge responses from Xcode 26.3 (#18376) 2026-02-05 17:03:32 +00:00
Philippe
e3b8490edf fix(core): add retry logic for transient SSL/TLS errors (#17318) (#18310) 2026-02-05 15:47:35 +00:00
Grant McCloskey
a3af4a8cae feat(skills): implement linking for agent skills (#18295) 2026-02-04 22:11:01 +00:00
Chris Coutinho
821355c429 fix(mcp): ensure MCP transport is closed to prevent memory leaks (#18054)
Co-authored-by: Jack Wotherspoon <jackwoth@google.com>
2026-02-04 21:00:41 +00:00
Abhi
3afc8f25e1 fix(hooks): remove unnecessary logging for hook registration (#18332) 2026-02-04 19:48:33 +00:00
Jerop Kipruto
650980af37 feat(core): add enter_plan_mode tool (#18324) 2026-02-04 18:57:41 +00:00
Jack Wotherspoon
b987e1780d feat: increase ask_user label limit to 16 characters (#18320) 2026-02-04 17:50:01 +00:00
Adib234
0012d95848 feat(plan): implement plan slash command (#17698) 2026-02-04 17:01:43 +00:00
Abhi
fedc0c5d60 feat(core): remove hardcoded policy bypass for local subagents (#18153) 2026-02-04 15:20:36 +00:00
gemini-cli-robot
99e523a15f chore(release): bump version to 0.29.0-nightly.20260203.71f46f116 (#18243) 2026-02-04 14:43:29 +00:00
Christian Gunderman
a0b6602d09 Fix issue where agent gets stuck at interactive commands. (#18272) 2026-02-04 07:02:09 +00:00
Abhi
b39cefe14e feat(core): add default execution limits for subagents (#18274) 2026-02-04 06:28:00 +00:00
Sehoon Shon
94f4e5cc15 feat(core): enable getUserTierName in config (#18265) 2026-02-04 03:28:58 +00:00