diff --git a/crates/agent_ui/src/thread_metadata_store.rs b/crates/agent_ui/src/thread_metadata_store.rs index 1ba41cceb04cf9f6bd304ba49b7f87cd4153eab6..dfa60fa2551191ac022ea0394e03c08524546cb0 100644 --- a/crates/agent_ui/src/thread_metadata_store.rs +++ b/crates/agent_ui/src/thread_metadata_store.rs @@ -710,7 +710,7 @@ impl ThreadMetadataDb { self.write(move |conn| { let mut stmt = Statement::prepare( conn, - "INSERT INTO archived_git_worktrees(\ + "INSERT OR REPLACE INTO archived_git_worktrees(\ worktree_path, main_repo_path, branch_name, commit_hash\ ) VALUES (?, ?, ?, ?)", )?;