Repository navigation
06 troubleshooting common issues
This guide covers the most frequently encountered problems when using the Coherence - Agentic Persona Mapping (APM) Framework v4.2.0 and their proven solutions.
Symptoms:
bash: /coherence: command not found
-bash: coherence: command not found
/coherence: No such file or directory
/coherence: command not found
Root Cause: Coherence native Claude Code slash commands are not properly installed or not in correct project directory.
Solution:
# Check Coherence APM installation
ls -la /mnt/c/Code/agentic-persona-mapping/.apm/
# Verify command files exist (67 total slash commands)
ls -la /mnt/c/Code/agentic-persona-mapping/.claude/commands/
ls /mnt/c/Code/agentic-persona-mapping/.claude/commands/ | wc -l # Should show 67
# Check coherence command specifically
ls -la /mnt/c/Code/agentic-persona-mapping/.claude/commands/coherence.md
# Ensure you're in the correct directory
cd /mnt/c/Code/agentic-persona-mappingPrevention:
- Always run commands from /mnt/c/Code/agentic-persona-mapping directory
- Ensure
.claude/commands/directory contains all 67 command files - Use
/coherenceas the primary activation command (not/coherence)
Symptoms:
/developer command runs but persona doesn't activate
/analyst command runs but persona doesn't activate
No TTS voice notification plays
Agent behaves like regular Claude instead of persona
Root Cause: Session management files missing, TTS not configured, or missing persona files.
Solution:
# Check session notes directory
ls -la /mnt/c/Code/agentic-persona-mapping/.apm/session_notes/
# Check persona files (11 total personas)
ls -la /mnt/c/Code/agentic-persona-mapping/.apm/agents/personas/
ls /mnt/c/Code/agentic-persona-mapping/.apm/agents/personas/ | grep -E "\.(md)$" | wc -l
# Check voice scripts for TTS
ls -la /mnt/c/Code/agentic-persona-mapping/.apm/agents/voice/
# Test TTS voice script manually
bash /mnt/c/Code/agentic-persona-mapping/.apm/agents/voice/speakDeveloper.sh "Testing voice"
bash /mnt/c/Code/agentic-persona-mapping/.apm/agents/voice/speakOrchestrator.sh "Testing orchestrator"
# Check TTS providers (5 available: system, piper, elevenlabs, discord, none)
ls -la /mnt/c/Code/agentic-persona-mapping/.apm/agents/scripts/tts-providers/Prevention:
- Always use
/coherencefirst to initialize the Coherence Orchestrator - Don't manually delete session files while agents are active
- Ensure TTS provider is properly configured
Symptoms:
Permission denied: /mnt/c/Code/agentic-persona-mapping/.apm/session_notes/
bash: /mnt/c/Code/agentic-persona-mapping/.apm/agents/voice/speak*.sh: Permission denied
Cannot create file: Operation not permitted
Root Cause: Incorrect file permissions on Coherence APM directories or files.
Solution:
# Fix directory permissions
chmod -R 755 /mnt/c/Code/agentic-persona-mapping/.apm/
chmod +x /mnt/c/Code/agentic-persona-mapping/.apm/agents/voice/*.sh
# Fix session notes permissions
chmod 755 /mnt/c/Code/agentic-persona-mapping/.apm/session_notes/
chmod 644 /mnt/c/Code/agentic-persona-mapping/.apm/session_notes/*.md
# Fix command permissions
chmod 644 /mnt/c/Code/agentic-persona-mapping/.claude/commands/*.md
# Fix TTS provider scripts
chmod +x /mnt/c/Code/agentic-persona-mapping/.apm/agents/scripts/tts-providers/*.shPrevention:
- Run Coherence native Claude Code slash commands from proper directory with appropriate permissions
- Don't use
sudounless specifically required in WSL environment
Symptoms:
Commands execute but no audio feedback
Silent operation when voice should play
"espeak not found" or TTS provider errors
Persona activation without voice confirmation
Root Cause: TTS provider not properly configured or installed.
Solution:
Check TTS Provider Configuration (5 providers available):
# Check available TTS providers
ls -la /mnt/c/Code/agentic-persona-mapping/.apm/agents/scripts/tts-providers/
# Should show: discord.sh, elevenlabs.sh, none.sh, piper.sh, system.sh
# Test system TTS provider (default)
bash /mnt/c/Code/agentic-persona-mapping/.apm/agents/scripts/tts-providers/system.sh "Test message"
# Test specific voice scripts
bash /mnt/c/Code/agentic-persona-mapping/.apm/agents/voice/speakOrchestrator.sh "Orchestrator test"
bash /mnt/c/Code/agentic-persona-mapping/.apm/agents/voice/speakDeveloper.sh "Developer test"
bash /mnt/c/Code/agentic-persona-mapping/.apm/agents/voice/speakAnalyst.sh "Analyst test"Configure TTS System:
# For Linux/WSL - Install espeak
sudo apt-get install espeak espeak-data
# For macOS - Test built-in say command
say "Testing voice"
# For Windows/WSL - Use Piper TTS or configure system TTS
bash /mnt/c/Code/agentic-persona-mapping/.apm/agents/scripts/tts-providers/piper.sh "Test"
# If TTS fails, use none provider to disable
bash /mnt/c/Code/agentic-persona-mapping/.apm/agents/scripts/tts-providers/none.shPrevention:
- Test TTS providers during Coherence APM setup
- Configure fallback to 'none' provider for silent environments
- Use Piper TTS for reliable cross-platform audio
Symptoms:
Cannot read session notes
Session context lost between commands
"No such file or directory" for session files
Coherence orchestrator fails to initialize
Root Cause: Session management directory structure missing or corrupted.
Solution:
# Check session structure
ls -la /mnt/c/Code/agentic-persona-mapping/.apm/session_notes/
# Check for existing sessions
ls -la /mnt/c/Code/agentic-persona-mapping/.apm/session_notes/*.md
# Check pre-compact archives
ls -la /mnt/c/Code/agentic-persona-mapping/.apm/session_notes/pre_compact_archive/
# Create new session with proper timestamp format
echo "# Coherence APM Session Recovery - $(date '+%Y-%m-%d %H:%M:%S')" > \
"/mnt/c/Code/agentic-persona-mapping/.apm/session_notes/$(date '+%Y-%m-%d-%H-%M-%S')-Recovery-Session.md"
# Test Coherence initialization
cd /mnt/c/Code/agentic-persona-mapping
/coherencePrevention:
- Don't manually delete session directories
- Use proper commands to manage sessions
- Sessions are automatically archived by Coherence system
Symptoms:
/handoff command doesn't switch personas
/developer, /analyst, /architect commands fail to activate
Agents don't preserve context during handoffs
Multiple agents responding simultaneously
Root Cause: Session state corruption, improper persona activation, or missing persona files.
Solution:
# Check available personas (11 total)
ls -la /mnt/c/Code/agentic-persona-mapping/.apm/agents/personas/
ls /mnt/c/Code/agentic-persona-mapping/.apm/agents/personas/*.md | wc -l # Should be 11+
# Check command availability (67 total slash commands)
ls /mnt/c/Code/agentic-persona-mapping/.claude/commands/*.md | wc -l # Should be 67
# Test specific persona commands
cd /mnt/c/Code/agentic-persona-mapping
/developer # Should activate Developer persona
/analyst # Should activate Analyst persona
/architect # Should activate Architect persona
# If handoff fails, restart Coherence
/coherence # Primary orchestrator activationPrevention:
- Always use
/coherenceto initialize the orchestrator first - Use direct persona commands (/developer, /analyst, etc.) instead of /handoff
- Ensure you're in the correct project directory
Symptoms:
Commands take unusually long to execute
High CPU usage during simple operations
Memory usage grows over time
System becomes unresponsive
Root Cause: Resource leaks, large log files, or system constraints.
Solution:
# Check system resources
top -p $(pgrep -f apm)
df -h {{APM_ROOT}}
# Clean up large files
find {{APM_ROOT}}/session_notes/ -size +10M -ls
find {{APM_ROOT}}/logs/ -size +10M -delete
# Archive old sessions
mv {{APM_ROOT}}/session_notes/*.md {{APM_ROOT}}/session_notes/archive/
# Restart APM cleanly
/wrap
/coherencePrevention:
- Regularly archive old session notes
- Monitor disk space usage
- Use
/wrapto clean up sessions periodically
Symptoms:
"Config file not found" errors
Environment variables not recognized
Path resolution failures
Root Cause: Missing or malformed configuration files.
Solution:
# Check configuration files
ls -la {{APM_ROOT}}/config/
cat {{APM_ROOT}}/config/apm.json
# Validate JSON configuration
python -m json.tool {{APM_ROOT}}/config/apm.json
# Reset to default configuration
cp {{APM_ROOT}}/config/apm.json.default {{APM_ROOT}}/config/apm.json
# Verify environment variables
env | grep APM
env | grep PROJECTPrevention:
- Always backup configuration files before editing
- Use JSON validation tools when editing config files
Symptoms:
"No such file or directory" for existing files
Commands work in some directories but not others
Inconsistent behavior across different projects
Root Cause: Incorrect path configuration or environment variables.
Solution:
# Check current paths
echo "APM_ROOT: $APM_ROOT"
echo "PROJECT_ROOT: $PROJECT_ROOT"
echo "PWD: $(pwd)"
# Verify path variables in configuration
grep -r "APM_ROOT\|PROJECT_ROOT" {{APM_ROOT}}/config/
# Reset paths
export APM_ROOT="{{APM_ROOT}}"
export PROJECT_ROOT="{{PROJECT_ROOT}}"
# Test path resolution
ls -la $APM_ROOT/agents/
ls -la $PROJECT_ROOT/.apm/Prevention:
- Set environment variables in your shell profile
- Use absolute paths in configuration files
Symptoms:
native Claude Code slash commands don't respect .gitignore
Session notes accidentally committed
Permission conflicts with git operations
Root Cause: Incorrect .gitignore configuration or file permissions.
Solution:
# Check .gitignore
cat {{PROJECT_ROOT}}/.gitignore | grep -E "(apm|session|\.apm)"
# Add APM exclusions
echo ".apm/session_notes/*.md" >> {{PROJECT_ROOT}}/.gitignore
echo ".apm/state/" >> {{PROJECT_ROOT}}/.gitignore
# Remove accidentally committed files
git rm --cached .apm/session_notes/*.md
git commit -m "Remove APM session files from git"
# Fix permissions
chmod 644 {{PROJECT_ROOT}}/.gitignorePrevention:
- Configure .gitignore before first APM use
- Keep session notes and temporary files out of version control
# APM structure validation
ls -la {{APM_ROOT}}/agents/ {{APM_ROOT}}/session_notes/ {{PROJECT_ROOT}}/.apm/
# Permission check
find {{APM_ROOT}} -type f -name "*.sh" -not -executable
# Configuration validation
python -m json.tool {{APM_ROOT}}/config/apm.json >/dev/null && echo "Config OK"# Environment variables
env | grep -E "(APM|PROJECT)_ROOT"
# Path accessibility
[ -d "$APM_ROOT" ] && echo "APM_ROOT accessible" || echo "APM_ROOT missing"
[ -d "$PROJECT_ROOT" ] && echo "PROJECT_ROOT accessible" || echo "PROJECT_ROOT missing"
# Command availability
which espeak 2>/dev/null && echo "espeak available"
which say 2>/dev/null && echo "say available"# Check for recent errors
tail -n 50 {{APM_ROOT}}/logs/apm.log | grep -i error
# Session management logs
ls -lt {{APM_ROOT}}/session_notes/ | head -5
# Voice script logs (if available)
tail -n 20 {{APM_ROOT}}/logs/voice.logContact support or check advanced troubleshooting if:
- Multiple solutions from this guide don't resolve the issue
- You encounter data corruption or loss
- Security-related errors appear
- System-wide impacts are observed
- The problem affects multiple users or projects
- Installation Issues - Setup and deployment problems
- Performance Issues - System performance optimization
- Agent Issues - Agent-specific troubleshooting
- Diagnostic Tools - Advanced debugging utilities
Last Updated: 2025-08-19 Coherence APM Framework v4.2.0 - Enhanced TTS Audio Experience