From ae80adbefbdf036cfe2bd9f45d870afea7f1eae6 Mon Sep 17 00:00:00 2001 From: "clawsweeper[bot]" <274271284+clawsweeper[bot]@users.noreply.github.com> Date: Thu, 21 May 2026 05:56:41 +0000 Subject: [PATCH] fix(agents): disable pi-coding-agent auto-retry to prevent tool call replay loops (#84798) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: - The PR disables pi-coding-agent auto-retry inside prepared embedded Pi settings, updates the focused settings test, and moves the changelog entry into Unreleased. - Reproducibility: yes. source-reproducible: current main leaves embedded Pi retry enabled, while pi-coding-ag ... e assistant error before continuing. I did not run a live Feishu/Qwen replay loop in this read-only review. Automerge notes: - PR branch already contained follow-up commit before automerge: fix(agents): disable pi-coding-agent auto-retry to prevent tool call … Validation: - ClawSweeper review passed for head ca745fd55d06aafd2b64eb7347263eec09c4b68e. - Required merge gates passed before the squash merge. Prepared head SHA: ca745fd55d06aafd2b64eb7347263eec09c4b68e Review: https://github.com/openclaw/openclaw/pull/84798#issuecomment-4504702875 Co-authored-by: yelog Co-authored-by: clawsweeper <274271284+clawsweeper[bot]@users.noreply.github.com> Co-authored-by: clawsweeper[bot] <274271284+clawsweeper[bot]@users.noreply.github.com> Approved-by: takhoffman Co-authored-by: takhoffman <781889+takhoffman@users.noreply.github.com> --- CHANGELOG.md | 1 + src/agents/pi-project-settings.test.ts | 3 +-- src/agents/pi-project-settings.ts | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5eb67861f10..109f41f713c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ Docs: https://docs.openclaw.ai - Media/audio: skip empty structured sherpa-onnx transcripts instead of treating the raw JSON payload as spoken text. (#84667) Thanks @TurboTheTurtle. - Memory-core/dreaming: reuse stable narrative subagent session keys per workspace and phase while keeping per-run idempotency and bounded cleanup, so stale `dreaming-narrative-*` sessions do not accumulate. Fixes #68252, #69187, and #70402. (#70464) Thanks @chiyouYCH. - Trajectory/support: tolerate partial skill snapshot entries when building support metadata so rejected skill path scans no longer abort trajectory capture. (#71185) Thanks @lukeboyett. +- Agents/Pi: disable the embedded pi-coding-agent runtime auto-retry so OpenClaw's own retry and failover loop does not replay failed tool calls through a nested SDK retry. Fixes #73781. (#74434) Thanks @yelog. - CLI/perf: keep `setup --help`, `onboard --help`, and `configure --help` out of the full wizard runtime while preserving the existing help output. (#84488) Thanks @frankekn. - CLI/perf: keep `agents --help` out of agents action/runtime imports so help, completion, and command discovery paths avoid loading the full agents runtime. (#84483) Thanks @frankekn. diff --git a/src/agents/pi-project-settings.test.ts b/src/agents/pi-project-settings.test.ts index f69ecba1cb4..f763512249a 100644 --- a/src/agents/pi-project-settings.test.ts +++ b/src/agents/pi-project-settings.test.ts @@ -161,9 +161,8 @@ describe("createPreparedEmbeddedPiSettingsManager", () => { }); expect(settingsManager.getShellCommandPrefix()).toBe("echo trusted &&"); - expect(settingsManager.getRetryEnabled()).toBe(true); + expect(settingsManager.getRetryEnabled()).toBe(false); - settingsManager.setRetryEnabled(false); await settingsManager.flush(); const diskSettings = JSON.parse(await fs.readFile(agentSettingsPath, "utf8")) as { diff --git a/src/agents/pi-project-settings.ts b/src/agents/pi-project-settings.ts index 9106f1836dd..46cc1462838 100644 --- a/src/agents/pi-project-settings.ts +++ b/src/agents/pi-project-settings.ts @@ -61,5 +61,10 @@ export function createPreparedEmbeddedPiSettingsManager(params: { cfg: params.cfg, contextTokenBudget: params.contextTokenBudget, }); + // Disable the pi-coding-agent auto-retry. OpenClaw has its own comprehensive + // retry layer (failover rotation, auth profile rotation, empty-error retry, + // thinking-level fallback) in run.ts. Having both layers active creates a + // double-retry that can replay failed tool calls in an unbounded loop (#73781). + settingsManager.setRetryEnabled(false); return settingsManager; }