fix(open): Reuse the prior session when resuming an open - #101
Merged
Merged
Conversation
Pass --resume through adoption and revive the matching open row so the launcher keeps the original session and run identity. Co-Authored-By: Codex <noreply@openai.com>
|
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.



codedeck open --resume <nativeId>created a new session row on every resume. The harness then got a newCODEDECK_RUN_ID, and since the agents pane filters by that run id, every worker dispatched before the resume disappeared from the orchestrator's view.Seen on a real run: orchestrator
8b3c(native id07e82648-…) dispatched worker29b6; reopening with--resume 07e82648-…produced a fresh row2a7awith no children.Now
openpassesresumetosession.adopt, and the daemon revives the most recently updatedopenrow with the same agent and native id: same id and run id, status back toworking, stale pid, completion and failure cleared, worktree/branch/baseCommit kept, and asession.startedevent appended. If that row is still alive under the same pid identity, adopt creates a new row as before instead of taking over a running session. No match, or no--resume, behaves as today.SessionStore.update/setStatusnow acceptnullfor pid, pidStartTime, completedAt, lastEvent and failure so a revival can clear them, and the store gainslistOpenByNativeId.Spec:
.specs/features/open-resume-linkage/spec.md(ORL-01 to ORL-07).Not covered: rows already orphaned are not relinked, and a
codedeck runworker still does not pass its run id to sessions it dispatches itself.Tests
npx vitest run tests/session-adopt.test.ts: 21 passednpx vitest run tests/open-action.test.ts tests/release-interrupted.test.ts tests/run-linkage.test.ts tests/session-store.test.ts: 49 passednpx tsc --noEmit: cleanresumepassthrough inopen.tsfailedpasses the resume value to session.adopt.