// docs / loop
Stop guessing which phrasing is better.
Loop is an iteration workbench: generate variants, test them against your own agent, keep the winner as a version. Pro feature.
What Loop does
An “Improve” button gives you one rewrite and a shrug. Loop generates several pattern-based variants (concise, structured, step-by-step), optionally runs each through your real agent, shows the outputs and token deltas side by side, and saves the one you pick as the next version — recorded, diffable, reversible.
On the web
Open a prompt → ⋯ menu → Loop variants in the editor. You get variants with a short rationale and a character-count delta for each; choose one and it becomes a new version with a Loop(strategy) changelog. The web path is generate-choose-apply — great for a quick rewrite pass.
On the CLI — test with your agent
The full workbench is in the terminal. --exec takes any command; Loop substitutes each variant into {} (and pipes it on stdin / PLE_PROMPT), runs your agent, and shows you the real outputs:
ple loop code-review --exec 'claude -p {}' --rounds 3
# every variant runs through YOUR agent → outputs shown side by side
# pick the one you like → it becomes the next versionBecause it runs your command, Loop tests against the model, tools, and context you actually ship with — not a generic playground. Use --focus to steer the variant strategy and --rounds to control how many iterations.
Cost is visible
Each variant shows a token delta (e.g. −32% tokens) so “same quality for less spend” is a decision you can see, not guess. Loop consumes your monthly AI token budget; top up with MicroBoost if you run dry.
Requirements
Loop is a Pro feature (1M AI tokens/month included; Team gets a 3M pooled budget). See pricing.