From c8953ea0ec2af29666b20c376b75940f36e38b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Wed, 4 Nov 2026 03:02:31 +0100 Subject: [PATCH] Remove the hardcoded agent config binds --- src/agents.rs | 22 ---------------------- src/lib.rs | 1 - src/sandbox.rs | 5 ----- 3 files changed, 28 deletions(-) delete mode 100644 src/agents.rs diff --git a/src/agents.rs b/src/agents.rs deleted file mode 100644 index d6892c3..0000000 --- a/src/agents.rs +++ /dev/null @@ -1,22 +0,0 @@ -use std::env; -use std::path::PathBuf; - -pub fn agent_rw_paths() -> Vec { - let home = match crate::require_home() { - Ok(h) => PathBuf::from(h), - Err(_) => return vec![], - }; - - let candidates = [ - env::var("CLAUDE_CONFIG_DIR") - .map(PathBuf::from) - .unwrap_or_else(|_| home.join(".claude")), - env::var("CODEX_HOME") - .map(PathBuf::from) - .unwrap_or_else(|_| home.join(".codex")), - home.join(".pi"), - home.join(".claude.json"), - ]; - - candidates.into_iter().filter(|p| p.exists()).collect() -} diff --git a/src/lib.rs b/src/lib.rs index dd712be..1e5f208 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,3 @@ -mod agents; mod blacklist; pub mod cli; pub mod config; diff --git a/src/sandbox.rs b/src/sandbox.rs index 770d103..5126e14 100644 --- a/src/sandbox.rs +++ b/src/sandbox.rs @@ -3,7 +3,6 @@ use std::os::unix::process::CommandExt; use std::path::{Path, PathBuf}; use std::process::{Child, Command}; -use crate::agents; use crate::blacklist; use crate::env; use crate::persistent_tmp::PersistentTmpDirs; @@ -69,10 +68,6 @@ fn build_command( }; let command_line = BwrapCommandLine::add_to(&mut cmd)?; - for path in agents::agent_rw_paths() { - cmd.arg("--bind-try").arg(&path).arg(&path); - } - for spec in &config.extra_ro { add_ro_bind(&mut cmd, spec)?; }