Repository navigation
fix: reopen recently used sessions on launch (1.37.8) - #35
Merged
Merged
Conversation
Restore all and the post-update relaunch reopened every saved entry, however long it had sat untouched. Each one is a whole agent process on its machine (~1 GB for Claude plus a copy of every configured MCP server), so a paired deck restoring a host after its reboot brought back conversations nobody had used for days: on 2026-10-12 SIHYEONG-4080 got 8 resumed tiles at ~2.4 GB each, two of them idle since 10-07. Bulk restore now reopens only pinned entries and entries active within the last 24 hours. The rest stay in previous sessions, a toast says how many were left, and one click still opens any of them. Single-entry restore (click, last-viewed session on launch) is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AwhRmzUt3nLnhqU1NJyzpW
A plain launch (reboot, sign-in, quit) restored nothing: every open tile became a saved entry, so the person pressed Restore all and got every saved conversation back, days-idle ones included. The previous commit filtered bulk restores by lastActiveMs, but that is the tile's last output, refreshed on every terminal redraw: measured on SIHYEONG-4080, two conversations idle for 63 h still saved lastActiveMs within the hour. - persist() marks open tiles wasLive; a launch that is not an update relaunch reopens this machine's wasLive tiles whose conversation was written in the last 48 h (pinned always), leaves the rest saved, and clears the flag so a left entry does not return by itself later. - new cockpit:conversationsLastUsed IPC answers transcript mtimes (Claude jsonl, Codex rollout), batched like sessionsExist. - Restore all and the update relaunch are explicit again: they reopen everything they name, as their labels say. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AwhRmzUt3nLnhqU1NJyzpW
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AwhRmzUt3nLnhqU1NJyzpW
Advisories published after 1.37.7 failed `npm audit --audit-level=high` in CI on main as well. `npm audit fix` (in-range: electron 43.7.11, undici, js-yaml, brace-expansion, http-cache-semantics, source-map-js) plus vitest 3 -> 4.1.11, which drops tinypool. Tests, launch-restore and resilience journeys pass on the new tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AwhRmzUt3nLnhqU1NJyzpW
writingdeveloper
added a commit
that referenced
this pull request
Oct 15, 2026
1.37.8 shipped the launch-restore fix (#35), so this candidate becomes 1.37.9. Conflicts: persist() keeps this branch's persistSessions path and carries main's wasLive flag; package.json/lock take main's dependency fixes (electron 43.7.11, vitest 4.1.11); README keeps this branch's rewrite. Candidate docs now say 1.37.9. Verified on the merged tree: npm test 1320 passed / 1 skipped, build, check:docs, launch-restore Electron check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AwhRmzUt3nLnhqU1NJyzpW
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
lastActiveMsis the tile's last terminal output. A terminal redraws on its own, so this value cannot tell an idle tile from an active one. Measured on 4080: two conversations unused for 63 h still hadlastActiveMswithin the last hour.Change
persist()marks open tiles withwasLive. On a launch that is not the restart after an update, the app reopens this machine'swasLivetiles whose conversation was written in the last 48 h. Pinned tiles always reopen. The rest stay in Previous, with a toast saying so. The flag is cleared on launch, so an entry left saved does not reopen by itself later.cockpit:conversationsLastUsedIPC returns transcript mtimes (Claude jsonl, Codex rollout), batched likesessionsExist.QA
npm test: 1267 passed, 1 skipped. Added tests forpartitionLaunchRestore,takeLaunchRestoreCandidatesand the new IPC.launch restore reopen=1 left=1). The second launch reopened it again, and the 4-day-old tile did not come back.npm run qa:link: all checks true, including host restart,staleRemoteTilesBecomePreviousandnoDuplicateAfterHostRestore.src/renderer/cockpitView.ts. fix: reliable saves, task conflict protection and maintenance docs (1.37.9 candidate) #33 will need a version bump after this merges.🤖 Generated with Claude Code
https://claude.ai/code/session_01AwhRmzUt3nLnhqU1NJyzpW