[codex] Fix fork --last cwd filtering#21089
Merged
canvrno-oai merged 2 commits intomainfrom May 5, 2026
Merged
Conversation
431d73d to
638b898
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #20945.
This keeps
codex fork --lastaligned with the neighboring latest-session lookup flows. The local fork path now uses the same cwd-scope helper asresume --last, which is also a small code cleanup around how this selection logic is shared.Credit to @chanwooyang1 for the report and for pointing out the narrow fix direction.
What changed:
fork --lastthrough the shared latest-session cwd filter.--allas the explicit opt-in for global latest-session selection.--all, and remote override filter semantics.Validation:
just fmt.git diff --check.fork --last,resume --last, and fork picker selection paths against the issue report.