Repository navigation
fix(undo-close): a failed restore says why (#1242) - #1264
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…othing
respawn swallowed every spawn error (catch { return null }), the entry
went back on the stack, and nothing was shown, so after a provider CLI
broke every Cmd+Shift+T looked like a dead key. The error is now kept
per undo and toasted as `Could not restore "<title>": <reason>`, both
for a whole entry and for the members of a group that did not come
back. The entry stays on the stack, as before.
Closes #1242
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ror (steering q22) The spawn rejection is the raw provider exception relayed through IPC and can carry environment values or tokens, and a toast is visible text. The toast now names what could not be restored and then gives SESSION_START_FAILED_MESSAGE, as main's recovery and the reload path do. The tests assert the safe text and the absence of the raw error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ule, partial projects - The toast used the 2.5 s default, gone before the sentence could be read. Warning-grade toasts elsewhere use 6-10 s, so this uses 8 s. - The title fallback re-implemented sessionDisplayTitle and got empty titles and trailing slashes wrong; 19 of the owner's 35 real sessions are untitled, so it now uses the shared rule. - A project that came back with only some of its agents dropped the rest silently (#992's best-effort rule). It now says "Could not restore 1 of 3 agents in project ...". - The project wording, untitled fallback and duration are pinned. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t retried forever Main refuses a spawn whose cwd is gone with MissingWorkspaceDirectoryError, the one start failure no retry can fix. Undo treated it as a provider failure: the entry was pushed back, every later Cmd+Shift+T re-failed on it, and every older close became unreachable. It is now consumed like a stale entry with "its folder no longer exists (<path>)" — main's own curated text, which the pane header already shows. The class does not survive ipcRenderer.invoke, so the message prefix is now a shared constant used by both sides. A project whose every member's folder is gone is consumed too; a mix stays retryable. Also regroups the @shared import (R2-3). R2-2 (raw session:spawn text over IPC) is a follow-up issue, outside this toast. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Sep 25, 2026
…sts, groups drop consumed members - A partly restored project named the provider for agents whose worktrees were deleted; the reason now follows what failed (folders, provider, or both). - An all-folder project spanning several cwds (the owner's largest real project spans 22) no longer names the first one as if it were the only. - A group whose deleted-folder member was consumed before a sibling failed pushed the ORIGINAL group back, so the consumed member was retried and re-toasted on every later Cmd+Shift+T; the leftover is rebuilt instead. - Tests pin the mixed-project rule (a surviving mutant in both reviews). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Review disposition (2 rounds, then merge on green)
CI quality-gate is green on a head that contains origin/main. Closes #1242. 🤖 Generated with Claude Code |
Juliusolsson05
added a commit
that referenced
this pull request
Sep 25, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Correction to the disposition (steering q31): "contains origin/main" was checked BEFORE #1258 merged. #1264 merged 5 s later, and its tested head c13464e did not contain #1258's merge c13de39, so its green gate was against the prior main. There is no known interaction between the two fixes (different files: undoClose vs goal-loop store). main's own push CI for a56d696 is the check of the combination; this comment links its outcome once it finishes. From now on each merge is followed by a remerge and a fresh gate on the next PR, never two merges off one check. |
Juliusolsson05
added a commit
that referenced
this pull request
Sep 25, 2026
…ate rule, #1309 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
Juliusolsson05
added a commit
that referenced
this pull request
Sep 25, 2026
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.
Closes #1242.
Verified failure
respawnswallowed spawn errors (catch { return null }). The entry went back on the stack with no message, so after a provider CLI broke, every Cmd+Shift+T silently did nothing. A partially restored group was silent about the rest too. Plan:docs/plans/2026-09-25-undo-close-respawn-failure.md(plan-only commit first).Fix
The failure is toasted with a safe sentence (steering q22):
Could not restore "<title>": Session failed to start. Check provider setup and retry.. The raw spawn error is never shown, because it can carry environment values or tokens (or project "<title>", or "N closed items"). This covers both a whole failure and the leftover members of a group. The entry stays on the stack for another try, unchanged.Evidence
posix_spawnp failedIPC rejection: exact toast text, and the entry is kept.tsc -bis clean; the hook and undo suites pass (352 tests).🤖 Generated with Claude Code