Skip to content

Session relaunch: base completion on the final live list; a registered-then-exited session is absent (#1116 follow-up a) - #1140

Merged
seathatflowsinourveins merged 1 commit into
mainfrom
claude/cc-native-practice-relaunch-complete-reconcile-20261015
Oct 15, 2026
Merged

seathatflowsinourveins merged 1 commit into
mainfrom
claude/cc-native-practice-relaunch-complete-reconcile-20261015

Conversation

@seathatflowsinourveins

@seathatflowsinourveins seathatflowsinourveins commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

Scope

  • What this PR changes, in one or two sentences: Session relaunch (Session relaunch after an unplanned WSL restart: a roster timer and a boot oneshot on the systemd user manager #1116) now decides completion from the run's final live list. A session seen running earlier in a run and missing at its end is absent, so the run is partial and a rerun brings it back. An unreadable final list never completes a run.
  • Base commit: 0f4ee075b
  • Lane: lane:foundation
  • Owned paths touched:
    • tools/session-relaunch/session_relaunch.py and tools/session-relaunch/README.md;
    • tests/test_session_relaunch.py;
    • docs/decisions/2026-10-14-session-relaunch-after-wsl-restart.md (the tests line);
    • evidence/artifacts/session-relaunch-20261014/README.md (the test count);
    • manifests/evidence.json.

This is #1116 follow-up (a), the first in the command center's order (2026-10-15T02:55Z): (a) completion, then (b) the roster lock and (c) the carry after a partial run, then (d) the P3s.

Finding: the local review's P2 at 7aad5a0, line 533; at c8d7fa9 it is the final pass, lines 547-553. Source: the local review, review_output.json under /var/tmp/ns2604-local-review-20261013/.

  • An early-started lane registers, then exits while later tabs open.
  • Its earlier running outcome stood.
  • The run said complete, and plan() refused every later rerun as already relaunched.

Fix:

  • In the final pass, a session seen running earlier and missing from the final list becomes absent.
  • Its resolved_through moves past its calls, because its tab start was seen to register. A rerun therefore opens it again without a --reopen.
  • unresolved() is unchanged for a session never seen listed, so the double-launch closure of the earlier rounds holds.
  • complete now requires a final list that was read. An unreadable one leaves the run partial (exit 1, the alert), and a rerun reads it again.

SOTA sources

  • Code under change: native-agent-stack/native-agent-stack at c8d7fa9e42c62bffc24446e7829ecc5933ec945d, tools/session-relaunch/session_relaunch.py:547-553 (the final pass) and :320-327 (unresolved()).
  • Live list: the final pass reads the live list from claude agents --json, the client's own session list. Its shape was measured at Claude Code 2.1.299, in Session relaunch after an unplanned WSL restart: a roster timer and a boot oneshot on the systemd user manager #1116's evidence/artifacts/session-relaunch-20261014/receipts/probes.json (:4; client also at sources.json:3).
  • Upstream: own logic; no upstream mechanism changes.

Evidence-class table

Claim Evidence class Command / receipt
A registered-then-exited session left the run complete at c8d7fa9 synthetic test_a_session_that_registers_and_then_exits_leaves_a_recoverable_partial_state (stand-in client and PowerShell; the fake opener removes the command center's row as the next tab opens), failed on c8d7fa9 with 'complete' != 'partial'
An unreadable final list completed the run at c8d7fa9 synthetic test_an_unreadable_final_list_never_completes_a_run, failed on c8d7fa9 the same way
Both pass after the fix; the rerun opens only the absent session and completes synthetic python3 -m unittest tests.test_session_relaunch: 53 tests OK

Local commands run

$ python3 -m unittest tests.test_session_relaunch -k registers_and_then_exits -k unreadable_final_list   # at c8d7fa9e
FAILED (failures=2)   # 'complete' != 'partial', both
$ python3 -m unittest tests.test_session_relaunch
Ran 53 tests; OK
$ python3 scripts/validate.py
rc 0; {"components": 71, "hashed_files": 12040, "profiles": 4, "receipts": 240, "status": "passed"}

Decision record

docs/decisions/2026-10-14-session-relaunch-after-wsl-restart.md: its tests line gains this follow-up and the count of 53.

Follow-ups

  • (b) and (c) follow in one PR, since they share the snapshot's carry. (b) adds a short roster lock around the seed roster write and the timer snapshot's carry. (c) carries a partial run's unfinished rows into this boot's roster.
  • (d) covers the P3s of the GPT fix3 read and the command center's micro, and the README's dry-run wording: the dry run writes relaunch.lock.

Checklist

  • No GitHub Actions changed.
  • No workflows changed.
  • No secrets are printed, logged or committed.
  • No new paid hosting, subscription or billing surface.
  • Peer-owned untracked files and worktrees were preserved.

🤖 Generated with Claude Code

…hat registered and exited is absent

#1116 follow-up (a), the local review's P2 at 7aad5a0 :533 (the final pass at
c8d7fa9 :547-553; review_output.json sha256 7e01f04a). A session seen running
earlier in a run and missing from the final live list kept its running outcome,
so the run said complete and plan() refused every later rerun as already
relaunched.

- The final pass marks such a session absent and moves its resolved_through
  past its calls: it was seen listed, so its tab start registered, and a rerun
  opens it again without a --reopen (unresolved() is unchanged for a session
  never seen listed).
- complete needs a final list that was read; an unreadable one leaves the run
  partial (exit 1, the alert), and a rerun reads it again.
- README: the absent outcome, the status sentence and the rerun list. The
  decision's test line and the evidence README count: 53.

Fail-first: both new tests failed on c8d7fa9 ('complete' != 'partial'); the
module runs 53 tests OK. Own logic; no upstream mechanism changes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@seathatflowsinourveins seathatflowsinourveins added the lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers label Oct 15, 2026
@seathatflowsinourveins
seathatflowsinourveins merged commit 39b3fca into main Oct 15, 2026
34 checks passed
@seathatflowsinourveins
seathatflowsinourveins deleted the claude/cc-native-practice-relaunch-complete-reconcile-20261015 branch October 15, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lane:foundation Foundation lane: Claude/Codex setup, hosts, memory, RAG, research, workers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant