diff --git a/src/agent/identity.rs b/src/agent/identity.rs index ec8c1ad..723c975 100644 --- a/src/agent/identity.rs +++ b/src/agent/identity.rs @@ -103,7 +103,7 @@ fn load_memory_files(cwd: &Path, memory_project: Option<&Path>, context_groups: } ContextSource::File => { for key in &group.keys { - let filename = format!("{}.md", key); + let filename = if key.ends_with(".md") { key.clone() } else { format!("{}.md", key) }; if let Some(content) = read_nonempty(&config_dir.join(&filename)) { memories.push((key.clone(), content)); } else if let Some(content) = load_memory_file(&filename, project.as_deref(), &global) {