Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions codex-rs/core/src/guardian/review_session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ use crate::session::turn_context::TurnContext;
use codex_config::types::McpServerConfig;
use codex_features::Feature;
use codex_model_provider_info::ModelProviderInfo;
use codex_utils_absolute_path::AbsolutePathBuf;
use codex_utils_path_uri::PathUri;

use super::GUARDIAN_REVIEWER_NAME;
use super::GuardianApprovalRequest;
Expand Down Expand Up @@ -168,7 +168,7 @@ struct GuardianReviewSessionReuseKey {
base_instructions: Option<String>,
user_instructions: Option<UserInstructions>,
compact_prompt: Option<String>,
cwd: AbsolutePathBuf,
cwd: PathUri,
mcp_servers: Constrained<HashMap<String, McpServerConfig>>,
codex_linux_sandbox_exe: Option<PathBuf>,
main_execve_wrapper_exe: Option<PathBuf>,
Expand Down Expand Up @@ -196,7 +196,7 @@ impl GuardianReviewSessionReuseKey {
base_instructions: spawn_config.base_instructions.clone(),
user_instructions,
compact_prompt: spawn_config.compact_prompt.clone(),
cwd: spawn_config.cwd.clone(),
cwd: PathUri::from_abs_path(&spawn_config.cwd),
mcp_servers: spawn_config.mcp_servers.clone(),
codex_linux_sandbox_exe: spawn_config.codex_linux_sandbox_exe.clone(),
main_execve_wrapper_exe: spawn_config.main_execve_wrapper_exe.clone(),
Expand Down Expand Up @@ -1286,6 +1286,10 @@ mod tests {
/*user_instructions*/ None,
);

assert_eq!(
cached_reuse_key.cwd,
PathUri::from_abs_path(&cached_spawn_config.cwd)
);
assert_ne!(cached_reuse_key, next_reuse_key);
assert_eq!(
cached_reuse_key,
Expand Down
Loading