feat(ralph-loop): add strategy option for fresh context per iteration

Closes #1901

Add 'default_strategy' config option (default: 'continue') to control whether ralph-loop creates a new session per iteration ('reset') or keeps the same session ('continue'). The 'reset' strategy keeps the model in the smart zone by starting with fresh context for each iteration.

Supports --strategy flag for per-command override.
This commit is contained in:
YeonGyu-Kim
2026-02-21 02:27:57 +09:00
parent 51654c1c5e
commit 5c83fee619
16 changed files with 323 additions and 49 deletions
+6 -1
View File
@@ -10,7 +10,12 @@ export interface RalphLoopHook {
startLoop: (
sessionID: string,
prompt: string,
options?: { maxIterations?: number; completionPromise?: string; ultrawork?: boolean }
options?: {
maxIterations?: number
completionPromise?: string
ultrawork?: boolean
strategy?: "reset" | "continue"
}
) => boolean
cancelLoop: (sessionID: string) => boolean
getState: () => RalphLoopState | null