fix: improve resume edge cases and shell quoting

- Early exit when all agents already completed instead of running empty workflow
- Descriptive error when deliverables missing from disk despite session.json success
- Quote $WORKSPACE in shannon CLI to prevent word splitting
This commit is contained in:
ajmallesh
2026-02-16 09:26:12 -08:00
parent 759c8d8093
commit 539bd873cc
2 changed files with 19 additions and 1 deletions
+10 -1
View File
@@ -544,8 +544,17 @@ export async function loadResumeState(
.filter((hash): hash is string => hash != null);
if (checkpoints.length === 0) {
const successAgents = Object.entries(agents)
.filter(([, data]) => data.status === 'success')
.map(([name]) => name);
throw ApplicationFailure.nonRetryable(
`No successful agent checkpoints found in workspace ${workspaceName}`,
`Cannot resume workspace ${workspaceName}: ` +
(successAgents.length > 0
? `${successAgents.length} agent(s) show success in session.json (${successAgents.join(', ')}) ` +
`but their deliverable files are missing from disk. ` +
`Start a fresh run instead.`
: `No agents completed successfully. Start a fresh run instead.`),
'NoCheckpointsError'
);
}