From 306f9cc6609754cc3270ad475f60b134a99dadbe Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Sun, 7 Dec 2025 01:24:41 +0100 Subject: [PATCH] Add changelog entry for tool output truncation (#134) --- packages/coding-agent/CHANGELOG.md | 10 ++++++++++ packages/coding-agent/src/tools/truncate.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 641a7d59..57054112 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -2,6 +2,16 @@ ## [Unreleased] +### Changed + +- **Tool output truncation**: All tools now enforce consistent truncation limits with actionable notices for the LLM. ([#134](https://github.com/badlogic/pi-mono/issues/134)) + - **Limits**: 2000 lines OR 50KB (whichever hits first), never partial lines + - **read**: Shows `[Showing lines X-Y of Z. Use offset=N to continue]`. If first line exceeds 50KB, suggests bash command + - **bash**: Tail truncation with temp file. Shows `[Showing lines X-Y of Z. Full output: /tmp/...]` + - **grep**: Pre-truncates match lines to 500 chars. Shows match limit and line truncation notices + - **find/ls**: Shows result/entry limit notices + - TUI displays truncation warnings in yellow at bottom of tool output (visible even when collapsed) + ## [0.13.1] - 2025-12-06 ### Added diff --git a/packages/coding-agent/src/tools/truncate.ts b/packages/coding-agent/src/tools/truncate.ts index 94fba575..cf297555 100644 --- a/packages/coding-agent/src/tools/truncate.ts +++ b/packages/coding-agent/src/tools/truncate.ts @@ -9,7 +9,7 @@ */ export const DEFAULT_MAX_LINES = 2000; -export const DEFAULT_MAX_BYTES = 30 * 1024; // 30KB +export const DEFAULT_MAX_BYTES = 50 * 1024; // 50KB export const GREP_MAX_LINE_LENGTH = 500; // Max chars per grep match line export interface TruncationResult {