Count a timed-out resume as an attempt, it may have launched

This commit is contained in:
2026-08-18 21:20:45 +02:00
parent 5a5dc94ae8
commit 673632ff21
2 changed files with 8 additions and 1 deletions
+5
View File
@@ -307,6 +307,11 @@ def resume(job, claude_bin, prompt, dry_run):
command + [prompt],
capture_output=True, cwd=cwd, text=True, timeout=180, check=True,
)
except subprocess.TimeoutExpired:
# The launch may have registered before we gave up, and a second try
# would put two agents on one conversation.
log(f"{job['id']}: resume timed out, counting the attempt")
return True
except (OSError, subprocess.SubprocessError) as err:
log(f"{job['id']}: resume failed: {err}")
return False