Conversation
…e it
The 'restart & continue' button calls restartWithModel(a, a.model, { resume: true })
without resumeOptional, so when the recorded session can't be resumed - a stale
sessionId with no matching codex rollout file, or no sessionId at all - the flow
either aborts before touching anything (giveUpOnResume throws) or, worse, already
killed the live pty before discovering the resume target doesn't exist, leaving
the agent dead with no replacement process started.
The exact fallback path already exists and is already used one control over: the
per-agent model-switch dropdown passes resumeOptional: true precisely so
giveUpOnResume can fall back to a fresh, non-resumed spawn instead of throwing.
This wires the same flag into both restart & continue buttons (per-agent row and
the god/Michael row) so a stuck agent actually gets a fresh session instead of
being killed and abandoned.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
🚫 This PR is missing its before/after evidenceEvery pull request here has to show its work. Screenshots or a short screen recording, before the change and after it.
How to fix it: edit the description, keep the A bug fix with no visible surface still needs it: show the failing behaviour, then the same steps passing. A terminal recording is fine. Genuinely nothing to show — a CI tweak, a typo, a dependency bump? A maintainer can apply the |
3 tasks
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.
Summary
sessionId, or no matching rollout transcript for a codex-provider agent),giveUpOnResumeeither throws immediately (nosessionIdcase) or the flow has already killed the live pty before discovering the resume target doesn't exist (requireResumecase) — either way the agent ends up dead with no replacement process started.resumeOptional: truespecifically sogiveUpOnResumefalls back to a fresh, non-resumed spawn instead of throwing. This PR wires the same flag into the two restart buttons.Repro (what I hit)
Existing session could not be resumed; no replacement process was started.— and the agent is now dead with nothing running, requiring a full app restart to recover it (which has its own issues — see the companion PR for #single-instance-hard-exit).Fix
Two one-line changes, both purely additive (passing an already-supported option):
Test plan
npm run typecheckpassesnpm run buildsucceeds🤖 Generated with Claude Code
Before
Clicking "restart & continue" on a hung Codex-provider agent produced this error, with the process left dead and nothing replacing it (captured live tonight while diagnosing this exact bug):
This happened consistently, every time, on multiple different agents (confirmed on both a
codex-provider agent whose session transcript never flushed, and separately after manually clearing a stalesessionIdfromregistry.json, which changed the error to "No recorded session ID; current process was left running." - same outcome, still dead, still no replacement).After
Same button, same class of agent, after applying this fix (
resumeOptional: trueon both call sites) to a live install and rebuilding: clicking "restart & continue" on a Codex-provider agent (Darryl) completed cleanly - agent card showsidlewith no error text,ctx no status tick yet(i.e. a genuinely fresh session), zero residual error state. Repeated on a second agent with the same result.