From 5dc187f00cb947b6ee5c30898fc67fb9c10aa5c4 Mon Sep 17 00:00:00 2001 From: hsrvc <129702169+hsrvc@users.noreply.github.com> Date: Mon, 12 Jan 2026 14:53:44 +0800 Subject: [PATCH] fix: accept Claude/Gemini tool param aliases --- CHANGELOG.md | 1 + src/agents/pi-tools.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 41b1f6061..b7cf1e687 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ - Anthropic: merge consecutive user turns (preserve newest metadata) before validation to avoid “Incorrect role information” errors. (#804 — thanks @ThomsenDrake) - Discord/Slack: centralize reply-thread planning so auto-thread replies stay in the created thread without parent reply refs. - Update: run `clawdbot doctor --non-interactive` during updates to avoid TTY hangs. (#781 — thanks @ronyrus) +- Tools: allow Claude/Gemini tool param aliases (`file_path`, `old_string`, `new_string`) while enforcing required params at runtime. (#793 — thanks @hsrvc) ## 2026.1.12-3 diff --git a/src/agents/pi-tools.ts b/src/agents/pi-tools.ts index df08e0a7a..0da7f858e 100644 --- a/src/agents/pi-tools.ts +++ b/src/agents/pi-tools.ts @@ -545,6 +545,7 @@ function createSandboxedEditTool(root: string) { root, ); } + // Normalize tool parameters from Claude Code conventions to pi-coding-agent conventions. // Claude Code uses file_path/old_string/new_string while pi-coding-agent uses path/oldText/newText. // This prevents models trained on Claude Code from getting stuck in tool-call loops.