summaryrefslogtreecommitdiff
path: root/makima/src/bin
diff options
context:
space:
mode:
authorsoryu <soryu@soryu.co>2026-01-24 00:52:28 +0000
committersoryu <soryu@soryu.co>2026-01-24 00:52:28 +0000
commitcb2aa9a73163ce392d7c3f1dd81888b039312a67 (patch)
tree4b124f0f8ab3762140fa8b7ed2e0370e479fedae /makima/src/bin
parent579c983d3efb8f1414ffb45b9e031f741cce5f76 (diff)
downloadsoryu-cb2aa9a73163ce392d7c3f1dd81888b039312a67.tar.gz
soryu-cb2aa9a73163ce392d7c3f1dd81888b039312a67.zip
feat: Add maximum iterations limit for autonomous loop mode
Adds configurable iteration limits to prevent runaway autonomous loops and provide predictable behavior, inspired by Ralph's design patterns. Changes: - Add AutonomousLoopConfig to daemon config with: - default_max_iterations: 10 (default for new tasks) - hard_limit: 50 (absolute maximum that cannot be exceeded) - no_change_threshold: 3 (consecutive runs without progress) - same_error_threshold: 5 (consecutive runs with same error) - Add max_iterations and iteration_count fields to Task model - Add iteration_limit_reached status to TaskStatus enum - Pass max_iterations through DaemonCommand::SpawnTask - Apply limits in CircuitBreaker during autonomous loop execution When a task hits the iteration limit: - Task status is set to "iteration_limit_reached" (not "failed") - Clear message is logged about hitting the limit - Task can be resumed with a higher limit if needed Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Diffstat (limited to 'makima/src/bin')
-rw-r--r--makima/src/bin/makima.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/makima/src/bin/makima.rs b/makima/src/bin/makima.rs
index 96dc252..b82ad62 100644
--- a/makima/src/bin/makima.rs
+++ b/makima/src/bin/makima.rs
@@ -242,6 +242,7 @@ async fn run_daemon(
api_key: config.server.api_key.clone(),
heartbeat_commit_interval_secs: config.process.heartbeat_commit_interval_secs,
checkpoint_patches: config.process.checkpoint_patches.clone(),
+ autonomous_loop_config: config.autonomous_loop.clone(),
};
// Create task manager with local database for crash recovery