Interactive Planner

OpenClaw Session PingPong Turn Planner

Plan and configure how many back-and-forth turns your agents get during agent-to-agent exchanges. Simulate conversations, estimate costs, and export a ready-to-use YAML config. Based on OpenClaw PR #52400 that raised the maxPingPongTurns ceiling from 5 to 20.

Why Use the PingPong Turn Planner

Inspired by the turn ceiling increase shipped in OpenClaw PR #52400 on May 11, 2026.

Visual PingPong Simulation

Watch agents exchange messages in real time. See how turn count affects conversation depth and understand the back-and-forth flow before deploying.

Configurable 0–20 Range

Set turn limits anywhere from 0 (disabled) to 20 (new max). PR #52400 raised the ceiling from 5 to 20 while keeping the default at 5 for backward compatibility.

Use Case Presets

Choose from pre-built workflow patterns — simple Q&A, code review, research synthesis, agent debate, or complex planning — each with a recommended turn count.

Token & Cost Estimates

See estimated input/output tokens and cost per exchange based on your selected models. Compare how different turn limits affect your API spend.

Smart Warnings

Get contextual alerts for edge cases: high-cost configurations, too-few turns for complex workflows, and clamping behavior at the 20-turn ceiling.

One-Click YAML Export

Copy the generated session config and paste it directly into your OpenClaw config.yaml. Includes cost annotations as comments.

Plan Your PingPong Configuration

Select a use case, configure your agents, simulate the exchange, and copy the YAML when you're done.

Frequently Asked Questions

What is maxPingPongTurns in OpenClaw?

maxPingPongTurns controls the maximum number of back-and-forth message exchanges between two agents during a single sessions_send operation. It prevents infinite loops while allowing complex multi-agent workflows. The setting lives under session.agentToAgent.maxPingPongTurns in your config.yaml.

Why was the ceiling raised from 5 to 20?

PR #52400 raised the ceiling because many real-world agent-to-agent workflows — like iterative code review, research synthesis, and multi-step planning — need more than 5 exchanges to complete effectively. The default remains at 5 for backward compatibility, but you can now go up to 20 when your use case demands it.

What happens if I set a value above 20?

Values above 20 are automatically clamped to 20 by the resolvePingPongTurns() function. The Zod schema enforces a .max(20) constraint during config validation, so invalid values are caught at startup. Similarly, negative values are clamped to 0 via .min(0).

Does this affect all agent-to-agent exchanges?

Yes. The maxPingPongTurns setting applies globally to every sessions_send call. Each pair of agents in a multi-agent setup gets the same turn budget. If you need different limits for different agent pairs, you would need separate config profiles.

How does this interact with token costs?

Each turn consumes tokens for both the input (receiving the message + context) and output (generating the response). Token usage grows with each turn because the conversation history accumulates. A 20-turn exchange can cost 4–5x more than a 5-turn exchange due to this compounding effect.

Where do I paste the generated YAML?

Copy the generated YAML and paste it into your OpenClaw config.yaml file under the top-level session key. If you're using DeployClaw, you can paste it into the Config Editor in the dashboard — it will be validated and applied on the next agent restart.