feat(app-server): always return limited thread history#20682
Merged
Conversation
68972fe to
1d0ead1
Compare
0f149c1 to
9e7312a
Compare
9e7312a to
37e00fd
Compare
pakrym-oai
approved these changes
May 4, 2026
37e00fd to
75e943e
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.
Why
Whenever we return a thread's history (turns and items) over app-server, always return the limited form as specified by the rollout policy
EventPersistenceMode::Limited, even if the thread was previously started withEventPersistenceMode::Extended.We're finding it is quite unscalable to be returning the extended history, so let's apply the same filtering logic of the rollout policy when we load and return the thread's history.
What Changed
ThreadItemhistory so onlyEventPersistenceMode::Limitedrollout items are replayed into API turns.thread/read,thread/resume,thread/fork,thread/turns/list, and rollback responses through the same filtered app-server history projection.thread/read,thread/fork, andthread/turns/list.Test Plan
cargo test -p codex-app-server limitedcargo test -p codex-app-server thread_shell_commandcargo test -p codex-app-server thread_readcargo test -p codex-app-server thread_rollbackcargo test -p codex-app-server thread_forkcargo test -p codex-app-server-protocol