mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Record thread recovery candidates on managed daemon shutdown (#44299)
## What changed - Atomically save successfully persisted, loaded root thread IDs to `app-server-daemon/loaded-threads.json` during graceful managed shutdown, excluding ephemeral threads and threads pending unload. - Clear stale recovery state at startup and around daemon lifecycle operations, including explicit stops and fresh starts. - Probe support for `--managed-daemon` before launching managed app servers, and clear recovery state best-effort when launching older binaries. - Keep forced shutdown responsive while saving the snapshot and log snapshot failures without preventing shutdown. ## Testing Add coverage for snapshots after active turns finish, forced shutdown without a snapshot, excluded threads, snapshot write failures, and recovery-state cleanup for stops, fresh starts, and legacy launches. GitOrigin-RevId: 422dc32b85355510f7e4c57b7540597b47d9f0b2
This commit is contained in:
@@ -759,8 +759,8 @@ impl MessageProcessor {
|
||||
self.thread_processor.thread_created_receiver()
|
||||
}
|
||||
|
||||
pub(crate) async fn persist_daemon_threads(&self) {
|
||||
self.thread_processor.persist_daemon_threads().await
|
||||
pub(crate) async fn daemon_recovery_candidates(&self) -> Vec<String> {
|
||||
self.thread_processor.daemon_recovery_candidates().await
|
||||
}
|
||||
|
||||
pub(crate) async fn send_initialize_notifications_to_connection(
|
||||
|
||||
Reference in New Issue
Block a user