-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Fix resume picker when user event appears after head #9512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix resume picker when user event appears after head #9512
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
bdd0914 to
5c62451
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
|
@jdsalasca, thanks for the contribution! |
Fixes #9501
Contributing guide: https://github.com/openai/codex/blob/main/docs/contributing.md
Summary
The resume picker requires a session_meta line and at least one user_message event within the initial head scan. Some rollout files contain multiple session_meta entries before the first user_message, so the user event can fall outside the default head window and the session is omitted from the picker even though it is resumable by ID.
This PR keeps the head summary bounded but extends scanning for a user_message once a session_meta has been observed. The summary still caps stored head entries, but we allow a small, bounded extra scan to find the first user event so valid sessions are not filtered out.
Changes
Why This Is Safe
Testing