Repository navigation
fix(daemon): pass -C with the seat's directory on Codex resume and fork - #15
Merged
Merged
Conversation
A Codex resume carried no -C, so a seat whose saved directory differs from the one its conversation was recorded in (rig seat set-cwd, then a restore or relaunch) met Codex's own "Working directory" picker, which OpenRig does not recognize, and the seat ended attention_required. The fresh launch already passes -C <cwd>. Both resume builders (the launch adapter's resumeCore, which restart --keep-conversation also uses with the observed process cwd, and the legacy CodexResumeAdapter) now add -C <cwd>, shell-quoted as the fresh launch does, after the conversation id so a process listing still reads the id from a path with a space. Codex 0.171.0 then resumes the same conversation in the new directory with no prompt; --last selects within that directory, as it did from the pane's cwd. The displayed recovery command is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A Codex fork had the same gap as a resume: forking a parent recorded in another directory (a handover by fork after rig seat set-cwd) shows Codex's "Working directory" picker, verified with Codex 0.171.0. The fork now adds -C <cwd> after the parent id, as the fresh launch and resume do, so the fork proof still reads the id from a path with a space. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The set-cwd help and the agent startup guide said a Claude resume in the new directory may not find the conversation and that cross-directory resume had not been run natively. Run natively, Claude Code 2.1.331 resumes (and forks) a conversation recorded in another directory by id, and Codex 0.171.0 does with -C, which OpenRig now passes on resume and fork. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rectory Codex launched with -C works in that directory while its process cwd stays the launcher's (checked natively with Codex 0.171.0), so the observed cwd isn't always where the running Codex works. rig seat restart --keep-conversation now names the running Codex's -C (relative to its cwd) on the relaunch, and the observed directory only when it had none. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.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.
What a user gets
A Codex seat whose saved directory differs from the one its conversation was recorded in (after
rig seat set-cwd, then a restore,rig down/rig upor a fork handover) no longer stops at Codex's "Working directory" picker and endsattention_required. Resume, the older restore path and fork now pass-C <seat cwd>, as the fresh launch does; in-place restart relaunches in the running Codex's-Cdirectory. The set-cwd help and startup guide no longer claim a Claude resume in a new directory may lose the conversation (Claude 2.1.331 resumes it).How you verified it
Native Codex 0.171.0 in a throwaway
CODEX_HOME: the picker appears without-Cand not with it, for resume and fork. Native Claude 2.1.331 resume from another directory loads the conversation. 626/627 focused daemon tests pass on the code commits; lint passes. Upstream (code commits only): mvschwarz#3892. Fullnpm run ci:localon the exact head, published aslocal-ci.🤖 Generated with Claude Code