add --no-agents flag to disable background agents
Disables memory scoring, surface, and observe agents when set. Useful for testing with external backends (e.g. OpenRouter) where background agent traffic would be slow and unnecessary. Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
7123c9166d
commit
060ab10340
3 changed files with 17 additions and 3 deletions
|
|
@ -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<TurnResult>, 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();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue