Lightweight coding agent that runs in your terminal
Rust
fix(core): don't update the file's mtime on resume (#9553)
Owen Linb0049ab644f9
diff --git a/codex-rs/core/src/rollout/recorder.rs b/codex-rs/core/src/rollout/recorder.rsindex 8c2efcf4e1..c5bd14b3c1 100644--- a/codex-rs/core/src/rollout/recorder.rs+++ b/codex-rs/core/src/rollout/recorder.rs@@ -1,12 +1,10 @@//! Persist Codex session rollouts (.jsonl) so sessions can be replayed or inspected later.use std::fs::File;-use std::fs::FileTimes;use std::fs::{self};use std::io::Error as IoError;use std::path::Path;use std::path::PathBuf;-use std::time::SystemTime;use codex_protocol::ThreadId;use codex_protocol::models::BaseInstructions;@@ -197,17 +195,14 @@ impl RolloutRecorder {}),)}- RolloutRecorderParams::Resume { path } => {- touch_rollout_file(&path)?;- (- tokio::fs::OpenOptions::new()- .append(true)- .open(&path)- .await?,- path,- None,- )- }+ RolloutRecorderParams::Resume { path } => (+ tokio::fs::OpenOptions::new()+ .append(true)+ .open(&path)+ .await?,+ path,+ None,+ ),};// Clone the cwd for the spawned task to collect git info asynchronously@@ -392,13 +387,6 @@ fn create_log_file(config: &Config, conversation_id: ThreadId) -> std::io::Resul})}-fn touch_rollout_file(path: &Path) -> std::io::Result<()> {- let file = fs::OpenOptions::new().append(true).open(path)?;- let times = FileTimes::new().set_modified(SystemTime::now());- file.set_times(times)?;- Ok(())-}-async fn rollout_writer(file: tokio::fs::File,mut rx: mpsc::Receiver<RolloutCmd>,