Repository navigation
fix(resume): keep a restored Claude conversation until its pane reports - #306
Merged
amirlehmam merged 1 commit intoOct 19, 2026
Merged
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
The save-time stamp asked agent-state for each terminal's Claude id and read silence as "exited": a pane whose `claude --resume` had not reported yet, or whose tab had never been shown (no PTY at all), had its id removed by the first 30 s autosave. Restart wmux twice and every Claude tab you had not opened in between came back as a bare shell. Codex and OpenCode never had this — their lookup already distinguished silence (keep) from a release or another provider's report (clear). - Claude now uses the same provider lookup: its own report wins, another provider's report or a release clears the id, silence keeps it. - `stampClaudeSessionIds` treats an `undefined` lookup as "no opinion". - `pane.release_agent` (Claude's SessionEnd hook) is refused while wmux is quitting, like the Codex and OpenCode releases: Claude exiting because wmux killed its PTY is not the user closing the conversation. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
clemrdh
force-pushed
the
fix/claude-resume-keep-unreported
branch
from
October 19, 2026 11:10
b1907ce to
99ee6bd
Compare
Contributor
Author
Owner
|
Merged, thank you @clemrdh. Bringing Claude onto the same provider lookup as Codex and OpenCode, and refusing |
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.
Restarting wmux twice loses every Claude conversation in a tab you did not open in between. The save-time stamp asked agent-state for each terminal's Claude id and read silence as "exited", so a pane whose
claude --resumehad not reported yet, or whose tab had never been shown (no PTY at all), lost itsclaudeSessionIdon the first 30 s autosave. Codex and OpenCode never had this: their lookup already told silence (keep) from a release or another provider's report (clear).A second path erased the rest at quit. Claude's SessionEnd hook calls
pane.release_agentas wmux kills its PTY, and unlike the Codex and OpenCode releases it was not refused while quitting, so a plain quit could drop the conversations that were open.Changes:
stampClaudeSessionIdstreats anundefinedlookup as "no opinion" and keeps the id.pane.release_agentis refused whileisQuitting, likepane.release_codex_sessionandpane.release_opencode_session. Claude exiting because wmux killed it is not the user closing the conversation.Exiting Claude yourself still clears the tab: SessionEnd releases it, and
wasAgentReleasedmakes the lookup returnnull. A test covers this.Seen in practice on 2.28.1: one workspace came back with five bare shells. Its Claude ids were in an earlier session backup and had been dropped by later autosaves.
Validation:
tests/unit/agent-session-persistence.test.ts: a silent pane keeps its restored id; a pane that reports state without a session keeps it; a new report replaces it; a release and a PTY exit each clear it; a Codex report takes the tab. Plus a "no opinion" case inclaude-resume.test.ts.--maxWorkers=2: 4,759 passed, 4 failed, 14 skipped. The 4 failures are timing assertions inpipe-client-latencyandorchestrator-final-reap, run while the machine was busy; both files pass in isolation (25/25).🤖 Generated with Claude Code