Skip to content

Age out stale running sessions and recover leftover run state - #896

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-7643-interrupted-stale-recovery
Sep 11, 2026
Merged

Age out stale running sessions and recover leftover run state#896
TheGreatAxios merged 1 commit into
mainfrom
cl-7643-interrupted-stale-recovery

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Summary

  • Stale running sessions age to interrupted after two missed 5-minute heartbeats, or when no in-process active-run handle owns them.
  • Load prefers a newer parseable run.json.*.tmp over a stale run.json by mtime, sweeps aged temps, and does not resurrect a tmp over a fresher terminal run.json.
  • Resume of a stale running session writes interrupted before reopening as running. Signals stay failed; missing or unreadable state stays crashed.

Verification

  • bun run typecheck and bun run build pass (pre-commit and bun run check).
  • bun run check exits 1 on four preexisting origin/main failures: torn-base-tail heal, unpublished-rewrite commit failure, and two assembleChatAgent evidence-archive tests. 6720 tests pass, including src/session/run-liveness.test.ts and tests/unit/session/resume-interrupted.test.ts.

Fixes CL-7643

@linear-code

linear-code Bot commented Sep 11, 2026

Copy link
Copy Markdown

CL-7643

@TheGreatAxios
TheGreatAxios force-pushed the cl-7643-interrupted-stale-recovery branch 3 times, most recently from 43e25fe to b8073f8 Compare September 11, 2026 03:26
@TheGreatAxios
TheGreatAxios force-pushed the cl-7643-interrupted-stale-recovery branch from b8073f8 to 6728a3d Compare September 11, 2026 03:32
@TheGreatAxios
TheGreatAxios merged commit 91d2105 into main Sep 11, 2026
9 checks passed
@TheGreatAxios
TheGreatAxios deleted the cl-7643-interrupted-stale-recovery branch September 11, 2026 03:34
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.

1 participant