惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

有赞技术团队
有赞技术团队
H
Hackread – Cybersecurity News, Data Breaches, AI and More
I
InfoQ
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
D
DataBreaches.Net
Recent Announcements
Recent Announcements
Microsoft Azure Blog
Microsoft Azure Blog
B
Blog RSS Feed
Y
Y Combinator Blog
博客园 - 【当耐特】
博客园 - 聂微东
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
大猫的无限游戏
大猫的无限游戏
P
Proofpoint News Feed
量子位
C
Check Point Blog
F
Fortinet All Blogs
罗磊的独立博客
Last Week in AI
Last Week in AI
GbyAI
GbyAI
L
LangChain Blog
博客园 - 司徒正美

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
feat(session): raise ping-pong turn ceiling · openclaw/op...
steipete · 2026-05-11 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -10,6 +10,7 @@ Docs: https://docs.openclaw.ai

1010

- Build: enable stricter Vitest lint rules for focused, disabled, conditional, hook, matcher, and expectation hazards.

1111

- Build: pin explicit oxfmt defaults in the shared formatter config to keep formatting behavior stable across upgrades.

1212

- TypeScript: enable stricter compiler checks for implicit returns, side-effect imports, overrides, and unused production code.

13+

- Agents: allow `session.agentToAgent.maxPingPongTurns` up to 20 while keeping the default at 5 for longer agent-to-agent reply chains. Fixes #52382. (#52400) Thanks @thirumaleshp.

1314

- Build: upgrade workspace package management to pnpm 11 and keep Docker, install, update, and release workflows on the pnpm 11 config surface. (#79414) Thanks @altaywtf.

1415

- Models: add provider-level `localService` startup for on-demand local model servers before OpenAI-compatible requests, including one-shot model probes.

1516

- Agents: trim default system prompt guidance and send-only message tool schemas to reduce prompt tokens while preserving GPT-5 personality guidance.

Original file line numberDiff line numberDiff line change

@@ -1,4 +1,4 @@

1-

c9e88800854b697cb3c9721d0087eb2bc7bcf6ae7239cb51d9849c49ef3d48e3 config-baseline.json

2-

67c58457ed2b525975cdb053489f92a5f840c8cf982666393e111fd327dd132e config-baseline.core.json

1+

1cc2cabc41c2261492dea4d927b48864c6992dcfb5b81fa97f2171848d037b1e config-baseline.json

2+

bfa974d070e5ef26fab023506b050cb3a582d1e54a096dbf4dddbc59535de29c config-baseline.core.json

33

f90c9d96ccc4c0c703d6c489f86d89fde208cd7f697b396aeee96ff3ee087956 config-baseline.channel.json

44

18f71e9d4a62fe68fbd5bf18d5833a4e380fc705ad641769e1cf05794286344c config-baseline.plugin.json

Original file line numberDiff line numberDiff line change

@@ -104,7 +104,8 @@ provenance. The receiving agent should treat them as tool-routed data, not as a

104104

direct end-user-authored instruction.

105105
106106

After the target responds, OpenClaw can run a **reply-back loop** where the

107-

agents alternate messages (up to 5 turns). The target agent can reply

107+

agents alternate messages (up to `session.agentToAgent.maxPingPongTurns`, range

108+

0-20, default 5). The target agent can reply

108109

`REPLY_SKIP` to stop early.

109110
110111

## Status and orchestration helpers

Original file line numberDiff line numberDiff line change

@@ -1219,7 +1219,7 @@ See [Multi-Agent Sandbox & Tools](/tools/multi-agent-sandbox-tools) for preceden

12191219

- **`reset`**: primary reset policy. `daily` resets at `atHour` local time; `idle` resets after `idleMinutes`. When both configured, whichever expires first wins. Daily reset freshness uses the session row's `sessionStartedAt`; idle reset freshness uses `lastInteractionAt`. Background/system-event writes such as heartbeat, cron wakeups, exec notifications, and gateway bookkeeping can update `updatedAt`, but they do not keep daily/idle sessions fresh.

12201220

- **`resetByType`**: per-type overrides (`direct`, `group`, `thread`). Legacy `dm` accepted as alias for `direct`.

12211221

- **`mainKey`**: legacy field. Runtime always uses `"main"` for the main direct-chat bucket.

1222-

- **`agentToAgent.maxPingPongTurns`**: maximum reply-back turns between agents during agent-to-agent exchanges (integer, range: `0``5`). `0` disables ping-pong chaining.

1222+

- **`agentToAgent.maxPingPongTurns`**: maximum reply-back turns between agents during agent-to-agent exchanges (integer, range: `0`-`20`, default: `5`). `0` disables ping-pong chaining.

12231223

- **`sendPolicy`**: match by `channel`, `chatType` (`direct|group|channel`, with legacy `dm` alias), `keyPrefix`, or `rawKeyPrefix`. First deny wins.

12241224

- **`maintenance`**: session-store cleanup + retention controls.

12251225

- `mode`: `warn` emits warnings only; `enforce` applies cleanup.

Original file line numberDiff line numberDiff line change

@@ -1,7 +1,7 @@

11

import { beforeEach, describe, expect, it } from "vitest";

22

import { setActivePluginRegistry } from "../../plugins/runtime.js";

33

import { createSessionConversationTestRegistry } from "../../test-utils/session-conversation-registry.js";

4-

import { resolveAnnounceTargetFromKey } from "./sessions-send-helpers.js";

4+

import { resolveAnnounceTargetFromKey, resolvePingPongTurns } from "./sessions-send-helpers.js";

55
66

describe("resolveAnnounceTargetFromKey", () => {

77

beforeEach(() => {

@@ -63,3 +63,28 @@ describe("resolveAnnounceTargetFromKey", () => {

6363

});

6464

});

6565

});

66+
67+

describe("resolvePingPongTurns", () => {

68+

it("defaults to 5 when unset", () => {

69+

expect(resolvePingPongTurns(undefined)).toBe(5);

70+

expect(resolvePingPongTurns({ session: {} } as never)).toBe(5);

71+

});

72+
73+

it("uses configured values through the 20-turn ceiling", () => {

74+

expect(

75+

resolvePingPongTurns({ session: { agentToAgent: { maxPingPongTurns: 10 } } } as never),

76+

).toBe(10);

77+

expect(

78+

resolvePingPongTurns({ session: { agentToAgent: { maxPingPongTurns: 20 } } } as never),

79+

).toBe(20);

80+

});

81+
82+

it("keeps defensive floor and ceiling clamps", () => {

83+

expect(

84+

resolvePingPongTurns({ session: { agentToAgent: { maxPingPongTurns: -1 } } } as never),

85+

).toBe(0);

86+

expect(

87+

resolvePingPongTurns({ session: { agentToAgent: { maxPingPongTurns: 50 } } } as never),

88+

).toBe(20);

89+

});

90+

});

Original file line numberDiff line numberDiff line change

@@ -13,7 +13,7 @@ export {

1313

} from "./sessions-send-tokens.js";

1414
1515

const DEFAULT_PING_PONG_TURNS = 5;

16-

const MAX_PING_PONG_TURNS = 5;

16+

const MAX_PING_PONG_TURNS = 20;

1717
1818

export type AnnounceTarget = {

1919

channel: string;

Original file line numberDiff line numberDiff line change

@@ -1537,7 +1537,7 @@ export const FIELD_HELP: Record<string, string> = {

15371537

"session.agentToAgent":

15381538

"Groups controls for inter-agent session exchanges, including loop prevention limits on reply chaining. Keep defaults unless you run advanced agent-to-agent automation with strict turn caps.",

15391539

"session.agentToAgent.maxPingPongTurns":

1540-

"Max reply-back turns between requester and target agents during agent-to-agent exchanges (0-5). Use lower values to hard-limit chatter loops and preserve predictable run completion.",

1540+

"Max reply-back turns between requester and target agents during agent-to-agent exchanges (0-20, default 5). Use lower values to hard-limit chatter loops and preserve predictable run completion.",

15411541

"session.threadBindings":

15421542

"Shared defaults for thread-bound session routing behavior across providers that support thread focus workflows. Configure global defaults here and override per channel only when behavior differs.",

15431543

"session.threadBindings.enabled":

Original file line numberDiff line numberDiff line change

@@ -205,7 +205,7 @@ export type SessionConfig = {

205205

/** Session transcript write-lock acquisition policy. */

206206

writeLock?: SessionWriteLockConfig;

207207

agentToAgent?: {

208-

/** Max ping-pong turns between requester/target (0–5). Default: 5. */

208+

/** Max ping-pong turns between requester/target (0-20). Default: 5. */

209209

maxPingPongTurns?: number;

210210

};

211211

/** Shared defaults for thread-bound session routing across channels/providers. */

Original file line numberDiff line numberDiff line change

@@ -64,7 +64,7 @@ export const SessionSchema = z

6464

.optional(),

6565

agentToAgent: z

6666

.object({

67-

maxPingPongTurns: z.number().int().min(0).max(5).optional(),

67+

maxPingPongTurns: z.number().int().min(0).max(20).optional(),

6868

})

6969

.strict()

7070

.optional(),