fix(pause): auto-finalize skips threads the session never touched (v3.4.13) - #241
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Field gap (2026-08-29): at session end, the pause Auto-Finalize step found an active thread pointer (
_active.md) naming a thread whose latest snapshot belonged to a different session token, while the ending session had done no work on that thread at all. None of the three literal skip conditions matched:A literal reading would have auto-finalized — appending the ending session's unrelated content as the thread's next snapshot, corrupting
/resume. The agent skipped per intent; this PR makes the condition list cover the case explicitly.Change
skills/pause/SKILL.md§Auto-Finalize): skip when the ending session did no work on the thread after the thread's latest pause file was written (or at all, if the slug has no pause files). Interval-scoping also covers the same-session variant (thread paused early, unrelated work after) and the orphan-pointer variant (slug with zero snapshots)./pausedoes NOT match — capturing that continuation is what auto-finalize exists for./resumeStep 2 uses (never mtime, which sync tools rewrite) for the whole Auto-Finalize section.skills/wrapup/SKILL.mdStep 0b andskills/startup/AUTO-SUMMARY.md(both marked keep-in-sync), and/wrapup's skipped-notice reference now reads "(1, 2, 3, or 4)"..claude-pluginand.codex-pluginmanifests) + CHANGELOG entry.Review
Two review passes ran pre-PR (risk-scaled): a cold adversarial pass on the skip-condition contract and a repo-consistency/deliverable pass. The adversarial findings (weak conjunction parse, non-durable
/resumememory after compaction, same-session variant, undefined "latest" sort, naming collision with condition 1) were all fixed in the second commit. An out-of-scope/resume --taskvalidation-ordering bug surfaced by the review is tracked separately.🤖 Generated with Claude Code