---
actual_hours: null
assignees: []
created_at: '2025-08-21T23:45:13.251222'
dependencies: []
description: "## Engineering Task: Fix Critical Bugs in Claude MPM\n\nYou need to\
  \ fix multiple critical issues discovered during investigation:\n\n### Issue 1:\
  \ Path Import Error (PRIORITY 1 - BLOCKING)\n**Problem**: Runtime error \"name 'Path'\
  \ is not defined\"\n**Fix Required**: \n- Find where Path is used without import\n\
  - Add proper import: `from pathlib import Path`\n\n### Issue 2: Agent Deployment\
  \ Bug (PRIORITY 2 - CRITICAL)\n**Problem**: `claude-mpm agents deploy` doesn't create\
  \ `.claude/agents/` directory or deploy agents\n**Fix Required**:\n- Find the deployment\
  \ code\n- Fix bug preventing initial deployment\n- Ensure directory creation if\
  \ it doesn't exist\n- Ensure agents are properly copied\n\n### Issue 3: Memory File\
  \ Naming (PRIORITY 3)\n**Problem**: Memory files use hyphens but agents use underscores\n\
  - `data-engineer_memories.md` should be `data_engineer_memories.md`\n- `version-control_memories.md`\
  \ should be `version_control_memories.md`\n**Fix Required**: Rename files in `.claude-mpm/memories/`\
  \ to use underscores\n\n### Issue 4: Cleanup Test Memory Files (PRIORITY 3)\n**Remove\
  \ these test files**:\n- test_edge_cases_agent_memories.md\n- test_duplicate_agent_memories.md\
  \  \n- test_categorization_agent_memories.md\n- test_agent_memories.md\n- debug_duplicate_agent_memories.md\n\
  \n### Issue 5: Agent List Command Bug (PRIORITY 4)\n**Problem**: `claude-mpm agents\
  \ list --deployed` has KeyError for 'path' field\n**Fix Required**: Handle missing\
  \ 'path' field in list command\n\n### Implementation Requirements:\n- Fix issues\
  \ in priority order\n- Add proper error handling\n- Test each fix thoroughly\n-\
  \ Ensure backward compatibility\n- Follow project coding standards\n\n### Context:\n\
  - Working directory: /Users/masa/Projects/claude-mpm\n- All code changes should\
  \ follow the service-oriented architecture\n- Reference docs/STRUCTURE.md for file\
  \ organization\n- Use existing patterns in the codebase"
due_date: null
estimated_hours: null
id: TSK-0164
labels: []
metadata: {}
parent: null
priority: high
status: open
tags:
- bug-fix
- deployment
- memory-management
- cli
- path-handling
title: Fix multiple deployment and memory naming bugs
updated_at: '2025-08-21T23:45:13.251222'
---

# Fix multiple deployment and memory naming bugs

## Description
## Engineering Task: Fix Critical Bugs in Claude MPM

You need to fix multiple critical issues discovered during investigation:

### Issue 1: Path Import Error (PRIORITY 1 - BLOCKING)
**Problem**: Runtime error "name 'Path' is not defined"
**Fix Required**: 
- Find where Path is used without import
- Add proper import: `from pathlib import Path`

### Issue 2: Agent Deployment Bug (PRIORITY 2 - CRITICAL)
**Problem**: `claude-mpm agents deploy` doesn't create `.claude/agents/` directory or deploy agents
**Fix Required**:
- Find the deployment code
- Fix bug preventing initial deployment
- Ensure directory creation if it doesn't exist
- Ensure agents are properly copied

### Issue 3: Memory File Naming (PRIORITY 3)
**Problem**: Memory files use hyphens but agents use underscores
- `data-engineer_memories.md` should be `data_engineer_memories.md`
- `version-control_memories.md` should be `version_control_memories.md`
**Fix Required**: Rename files in `.claude-mpm/memories/` to use underscores

### Issue 4: Cleanup Test Memory Files (PRIORITY 3)
**Remove these test files**:
- test_edge_cases_agent_memories.md
- test_duplicate_agent_memories.md  
- test_categorization_agent_memories.md
- test_agent_memories.md
- debug_duplicate_agent_memories.md

### Issue 5: Agent List Command Bug (PRIORITY 4)
**Problem**: `claude-mpm agents list --deployed` has KeyError for 'path' field
**Fix Required**: Handle missing 'path' field in list command

### Implementation Requirements:
- Fix issues in priority order
- Add proper error handling
- Test each fix thoroughly
- Ensure backward compatibility
- Follow project coding standards

### Context:
- Working directory: /Users/masa/Projects/claude-mpm
- All code changes should follow the service-oriented architecture
- Reference docs/STRUCTURE.md for file organization
- Use existing patterns in the codebase

## Details
- **Status**: open
- **Priority**: high
- **Assignees**: None
- **Tags**: bug-fix, deployment, memory-management, cli, path-handling
- **Created**: 2025-08-21 23:45:13
- **Updated**: 2025-08-21 23:45:13

## Tasks
- [ ] Add task items here

## Notes
_Add any additional notes or context here._
