I'll pull each trail and review the changes. Let me start by fetching the trail details.
Assistant
· claude-opus-5
I read all three branches, built and ran the affected package tests locally on each, and confirmed all three PRs are green on CI (#2013, #2015, #2029).
1061 — feat(strategy): link commits to sessions by process identity (#2013)
The core design is right: union-not-precedence between worktree and identity matching, nearest-ancestor-wins, host/boot/start-time guards, one ancestry snapshot per commit instead of per candidate. Deleting internal/proctree in favour of proclive was the correct call — SessionState.Owner was already being captured on every turn start seven lines away. Docs are unusually good.
1. The guest path retains the shadow branch but still resets the checkpoint window — manual_commit_hooks.go:1416-1444
The guest branch calls resetCheckpointWindow(state) (which sets StepCount = 0) and then returns beforeshadowBranchesToDelete[shadowBranchName] and before advancing BaseCommit. Two consequences:
CondenseSession recomputes the shadow branch from state.BaseCommit + state.WorktreeID and reads the branch tip tree. Since the guest condense neither deletes the branch nor moves BaseCommit, the same shadow content stays eligible to be condensed again into the next checkpoint this session links to. The home path avoids this precisely by deleting the branch and advancing BaseCommit to a new branch name.
StepCount == 0 un-pins the branch. cleanupShadowBranchIfUnused (manual_commit_condensation.go:1471) and doctor.go:690 both gate on state.StepCount > 0 to decide "another session still needs this branch", and isWarnableStaleEndedSession / classifySession (doctor.go:289) both bail on StepCount <= 0. So between a guest condense and the session's next SaveStep, a concurrent session sharing the branch can delete it, and if the session ends in that window its shadow branch is orphaned without doctor flagging it.
The comment justifies retaining the branch by the carry-forward hazard — but carry-forward is already gated separately by isSessionHomeWorktree(repoDir, state) at line 1327. So the retention looks like belt-and-braces that now contradicts the StepCount reset. Either skip resetCheckpointWindow for guests, or schedule the branch for deletion (its content just landed in the guest checkpoint).
2. condenseAndUpdateState's variadic makes "guest" the default — line 1428
go
var isHome bool
if len(opts) > 0 { isHome = isSessionHomeWorktree(opts[0].repoDir, state) }
Both current callers pass condenseOpts, so this is latent — but a caller that omits it silently gets guest treatment (no branch cleanup, no BaseCommit advance, FilesTouched never cleared). For a variadic that's the wrong fail-safe direction. Make repoDir a positional parameter, or default isHome = true.
3. isSessionHomeWorktree uses raw == on paths — session_identity.go:121
reconcileWorktreePathForResumedTurn in the same package compares worktree paths with filepath.Clean. In practice both sides come from git rev-parse --show-toplevel so they agree today, but path equality now gates state mutation rather than just matching, so the failure mode of a mismatch is worse than it was. Cheap to harden.
4. The ambiguity hint can fire once per replayed commit during a rebase — session_identity.go:44
The stderr hint lives inside findSessionsForCommitLinking, which PostCommit also calls. PostCommit resolves the trailer first and only computes isRebase := isGitSequenceOperation(ctx)after the find, so a git rebase replaying N trailer-bearing commits in a worktree with ambiguous sessions prints the hint N times. Suppressing it when isGitSequenceOperation is true, or only emitting from PrepareCommitMsg, would fix it.
5. Test coverage stops short of the riskiest code.session_identity_test.go covers the matcher, the union, imported exclusion, ambiguity/liveness and updateBaseCommitIfChanged gating — but nothing exercises the guest branch of condenseAndUpdateState or the carry-forward gate, which is where the "would replace the home worktree's in-flight state with foreign files" hazard the comments describe actually lives.
Two things worth stating in the PR description rather than fixing:
The guest gate is path-based, not identity-based, so it also changes the pre-existing cross-worktree fallback path. That's an improvement (the fallback used to rewrite BaseCommit from a foreign worktree and orphan the home shadow branch), but the docs frame guest-linking as identity-only, and this is the behaviour change most likely to surface in existing repos.
resolveWorktreeCandidates now links where the old code declined: one live worktree within 15 minutes wins. Two live worktrees where one is mid-long-build (>15 min idle) now silently links to the other. Reasonable trade for #1852, but it's a guess the previous code refused to make, and recentSessionWindow should be called out as the knob it is.
1064 — fix(doctor): hint --force instead of crashing (#2015)
Clean, and correctly modelled on the existing checkGitHooks degrade — same guard, same wording, same "return nil" semantics. It reuses canCondenseStuckSession for the hint rather than re-deriving it, so the disclosed fix can't drift from what --force actually does. Nothing blocking. Three small things:
confirmDoctorFix got an internal safety net; promptSessionAction didn't. That asymmetry is the one thing a future call site could trip over — worth either adding the same guard or a comment saying why it isn't needed.
Non-interactive runs still exit 0 with stuck sessions reported. Consistent with checkGitHooks, so presumably deliberate — but if anyone wants entire doctor usable as a CI gate, now is when to say so.
Tests only cover the non-interactive path (the go test default). That matches repo norms; just noting the interactive branch has no pin.
1073 — feat: self-heal zombie sessions via detached sweep (#2029)
1. The predicate never nominates IDLE dead-owner sessions — the case the design calls the common one — session_sweep.go:36
go
if st.Phase.IsActive() { return st.OwnerExited() }
Phase.IsActive() is p == PhaseActive only (session/phase.go:47). An IDLE state falls through the imported check to st.Phase != session.PhaseEnded → return false. But runSessionSweep's first action is finalizeExitedSessions(ctx, states), which keys on OwnerExited() and does cover IDLE. So the sweep can fix IDLE zombies but will never be spawned for a repo whose only zombies are IDLE.
CLAUDE.md is explicit about this being the case that matters: "OwnerExited deliberately covers IDLE as well as ACTIVE — an agent that finishes its last turn and then quits leaves IDLE, so gating on ACTIVE alone missed the common case." The new doc paragraph asserts the opposite — "IDLE sessions with a dead owner are out of scope, matching doctor's boundary" — and that justification doesn't hold: entire doctor calls the same finalizeExitedSessions, so doctor's boundary includes IDLE. Fix is one line: if !st.IsEnded() { return st.OwnerExited() }.
Relatedly, the "idle session is never a zombie" test case has no Owner at all, so OwnerExited() is false regardless of phase — it doesn't exercise the case its name claims.
2. The detached sweep inherits a budget whose whole rationale is an interactive caller — session_finalize.go:15-31
sweepCondenseBudget = 1 * time.Second, justified in its own doc comment by "the callers here are interactive commands — including entire status --json ... where nothing prints until the sweep returns." __sweep_sessions exists precisely so nobody is waiting, yet it gets the same 1s cap, and the 15-minute spawn throttle sits on top. A post-upgrade backlog therefore drains at roughly 1s of condensing per 15 minutes — which undercuts the feature's headline claim. Parameterize the budget for the detached path, or say in the PR why 1s is still right there.
3. Throttle failure mode is "spawn every time" — session_sweep.go:236
A GetGitCommonDir error skips the throttle entirely — one detached child per session start, which is exactly what the throttle exists to prevent. recentlySpawnedMarker's "never worse than before this guard existed" is true for the trail refresh but understates it here, where the guard is the only thing bounding fork count.
4. The O(N) work happens before the throttle check. Every session start reads every state file in the shared dir and runs a proclive probe per ACTIVE session, then checks the throttle. Reordering isn't free — recentlySpawnedMarkerrecords on a miss, so a read-only variant would be needed first — but the current ordering deserves a comment saying it's deliberate, given this repo's open hook-latency floor.
Things done well and worth keeping: the condense-only contract with the explicit "discards are doctor's" boundary, the imported-session guard (with the reason spelled out), the re-load-and-re-check under the lock before acting, IsCondensableEndedSession's note that it's a re-check for PostCommit but the primary check for the sweep, and ensureLogger + logging the top-level error in the detached child.
Cross-cutting
1061 and 1073 merge cleanly except for one docs conflict: both insert a paragraph at the same anchor in docs/architecture/sessions-and-checkpoints.md. All Go files auto-merge. Whichever lands second just needs the doc rebase.
SessionState.Owner is becoming a single point of failure for three behaviours: liveness (already shipped), commit attribution (1061), and background sweeping (1073). It's nil on Windows and whenever hook ancestry resolves to only transient processes. Do we have any signal on how often ResolveOwner actually succeeds across the supported agents? Both PRs degrade correctly when it's nil, but the value of both features is proportional to a resolve rate nobody has measured.
1061's ensureTestIsolatedStateDir hard-fails session.NewStateStore under go test outside the temp root. That's the right call and CI is green, but it raises the bar for every future test touching session state — worth a line in the PR so it isn't discovered as a mystery failure.
User
ok, approved + merged 1064/2015, can you post the findings on the other two trails
Assistant· claude-opus-5
Now trail 1073. Let me get exact line numbers on that branch.
Assistant· claude-opus-5
Posted. All anchors show freshness: current — I checked out each branch before posting so the file/line locations resolve against the branch tip rather than my review branch.
manual_commit_hooks.go:1435 — medium — guest path resets the checkpoint window (StepCount = 0) but keeps the shadow branch and BaseCommit, so the same tip stays re-condensable and the session stops pinning its own branch
manual_commit_hooks.go:1428 — low — variadic opts defaults isHome to false, i.e. guest is the fail-open direction
session_identity.go:122 — low — raw == on worktree paths where the same package uses filepath.Clean
session_identity.go:42 — low — ambiguity hint fires once per replayed commit during a rebase
session_identity_test.go:348 — low — no pin on the guest branch of condenseAndUpdateState or the carry-forward gate
Comment: the guest gate is path-based (so it also changes the pre-existing fallback path), and the 15-min liveness window converts a deliberate refusal into a guess — both belong in the description
session_sweep.go:36 — high — Phase.IsActive() is PhaseActive only, so IDLE dead-owner sessions never nominate a sweep, even though finalizeExitedSessions inside the sweep does fix them; the new doc paragraph's justification ("matching doctor's boundary") is wrong since doctor calls the same function
session_sweep.go:97 — medium — detached sweep inherits sweepCondenseBudget = 1s, whose stated rationale is an interactive caller; with the 15-min throttle a backlog drains at ~1s per 15 min
session_sweep.go:232 — low — GetGitCommonDir error short-circuits the && and skips the throttle entirely; plus a note on the O(N) work running before the throttle check
session_sweep_test.go:132 — low — the IDLE case has no Owner, so it passes on an empty fixture rather than on phase exclusion
Comment: the two branches merge cleanly except one docs hunk, and Owner now carries three behaviours on an unmeasured resolve rate
User
can you review them again
Assistant· claude-opus-5
Re-reviewed both at their new tips. All nine findings are genuinely fixed — I verified each by reading the diff and running the tests, plus a mutation probe on the one that mattered most.
1061 (#2013) — tip 9fc73e026
Finding
Fix
Verified
StepCount pin
pendingStepCount restored after resetCheckpointWindow
Reverted the two lines → TestPostCommit_GuestCondensationPreservesHomeShadowState fails on the StepCount assertion, and the log confirms the guest condense ran. Non-vacuous.
Variadic opts
now positional opts condenseOpts
builds, single call site each
Raw == on paths
filepath.Clean both sides + TestIsSessionHomeWorktree_CleansPaths
pass
Rebase hint spam
&& !isGitSequenceOperation(ctx) + a .git/rebase-merge fixture test
pass
Test coverage gap
TestPostCommit_GuestCondensationPreservesHomeShadowState — end-to-end, asserts the shadow ref is byte-identical
pass
Both scope notes
landed in CLAUDE.md, the arch doc, and the recentSessionWindow constant comment
—
One correction to my own review. I claimed the guest path re-condenses the same shadow content. That was wrong. cpkg.WriteOptions carries FilesTouched (names), the transcript, prompts and tasks — not the shadow tree's blobs — so a guest condense genuinely does not consume the home worktree's shadow content. Peyton's comment ("the checkpoint window was consumed, but the home worktree's shadow content was not") is accurate, and preserving the pin was the right fix rather than deleting the branch.
One new, low observation.ef2deecf6 inverted isSessionHomeWorktree so an unknown path is now "not home". Right default for mutation safety, but a session with an empty WorktreePath that identity matching finds is now permanently a guest — BaseCommit frozen, shadow branch never released, FilesTouched never cleared, so it re-condenses on every commit — and it happens silently. findSessionByCommitAncestry is the only route in (the worktree fallback already does ), so skipping empty- states there too would close it. Reachability is genuinely low — every current writer sets the field, so this is legacy state files only.
User
how about merging both and do the fixes as a follow up PR?
Assistant· claude-opus-5
Both are BLOCKED on REVIEW_REQUIRED — merging needs an approving review first. You have admin, so there are two ways through, and they leave different records. Everything else is decided: merge-commit (squash is disabled repo-wide), 1061 first, then update 1073 with main and resolve the one docs hunk by keeping both paragraphs.
Assistant· claude-opus-5
What would you like to clarify?
For context, here's where things stand:
#2013 and #2029 are both BLOCKED / REVIEW_REQUIRED. All real CI is green on both; the only failing check is Entire Gates, and its sole failing sub-gate is Approvals: failed — No reviewers have approved this trail. Checks and Findings both pass.
Both PRs are authored by peyton-alt, so an approving review has to come from someone else — you have admin, so you can either approve or bypass.
The rest is already settled, no input needed: merge commit (squash is disabled repo-wide, and recent history is all Merge pull request #NNNN from …); 1061 first; then bring 1073 up to main and resolve the single docs/architecture/sessions-and-checkpoints.md conflict by keeping both paragraphs (they describe different mechanisms and don't overlap).
Follow-up PR would carry three low findings: the empty-WorktreePath permanent-guest case in isSessionHomeWorktree, the half-ended (EndedAt set, Phase still IDLE) state that isSweepableZombie:46 silently drops, and the un-memoized proclive.Check host/boot reads now running ~33× per session start.
Happy to answer anything about those, or reframe the question if the approval axis isn't what you were weighing.
User
I mostly want to know if this is a good idea first
Assistant· claude-opus-5
Yes, I think it's the right call — with two qualifications.
Why merging now is right. None of the three remaining findings is a regression against main. Two are only reachable through legacy state files (an empty WorktreePath, or an EndedAt-without-PhaseEnded partial write) that no current writer can produce, and the third is pure perf. Both PRs are well-tested — I mutation-probed the guest-condensation test and it genuinely fails when the fix is reverted, which is more than most tests in this area can claim. Holding two reviewed, green PRs on legacy-only edge cases would be the wrong trade.
Qualification 1: don't merge them back-to-back. Land 1061, give it a few days of dogfooding, then 1073. Not ritual caution — 1061 changes commit→session attribution for every commit in every repo, and the failure mode is a wrong or dangling checkpoint trailer, which is precisely the bug class this repo has been chasing. If something's off you want one suspect, not two. You also get the conflict resolution for free: 1073 has to take a main merge and resolve that docs hunk anyway once 1061 lands.
Qualification 2: trim the follow-up to two fixes, not three. The two one-liners are worth doing (isSessionHomeWorktree skipping empty-WorktreePath states at the identity matcher, and isSweepableZombie:46 not silently dropping the half-ended shape). The proclive.Check memoization I'd leave as a comment on the code, not a change — it's a few hundred microseconds against an open ~3-second p50 hook-latency floor. Fixing it now is optimising the wrong end.
The thing actually worth doing instead is the Owner resolve-rate question from my 1073 comment, which nobody has answered. Both features are load-bearing on a field that's nil on Windows and nil whenever hook ancestry resolves to only transient processes — and if it resolves poorly on some agent, that agent silently gets none of this. I have one data point from measuring my own clone while reviewing: 33 of 34 non-ended sessions carry an Owner. Encouraging, but that's one machine with a Claude Code-heavy mix. A short script across a few teammates' state dirs, bucketed by agent_type, would tell you whether these two PRs are load-bearing or decorative for Cursor, Codex, Copilot CLI and Droid. That's more valuable than any of the three findings.
Want me to go ahead on that basis — approve and merge 1061 now, queue 1073 for later in the week?
User
why not merge both?
Assistant· claude-opus-5
You're right — that doesn't hold up. The two touch disjoint surfaces: 1061 is session_identity.go / manual_commit_hooks.go (commit linking), 1073 is session_sweep.go / session_finalize.go / the session-start hook. Neither modifies ResolveOwner or captureSessionOwner — they both only readOwner, so they can't corrupt each other's input. A dangling-trailer bug is 1061 and a spawn/finalization bug is 1073; you'd never need a bisect to tell them apart. And staging costs real things: another main merge for 1073 later, peyton's context going cold, and the follow-up blocked on both anyway.
The only genuine interaction runs the right way: 1073 finalizing more dead-owner sessions means fewer stale sessions in 1061's linking set, which is the same effect entire status already has today.
Merging both. Order is still 1061 → 1073, but only because 1073 needs the main merge and that one docs hunk resolved.
One thing worth watching after, not blocking: 1073's detached sweep runs with an unbounded condense deadline, so its first run against an existing backlog can be long. On my clone that's 33 non-ended sessions carrying an owner. It's detached and nobody waits on it, but it's the first run that'll be the noisy one.
That leaves the original open question:
Assistant· claude-opus-5
What would you like to clarify?
The decision I'm stuck on is narrow: both PRs need an approving review before GitHub will let them merge, and I won't post one under your name without you saying so — that's a record attributed to you on a colleague's PR, not a mechanical step.
If it helps, the things I can tell you about that gate:
It's a real GitHub block, not just the Entire check.mergeStateStatus=BLOCKED, reviewDecision=REVIEW_REQUIRED. The Entire Gates check reports the same thing (Approvals: failed — No reviewers have approved this trail); its other two sub-gates, Checks and Findings, both pass.
You have admin, so a bypass is available — it just merges without any review record existing.
peyton-alt authored both, so GitHub won't count a self-approval; it has to come from you or another reviewer.
If your question is about something else entirely — scope of the follow-up, what happens to the trails after merge, whether to loop peyton in first — ask and I'll answer that instead.
User
1061 is merged, 1073 I can't do much since if I resolve the conflict I can't approve either.
Assistant· claude-opus-5
Let me check the actual state rather than theorise — the conflict may look different now that 1061 is in main.
Assistant· claude-opus-5
Two things to correct before the plan — and your reasoning about approval is exactly right, for a reason worth naming.
The trail numbers are swapped. It's the other way round:
1073 / #2029 (zombie sweep) is MERGED — by you at 11:11:33Z, merge commit 875a2b6ae, branch auto-deleted.
1061 / #2013 (identity linking) is still OPEN, REVIEW_REQUIRED, branch feat/session-identity-linking at 9fc73e026.
So the one needing the conflict resolution is the identity-linking PR, and it now conflicts with main because the sweep landed first. I re-tested: one conflicted file, docs/architecture/sessions-and-checkpoints.md, nothing else.
And you're right that you can't do both. The main ruleset has require_last_push_approval: true — whoever makes the most recent push cannot be the approving reviewer. Plus dismiss_stale_reviews_on_push: true, so approving first and then pushing wouldn't work either. It's structural, not a workaround problem.
Also worth knowing from that same ruleset: the required checks are only test, lint, and check-licenses / license-check. Entire Gates is not a required check — its failure was never what was blocking the merge. The approval rule was.
So the split has to be: someone else pushes, you approve.
Assistant· claude-opus-5
What would you like to clarify?
To save you asking: here's the conflict itself, which is the only thing standing in the way.
Assistant· claude-opus-5
That's the whole conflict: two independently-added sections landing at the same anchor. HEAD (peyton's branch) adds "Commit-to-session linking"; main (the merged sweep) adds "Background zombie sweep". They describe different mechanisms, share no text, and neither references the other. The resolution is "keep both, one after the other" — no editorial judgment, no semantic merge.
So the state is:
Merged: 1073 / #2029, zombie sweep, in main at 875a2b6ae.
Open: 1061 / #2013, identity linking, needs main merged in and that one hunk de-conflicted.
Blocker:require_last_push_approval: true on main — pusher ≠ approver. Not Entire Gates, which isn't a required check.
Follow-up PR: two one-line fixes, both now landing on main (isSessionHomeWorktree skipping empty-WorktreePath states; isSweepableZombie:46 not dropping the half-ended shape). The sweep half is already in main, so that one is unblocked today.
What's your question? If it's just "who does the push" — given the resolution is mechanical, the low-friction version is I hand peyton the two commands and the ordering, they push, you approve. But say the word and I'll push it under your identity instead and you can pull in whoever's around for the rubber stamp.
User
ok, I will ask peyton to resolve. anything else left to do now
Assistant· claude-opus-5
Checked one more rule that could have bitten after peyton pushes: required_review_thread_resolution: true is on, but #2013 has 0 unresolved review threads, so that won't block. Once peyton pushes the resolution, your approval is the only thing left.
Three things still open:
1. The empty-WorktreePath fix — timing-sensitive. This one lives in #2013, and peyton is about to touch that branch anyway. If I post it as a finding on trail 1061 now, they can fold the one-liner in with the conflict resolution instead of it needing a follow-up PR at all. findSessionByCommitAncestry should skip states with an empty WorktreePath, matching what the worktree fallback already does — otherwise ef2deecf6's fail-closed inversion leaves such a session permanently guest-linked, silently. Want me to post it?
2. The half-ended sweep fix — unblocked now.session_sweep.go:46's st.Phase != session.PhaseEnded is unreachable except for the EndedAt-set/Phase-still-IDLE shape, which it silently drops. That code is in main as of 875a2b6ae, so I can open the follow-up PR whenever you want. Small: one condition plus a test case.
3. The Owner resolve-rate question — still unanswered, still the most valuable. Both merged/pending features are load-bearing on a field that's nil on Windows and nil whenever hook ancestry resolves to only transient processes. My one data point is 33/34 non-ended sessions on this machine, Claude Code-heavy. A script bucketing by agent_type across a few teammates' state dirs would tell you whether this works for Cursor, Codex, Copilot CLI and Droid, or silently doesn't.
I'd do 1 now (timing), 2 whenever, and treat 3 as the real follow-up. Say which.
User
ok, file 1, open a pr for 2
Assistant· claude-opus-5
Starting with the finding, then the PR.
Assistant· claude-opus-5
Filed. Now the sweep PR — let me check the code on main first.
Assistant· claude-opus-5
Now the changes — four gates, all keyed on the same inconsistency.
Assistant· claude-opus-5
Now the tests — a case for the predicate and one proving the sweep actually condenses a half-ended session end to end.
Assistant· claude-opus-5
Now verifying the test is non-vacuous — reverting each of the three gates in turn should fail it.
Assistant· claude-opus-5
Both done.
1. Filed on trail 1061 — finding 01M0MK3JVPEGMFPR3PF183CF8R, anchored at session_identity.go:92 (the candidate filter in findSessionByCommitAncestry, not the isSessionHomeWorktree line, since that's where the one-line fix goes). It opens by saying it's worth folding into the conflict-resolution push rather than a separate PR, so peyton sees the timing when they pick up the branch. Severity low, with the reachability stated honestly so nobody holds the PR for it.
It turned out bigger than the "one condition plus a test case" I quoted you. The predicate fix alone does nothing: runSessionSweep has the same Phase test in both loop guards (before and after the fresh re-load), and IsCondensableEndedSession has it a third time — so a half-ended session nominated by a fixed predicate would still get skipped twice and then reported non-condensable. Three gates, all keyed on the same re-spelling of IsEnded.
I verified that's not over-reach by mutation-probing each one: reverting any single gate on its own fails the new end-to-end test, with a different assertion each time. That's in the PR body.
Two things called out explicitly for review:
IsCondensableEndedSession is shared with the PostCommit stale-session warning, so that now counts half-ended sessions too. I think that's the same correction rather than a side effect, but it's the one place this PR reaches beyond the sweep.
doctor's classifySession has the identical gap and I left it alone — separate command, separate path, and the sweep now condenses these before doctor would see them. Offered to fold it in if you'd rather the two agree.
mise run check is clean end to end: fmt, lint 0 issues, unit + integration + the Vogon canary (4/4). I restored .opencode/package-lock.json after test:ci dirtied it, so only the three intended files are in the commit.
Still open from earlier, unowned: the Owner resolve-rate measurement across agent types.
if !st.IsEnded() { return st.OwnerExited() } — exactly the shape finalizeExitedSessions uses
test fixture now carries deadOwner and asserts want: true; the false "matching doctor's boundary" doc line is gone
Condense budget
finalizeExitedSessions(ctx, states, condenseDeadline); sweep passes time.Time{}, status/doctor pass interactiveSweepCondenseBudget. endSessionNow already treats zero as unbounded (!condenseDeadline.IsZero()), and the scanner-failure path still forces time.Now() to skip
tests pass
Throttle fail-open
resolves the common dir first and returns on error; added a sweepGitCommonDir seam and a test asserting zero spawns; my secondary point about the discovery/throttle ordering is now an explicit comment naming the read-only-marker prerequisite
pass
They also went past the findings: imported sessions are now excluded from finalizeExitedSessions itself (isExitedSessionFinalizationCandidate), and f4881a3c3 aligned the predicate with IsCondensableEndedSession on (StepCount <= 0 && !HasTaskContent()).
Two new, low observations:
session_sweep.go:46 — after if !st.IsEnded() { … } three lines above, st.Phase != session.PhaseEnded can only be true for the half-ended shape (EndedAt set, Phase still IDLE) that IsEnded's own doc exists to normalize — "a state file can carry one without the other (a legacy record, or a partial write)". Such a state is dropped here, skipped by finalizeExitedSessions (because OwnerExited returns false once IsEnded), and falls into classifySession's default: return nil. So it's invisible to both sweep halves and doctor, and only the 7-day purge reaches it — which deletes rather than condenses. The function now contradicts itself on exactly the case it just started getting right.
proclive.Check re-reads os.Hostname() and bootID() per identity, with no memoization — on Linux that's a /proc/sys/kernel/random/boot_id read plus a /proc/<pid>/stat read every call. Widening the candidate set from ACTIVE to all non-ended is correct, but it also widened this: in my clone that's 33Check calls per session start, up from 3. Sub-millisecond each, so not a blocker — but it's now on the hook path, it scales with the state-file count (which grows to the 7-day threshold), and proclive already has the right pattern in CurrentAncestry (resolve host/boot once, match in memory). A Prober/CheckAll would mirror it.
Status
Both merge cleanly except the same one docs hunk in sessions-and-checkpoints.md (both still insert at the same anchor). All CI green on both; the only failing check is Entire Gates, and its detail is Approvals: failed — No reviewers have approved this trail — Checks and Findings both pass.
Want me to post the three new observations as findings, or leave them here?