Pass inherited history visibility to the thread store (#62644)

## What changed

Add `InheritedHistoryVisibility` to `CreateThreadParams` and pass it through
prepared forks. `Full` is the default and remains the mode used by app-server
forks. `ModelContextOnly` requests that `list_turns` and `list_items` omit
inherited history. The local thread store rejects that mode as unsupported.

## Testing

Add a regression test that requests `ModelContextOnly` through a prepared fork
and checks that the local store's unsupported-operation error reaches the caller.

GitOrigin-RevId: de675d6b83ca610eca5a304b9622b312d64828f6
This commit is contained in:
Owen Lin
2026-11-20 02:02:55 +00:00
committed by copyberry
parent 983feef7a1
commit 10ca17496f
30 changed files with 121 additions and 5 deletions
@@ -5906,7 +5906,11 @@ impl ThreadRequestProcessor {
};
let new_thread = if let Some(prepared_fork) = prepared_fork {
self.thread_manager
.fork_prepared_thread(fork_options, prepared_fork)
.fork_prepared_thread(
fork_options,
prepared_fork,
codex_thread_store::InheritedHistoryVisibility::Full,
)
.await
} else {
self.thread_manager