Decode a reload's handed JSON with a decoder for LoopRun and its Route

This commit is contained in:
2026-11-08 22:40:50 +01:00
parent db019c626f
commit 293532bb58
5 changed files with 99 additions and 61 deletions
+1 -1
View File
@@ -90,7 +90,7 @@ def loop_run_from(argv: list[str], cwd: pathlib.Path, effects: Effects) -> LoopR
return Stop(0 if task else 1, HELP)
root = checkout_root(cwd, effects)
return root if isinstance(root, Stop) else LoopRun(0, root, task, "")
loop_run = decode_handed(argv[1], LoopRun) if len(argv) == 2 else None
loop_run = decode_handed(argv[1]) if len(argv) == 2 else None
if not (loop_run and loop_run.root and loop_run.task):
return Stop(1, f"the edited loop-claude cannot read the state the running one handed it, likely because the edit changed that handover; rerun loop-claude <task>. Handed: {' '.join(argv[1:])}")
return loop_run