Commands
clawker loop iterate
Run the same prompt repeatedly:
clawker loop tasks
Run loops driven by a task file. The agent reads the task list, picks the next task, completes it, and marks it done:
<tasks> block with instructions to pick the next open task and mark it done.
clawker loop status
Check the status of the current loop session:
clawker loop reset
Reset the circuit breaker and session state:
Output Modes
Loop mode automatically selects the best output mode:| Condition | Mode | Behavior |
|---|---|---|
| TTY + no flags | TUI Dashboard | Real-time interactive display, press q/Esc to detach |
--verbose | Text Monitor | Stream all agent output to stderr |
--quiet | Silent | No progress, exit status only |
--json | JSON | Structured result to stdout |
| Non-TTY | Text Monitor | Fallback for piped output |
Circuit Breakers
Loop mode includes multiple circuit breakers to prevent runaway loops:| Breaker | Default | What It Detects |
|---|---|---|
max_loops | 50 | Hard iteration limit |
stagnation_threshold | 3 | Iterations without meaningful progress |
timeout_minutes | 15 | Per-iteration time limit |
same_error_threshold | 5 | Consecutive identical errors |
output_decline_threshold | 70 | Output size declining by this percentage |
max_consecutive_test_loops | 3 | Iterations that only run tests (no code changes) |
safety_completion_threshold | 5 | Completion indicators without exit signal |
completion_threshold | 2 | Indicators required for completion detection |
session_expiration_hours | 24 | Session TTL |
.clawker.yaml:
Worktree Integration
Run loops in isolated Git worktrees for concurrent development:Additional Flags
| Flag | Description |
|---|---|
--loop-delay | Seconds to wait between iterations (default: 3) |
--calls-per-hour | API rate limit (default: 100, 0 to disable) |
--skip-permissions | Allow all tools without prompting |
--reset-circuit | Reset circuit breaker before starting |
--hooks-file | Custom hook configuration file |
--append-system-prompt | Additional system prompt instructions |
--image | Override container image |
Tips
- Start small: Use lower
max_loops(10-20) while testing your prompt, then increase. - Use
--verbosefor debugging: See exactly what the agent is doing each iteration. - Task files work best with clear structure: Number your tasks, use checkboxes, or other markers the agent can update.
- Worktrees for parallel work: Run multiple loops on different features simultaneously without branch conflicts.
- Reset when stuck: If the circuit breaker tripped, use
clawker loop resetbefore retrying with a refined prompt.