Skip to content

Initialize routine result counter from existing files#198

Merged
dimavrem22 merged 1 commit intomainfrom
routine-result-save-patch
Feb 24, 2026
Merged

Initialize routine result counter from existing files#198
dimavrem22 merged 1 commit intomainfrom
routine-result-save-patch

Conversation

@dimavrem22
Copy link
Contributor

@dimavrem22 dimavrem22 commented Feb 24, 2026

Summary

  • On agent init, scan raw/ for existing routine_result_{N}.json files and seed the counter at max(N) + 1, so new agent instances against an existing workspace never overwrite prior results
  • Added 5 new unit tests for resume-from-existing-files behavior: empty raw starts at 1, resumes from existing, handles index gaps, ignores non-matching files, and end-to-end continuation

On agent init, scan raw/ for files matching the routine_result_{idx}
pattern and start the counter at max(idx) + 1. This prevents overwrites
when a new agent instance is created against a workspace with existing
results.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@dimavrem22 dimavrem22 force-pushed the routine-result-save-patch branch from 5b9afc2 to fe2767f Compare February 24, 2026 00:43
@dimavrem22 dimavrem22 merged commit d70311a into main Feb 24, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants