Skip to main content

Module loop_state

Module loop_state 

Source
Expand description

Loop run state persistence for loop-engineering workflows.

A loop is a long-lived scheduler that invokes the vtcode harness repeatedly. LoopRunState captures the durable state a loop scheduler reads on resume: current step index, last artifact path, and status.

State is persisted as JSON under {workspace}/.vtcode/state/loop-{id}.json.

Structs§

LoopRunState
Durable state for a single loop run. The loop scheduler reads this on resume to know where execution left off.

Enums§

LoopStatus
Lifecycle status of a loop run.

Functions§

delete_loop_state
Delete a loop state file from disk.
list_loop_states
List all loop state files in the state directory.
load_loop_state
Load loop run state from disk.
loop_state_path
Resolve the path for a specific loop state file.
save_loop_state
Save loop run state to disk using atomic write (temp file + rename).
state_dir
Resolve the .vtcode/state/ directory for a workspace.