#15162: Include tool args in verbose preview summaries
gateway
agents
stale
size: S
Cluster:
Tool Execution and Error Handling
## Summary
- Include primary tool args (path/filename/target/etc.) in verbose preview summaries.
- Improves real‑time visibility of *where* tools are acting (e.g., `read: src/app.ts`).
- Adds a unit test to cover path inclusion.
## Changes
- Add `extractToolSummaries()` to build `tool: arg` summaries.
- Prefer `path/file_path/filePath/filename`, fallback to `target/url/query/command`.
- Update preview builder to use summaries.
- Add test: “includes tool path in preview summary when available”.
## Notes
- Does not alter tool execution—only summary formatting.
- Falls back gracefully when args are missing.
<!-- greptile_comment -->
<h2>Greptile Overview</h2>
<h3>Greptile Summary</h3>
This PR changes the session preview builder to include a primary tool argument in the verbose preview text (e.g., `call read: src/app.ts`) by adding `extractToolSummaries()` and switching the preview fallback from tool names to these summaries. It also adds a unit test intended to cover path inclusion.
The main issue is in the new test: it writes the transcript using a broken join delimiter (`lines.join("<newline>")` as a multi-line string literal) and the next test starts immediately after the previous block without proper separation, both of which are likely to fail formatting/parsing and CI checks.
<h3>Confidence Score: 3/5</h3>
- Not safe to merge as-is due to a broken unit test change.
- The preview summary logic change is localized and reasonably defensive, but the new test introduces an invalid join delimiter / formatting issues that will likely fail parsing or formatting checks in CI until corrected.
- src/gateway/session-utils.fs.test.ts
<sub>Last reviewed commit: 9788ace</sub>
<!-- greptile_other_comments_section -->
<sub>(2/5) Greptile learns from your feedback when you react with thumbs up/down!</sub>
<!-- /greptile_comment -->
Most Similar PRs
#10189: fix: resolve file_path param in tool display for read/write tools
by Yida-Dev · 2026-02-06
77.8%
#8753: fix(telegram): add config option to disable acknowledgments
by revenuestack · 2026-02-04
73.9%
#18187: fix: tool summaries silently dropped when reasoningLevel is stream
by ayanesakura · 2026-02-16
73.6%
#8312: fix: add logging and markers for tool result repair
by ekson73 · 2026-02-03
73.3%
#17966: feat(ui/usage): show files read during session in context panel
by jogelin · 2026-02-16
72.9%
#11825: fix: keep tool_use/tool_result pairs together during session compac...
by C31gordon · 2026-02-08
72.7%
#6819: fix(tui): handle unstructured tool results and errors in tool execu...
by TreyDong · 2026-02-02
72.5%
#7525: Agents: skip errored tool calls during pairing
by justinhuangcode · 2026-02-02
72.0%
#10915: fix: prevent session bloat from oversized tool results and improve ...
by DukeDeSouth · 2026-02-07
72.0%
#9511: feat: add tool error fallback toggle
by bolismauro · 2026-02-05
71.6%