Repository navigation
Restore checkpoints by stable message ID #2738
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Script executed:
Repository: Zoo-Code-Org/Zoo-Code
Length of output: 31846
Script executed:
Repository: Zoo-Code-Org/Zoo-Code
Length of output: 2274
Rewinding to a shared-timestamp user turn can drop an earlier API turn.
When the UI and API user turns share a timestamp and their IDs differ,
resolveApiCutoffIndexreturnsundefinedif the counts of matching turns differ. The rewind then uses the timestamp cutoff. That cutoff removes an earlier API user turn that shares the cutoff timestamp, while the UI keeps that turn. The model then loses context that the user still sees.The API user turn timestamps come from separate
Date.now()reads. Production turns can therefore differ by a millisecond. A shared timestamp is not guaranteed.The required behavior is that a rewind to a selected user turn keeps every earlier user turn in API history. Choose an alignment for unequal counts that meets this requirement. Do not fall back to the timestamp cutoff for this case.
Source: Path instructions