fix: shell snapshot clean-up (#9155)

Clean all shell snapshot files corresponding to sessions that have not
been updated in 7 days
Those files should never leak. The only known cases were it can leak are
during non graceful interrupt of the process (`kill -9, `panic`, OS
crash, ...)
This commit is contained in:
jif-oai
2026-01-14 09:05:46 +00:00
committed by GitHub
parent 258fc4b401
commit 6fbb89e858
3 changed files with 215 additions and 16 deletions

View File

@@ -687,7 +687,7 @@ impl Session {
// Create the mutable state for the Session.
if config.features.enabled(Feature::ShellSnapshot) {
default_shell.shell_snapshot =
ShellSnapshot::try_new(&config.codex_home, &default_shell)
ShellSnapshot::try_new(&config.codex_home, conversation_id, &default_shell)
.await
.map(Arc::new);
}