From a1b336d73e13b53949ff629800081185d3e4694e Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Sat, 4 Jul 2026 01:52:17 +0200 Subject: [PATCH] fix(coding-agent): allow extra edit replacement fields --- packages/coding-agent/CHANGELOG.md | 1 + packages/coding-agent/src/core/tools/edit.ts | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/coding-agent/CHANGELOG.md b/packages/coding-agent/CHANGELOG.md index 681bfc3ab..782211972 100644 --- a/packages/coding-agent/CHANGELOG.md +++ b/packages/coding-agent/CHANGELOG.md @@ -16,6 +16,7 @@ - Fixed split-turn compaction to serialize summary requests so single-concurrency local providers do not fail with 429 errors ([#5536](https://github.com/earendil-works/pi/issues/5536)). - Fixed custom session entries appended during assistant streaming to render before the live assistant message, matching persisted session order. - Fixed oversized bash tool timeouts to fail with a clear validation error instead of being clamped to an immediate timeout ([#6181](https://github.com/earendil-works/pi/issues/6181)). +- Fixed the edit tool schema to allow model-invented extra replacement fields instead of rejecting otherwise valid edits ([#6278](https://github.com/earendil-works/pi/issues/6278)). ### Removed diff --git a/packages/coding-agent/src/core/tools/edit.ts b/packages/coding-agent/src/core/tools/edit.ts index 25aa1e17b..feaa7176f 100644 --- a/packages/coding-agent/src/core/tools/edit.ts +++ b/packages/coding-agent/src/core/tools/edit.ts @@ -38,7 +38,7 @@ const replaceEditSchema = Type.Object( }), newText: Type.String({ description: "Replacement text for this targeted edit." }), }, - { additionalProperties: false }, + {}, ); const editSchema = Type.Object( @@ -49,7 +49,7 @@ const editSchema = Type.Object( "One or more targeted replacements. Each edit is matched against the original file, not incrementally. Do not include overlapping or nested edits. If two changes touch the same block or nearby lines, merge them into one edit instead.", }), }, - { additionalProperties: false }, + {}, ); export type EditToolInput = Static;