Allow internal sessions to fork from selected history (#43495) · aaiyer/codex@9f70e34 · GitHub
Skip to content

Commit 9f70e34

Browse files
jif-oaicopyberry
authored andcommitted
Allow internal sessions to fork from selected history (openai#43495)
## What changed Add `ThreadManager::fork_internal_session` to start an internal session from caller-selected committed history without reading an in-flight parent turn or appending an interruption marker. Preserve parent authentication and budget sharing, and propagate fork lineage. Keep `spawn_internal_session` starting with fresh history. ## Testing Add a regression test verifying that the fork contains only the selected history, retains its parent association and authentication manager, and stays outside the public thread registry. GitOrigin-RevId: df4260ed3adfa0abe7a07c2b6d8b8c6ef6ba3d16
1 parent d0a8dcd commit 9f70e34

2 files changed

Lines changed: 102 additions & 1 deletion

File tree

‎codex-rs/core/src/thread_manager.rs‎

Lines changed: 31 additions & 1 deletion

‎codex-rs/core/src/thread_manager_tests.rs‎

Lines changed: 71 additions & 0 deletions

0 commit comments

Comments
 (0)