Loop
The Loop dock panel runs an automated improve-and-evaluate cycle on an agent session:
- Prompt the agent with your instruction.
- Run a user-defined evaluation command.
- Extract a numeric score from the result — a process exit code, a regex match on stdout, a field from JSON output, or an LLM judge.
- Commit the changes if the score improved, or discard them and revert to the previous state if it regressed.
- Repeat until you stop it or the maximum number of iterations is reached.
Each iteration has a configurable time limit; if the agent exceeds it, Manifold stops it automatically. Results are logged per worktree under ~/.manifold/loop-logs/. The panel tracks the best score so far and offers Restore Best to jump back to the commit that produced it.
When to use Loop
- Iterative improvements where success is measurable (test pass rate, benchmark score, lint count).
- Refactors you want to keep only if a metric improves.
- Any task where you can express “better” as a number that an evaluation command can emit.