fix(ultrawork): add iteration cap to prevent infinite loops
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -3,6 +3,7 @@ import {
|
||||
DEFAULT_COMPLETION_PROMISE,
|
||||
DEFAULT_MAX_ITERATIONS,
|
||||
HOOK_NAME,
|
||||
ULTRAWORK_MAX_ITERATIONS,
|
||||
ULTRAWORK_VERIFICATION_PROMISE,
|
||||
} from "./constants"
|
||||
import { clearState, incrementIteration, readState, writeState } from "./storage"
|
||||
@@ -36,7 +37,7 @@ export function createLoopStateController(options: {
|
||||
active: true,
|
||||
iteration: 1,
|
||||
max_iterations: loopOptions?.ultrawork
|
||||
? undefined
|
||||
? ULTRAWORK_MAX_ITERATIONS
|
||||
: loopOptions?.maxIterations ??
|
||||
config?.default_max_iterations ??
|
||||
DEFAULT_MAX_ITERATIONS,
|
||||
|
||||
Reference in New Issue
Block a user