Skip to content

Commit e74347b

Browse files
committed
fix(agents): retry overloaded subagent announces
1 parent a95d7ab commit e74347b

3 files changed

Lines changed: 28 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ Docs: https://docs.openclaw.ai
154154

155155
### Fixes
156156

157+
- Agents/subagents: retry parent wake announces when the announce-summary model run fails with fallback cooldown exhaustion instead of dropping the wake on the first transient provider overload. Refs #78581.
157158
- Providers/network: honor IPv4 CIDR and octet-wildcard `NO_PROXY` entries such as `100.64.0.0/10` and `100.64.*` before enabling trusted env-proxy mode for model-provider requests. Fixes #79030.
158159
- Docs/Docker: document a local Compose override for Docker Desktop DNS failures in the shared-network `openclaw-cli` sidecar, keeping the default compose setup hardened while unblocking `openclaw plugins install` when users opt in. Fixes #79018. Thanks @Jason-Vaughan.
159160
- Installer: when npm installs `openclaw` outside the parent shell PATH, print follow-up commands with the resolved binary path instead of telling users to run `openclaw` from a shell that will report `command not found`. Fixes #72382. Thanks @jbob762.

‎src/agents/subagent-announce-delivery.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ const TRANSIENT_ANNOUNCE_DELIVERY_ERROR_PATTERNS: readonly RegExp[] = [
201201
/gateway not connected/i,
202202
/gateway closed \(1006/i,
203203
/gateway timeout/i,
204+
/\ball models failed\b/i,
205+
/\ball profiles unavailable\b/i,
206+
/\boverloaded\b/i,
204207
/\b(econnreset|econnrefused|etimedout|enotfound|ehostunreach|network error)\b/i,
205208
];
206209

‎src/agents/subagent-announce.format.e2e.test.ts‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,30 @@ describe("subagent announce formatting", () => {
897897
expect(sendSpy).not.toHaveBeenCalled();
898898
});
899899

900+
it("retries direct agent announce on fallback cooldown exhaustion", async () => {
901+
agentSpy
902+
.mockRejectedValueOnce(
903+
new Error(
904+
"All models failed (1): anthropic/claude-opus-4-7: Provider anthropic is in cooldown (all profiles unavailable) (overloaded)",
905+
),
906+
)
907+
.mockResolvedValueOnce(visibleAgentResponse());
908+
909+
const didAnnounce = await runSubagentAnnounceFlow({
910+
childSessionKey: "agent:main:subagent:test",
911+
childRunId: "run-direct-agent-fallback-summary-retry",
912+
requesterSessionKey: "agent:main:main",
913+
requesterDisplayKey: "main",
914+
requesterOrigin: { channel: "discord", to: "channel:C123", accountId: "default" },
915+
...defaultOutcomeAnnounce,
916+
roundOneReply: "worker result",
917+
});
918+
919+
expect(didAnnounce).toBe(true);
920+
expect(agentSpy).toHaveBeenCalledTimes(2);
921+
expect(sendSpy).not.toHaveBeenCalled();
922+
});
923+
900924
it("delivers completion-mode announces immediately even when sibling runs are still active", async () => {
901925
sessionStore = {
902926
"agent:main:subagent:test": {

0 commit comments

Comments
 (0)