diff --git a/src/config.rs b/src/config.rs index c2d409b..c76c4f8 100644 --- a/src/config.rs +++ b/src/config.rs @@ -445,6 +445,8 @@ pub struct SessionConfig { pub memory_file_count: usize, pub session_dir: PathBuf, pub app: AppConfig, + /// Disable background agents (surface, observe, scoring) + pub no_agents: bool, } /// A fully resolved model ready to construct an ApiClient. @@ -514,6 +516,7 @@ impl AppConfig { config_file_count, memory_file_count, session_dir, app: self.clone(), + no_agents: cli.no_agents, }) } diff --git a/src/mind/mod.rs b/src/mind/mod.rs index 8255bec..5c78a49 100644 --- a/src/mind/mod.rs +++ b/src/mind/mod.rs @@ -208,7 +208,9 @@ impl Session { self.update_status(); self.check_compaction(); - self.start_memory_scoring(); + if !self.config.no_agents { + self.start_memory_scoring(); + } self.drain_pending(); } @@ -803,15 +805,20 @@ pub async fn run(cli: crate::user::CliArgs) -> Result<()> { let (turn_tx, mut turn_rx) = mpsc::channel::<(Result, StreamTarget)>(1); + let no_agents = config.no_agents; let mut session = Session::new(agent, config, ui_tx.clone(), turn_tx); session.update_status(); - session.start_memory_scoring(); // also sends initial agent snapshots + if !no_agents { + session.start_memory_scoring(); // also sends initial agent snapshots + } session.send_context_info(); // Start observation socket let socket_path = session.config.session_dir.join("agent.sock"); let (observe_input_tx, mut observe_input_rx) = observe::input_channel(); - observe::start(socket_path, ui_tx.subscribe(), observe_input_tx); + if !no_agents { + observe::start(socket_path, ui_tx.subscribe(), observe_input_tx); + } let mut reader = EventStream::new(); diff --git a/src/user/mod.rs b/src/user/mod.rs index 7e4c3ef..97e6a22 100644 --- a/src/user/mod.rs +++ b/src/user/mod.rs @@ -693,6 +693,10 @@ pub struct CliArgs { #[arg(long)] pub dmn_max_turns: Option, + /// Disable background agents (surface, observe, scoring) + #[arg(long)] + pub no_agents: bool, + #[command(subcommand)] pub command: Option, }