diff --git a/crates/g3-cli/src/agent_mode.rs b/crates/g3-cli/src/agent_mode.rs index 0532795..148df85 100644 --- a/crates/g3-cli/src/agent_mode.rs +++ b/crates/g3-cli/src/agent_mode.rs @@ -26,6 +26,7 @@ pub async fn run_agent_mode( safari: bool, chat: bool, include_prompt_path: Option, + no_auto_memory: bool, ) -> Result<()> { use g3_core::find_incomplete_agent_session; use g3_core::get_agent_system_prompt; @@ -210,9 +211,9 @@ pub async fn run_agent_mode( // Set agent mode for session tracking agent.set_agent_mode(agent_name); - // Auto-memory is always enabled in agent mode + // Auto-memory is enabled by default in agent mode (unless --no-auto-memory is set) // This prompts the LLM to save discoveries to project memory after each turn - agent.set_auto_memory(true); + agent.set_auto_memory(!no_auto_memory); // If resuming a session, restore context and TODO let initial_task = if let Some(ref incomplete_session) = resuming_session { diff --git a/crates/g3-cli/src/cli_args.rs b/crates/g3-cli/src/cli_args.rs index 720c1ec..47bf5a1 100644 --- a/crates/g3-cli/src/cli_args.rs +++ b/crates/g3-cli/src/cli_args.rs @@ -118,4 +118,8 @@ pub struct Cli { /// Include additional prompt content from a file (appended before memory) #[arg(long, value_name = "PATH")] pub include_prompt: Option, + + /// Disable automatic memory update reminder at end of agent mode + #[arg(long)] + pub no_auto_memory: bool, } diff --git a/crates/g3-cli/src/lib.rs b/crates/g3-cli/src/lib.rs index 9bf9df5..687dd5c 100644 --- a/crates/g3-cli/src/lib.rs +++ b/crates/g3-cli/src/lib.rs @@ -90,6 +90,7 @@ pub async fn run() -> Result<()> { cli.safari, cli.chat, cli.include_prompt.clone(), + cli.no_auto_memory, ) .await; }