Add ~/.claude.json to agent paths and use --bind-try

This commit is contained in:
2026-03-20 20:41:24 +01:00
parent 50dafb4c37
commit 826c6d5531
2 changed files with 3 additions and 2 deletions

View File

@@ -15,7 +15,8 @@ pub fn agent_rw_paths() -> Vec<PathBuf> {
.map(PathBuf::from)
.unwrap_or_else(|_| home.join(".codex")),
home.join(".pi"),
home.join(".claude.json"),
];
candidates.into_iter().filter(|p| p.is_dir()).collect()
candidates.into_iter().filter(|p| p.exists()).collect()
}

View File

@@ -32,7 +32,7 @@ pub fn build_command(config: &SandboxConfig) -> Result<Command, SandboxError> {
}
for path in agents::agent_rw_paths() {
cmd.arg("--bind").arg(&path).arg(&path);
cmd.arg("--bind-try").arg(&path).arg(&path);
}
add_rw_bind(&mut cmd, &config.chdir)?;