Migration & Troubleshooting Guide: AI Development Tools
Recovery & Migration Handbook ⚡
Fix docs errors → Migrate from other AI tools → Resolve integration conflicts
Complete troubleshooting for VSCode + Claude + Hermes + Mobile setups
🚨 Emergency Fixes (Start Here If Broken)
"Docs Error" Troubleshooting
Common Symptoms:
- VSCode extensions fail to load
- Claude Desktop can't connect to MCP servers
- Hermes commands return "permission denied" or "module not found"
- Mobile SSH connections timing out
Quick Diagnostic:
# Run full system health check hermes doctor # Check specific components hermes config validate hermes mcp list hermes gateway status curl -f http://localhost:8000/health || echo "MCP server down" # VSCode diagnostics code --list-extensions --show-versions code --disable-extensions # Safe mode test
Immediate Recovery Steps:
# 1. Reset Hermes to known good state hermes config reset --confirm hermes update # Get latest version hermes setup # Re-run setup wizard # 2. Restart all services pkill -f "hermes" hermes gateway start hermes mcp serve --daemon # 3. VSCode: Reset workspace # Ctrl+Shift+P → "Developer: Reload Window" # If still broken: uninstall all AI extensions, restart, reinstall one by one
Configuration File Recovery
Backup Critical Configs:
# Create recovery snapshot before changes mkdir -p ~/ai-dev-backup/$(date +%Y%m%d) cp -r ~/.hermes ~/ai-dev-backup/$(date +%Y%m%d)/hermes cp ~/.claude/claude_desktop_config.json ~/ai-dev-backup/$(date +%Y%m%d)/ 2>/dev/null || true cp ~/.vscode/settings.json ~/ai-dev-backup/$(date +%Y%m%d)/ 2>/dev/null || true
Known Good Configuration Templates:
Minimal Hermes config.yaml:
# ~/.hermes/config.yaml - minimal working config
providers:
nous:
api: https://api.nousresearch.com/v1
model:
provider: nous
name: hermes-3-llama-3.1-405b
display:
interface: cli
skin: default
mcp:
enabled: true
port: 8000
gateway:
enabled: false # Start disabled, enable after testing
Minimal Claude Desktop config:
{
"mcpServers": {
"hermes": {
"command": "/usr/local/bin/hermes",
"args": ["mcp", "serve"]
}
},
"globalShortcut": "Cmd+Shift+.",
"theme": "dark",
"allowRemoteResources": true
}
🔄 Migration Pathways
From Claude Code → Hermes Agent
Automated Migration:
# Import existing Claude Code setup hermes import-agent claude-code # What gets migrated: # ✅ ~/.claude/claude_desktop_config.json → ~/.hermes/config.yaml (MCP servers) # ✅ ~/.claude/instructions.md → ~/.hermes/SOUL.md # ✅ ~/.claude/context_files → ~/.hermes/skills/ # ✅ API keys → ~/.hermes/.env # ❌ Chat history (not portable)
Manual Migration (if automated fails):
# 1. Export Claude Code MCP servers cat ~/.claude/claude_desktop_config.json | jq '.mcpServers' # 2. Convert to Hermes format hermes config set mcp_servers.filesystem.command "npx" hermes config set mcp_servers.filesystem.args '"-y" "@modelcontextprotocol/server-filesystem" "/home/user/projects"' # 3. Migrate instructions cp ~/.claude/instructions.md ~/.hermes/SOUL.md # 4. Test migration hermes chat -q "List available tools" | grep -i filesystem
From Codex CLI → Hermes Agent
Semi-Automated Migration:
# Import Codex setup (limited support)
hermes import-agent codex
# Manual steps for advanced configs:
# 1. Copy API keys
grep -r "api_key" ~/.codex/ > codex-keys.txt
# Add to ~/.hermes/.env manually
# 2. Migrate custom commands
find ~/.codex/commands/ -name "*.json" -exec cat {} \; | \
jq -r '.name + ": " + .command' > codex-commands.txt
# Convert to Hermes skills manually
From Cursor → Hermes Agent
No Automated Migration (Manual Required):
# 1. Export Cursor settings cp ~/.cursor/settings.json cursor-settings.backup # 2. Extract relevant configs grep -E "(claude|mcp|api)" ~/.cursor/settings.json > cursor-ai-config.json # 3. Manually configure Hermes MCP in Cursor # Settings → Extensions → Claude Code → MCP Servers # Add: http://localhost:8000 (Hermes MCP endpoint)
🔧 Integration Conflict Resolution
VSCode Extension Conflicts
Common Conflict Scenarios:
- Multiple Claude extensions (official vs community)
- Hermes + Codex + Copilot competing for shortcuts
- MCP server port conflicts
- SSH Remote extension vs Termius confusion
Resolution Strategy:
# 1. List all AI/assistant extensions code --list-extensions | grep -E "(claude|codex|copilot|hermes|ai|assistant)" # 2. Disable all, enable one by one code --disable-extension ms-vscode.vscode-ai-toolkit code --disable-extension github.copilot # Test each individually # 3. Check for shortcut conflicts # File → Preferences → Keyboard Shortcuts # Search: "claude", "codex", "hermes" # Resolve conflicts by reassigning keys
MCP Server Port Conflicts
Diagnostic:
# Check what's using port 8000 sudo netstat -tlnp | grep :8000 sudo lsof -i :8000 # Kill conflicting processes sudo pkill -f "port.*8000" # Use alternative port hermes config set mcp.port 8001 # Update Claude config accordingly
SSH Configuration Conflicts
Common Issues:
- Multiple SSH agents conflicting
- Key authentication loops
- Mobile vs desktop key priority
Resolution:
# 1. Clean SSH agent
ssh-add -D # Remove all keys
ssh-add -l # List remaining keys
# 2. Add keys in priority order
ssh-add ~/.ssh/id_rsa # Primary desktop key
ssh-add ~/.ssh/mobile_key # Mobile key (lower priority)
ssh-add ~/.ssh/termius_key # Termius-generated key
# 3. Test authentication chain
ssh -vvv root@65.109.89.215 # Verbose output shows key attempts
# 4. Fix SSH config for mobile
# ~/.ssh/config
Host mainframe
HostName 65.109.89.215
User root
IdentityFile ~/.ssh/mobile_key
IdentitiesOnly yes
ServerAliveInterval 60
📱 Mobile-Specific Migration
Termius Profile Import/Export
Export from Desktop Termius:
# Termius Desktop: Settings → Export → All Data # Saves: hosts.json, keys.json, snippets.json # Manual import to mobile: # 1. Email yourself the export files # 2. Termius Mobile → Settings → Import → Select files
SSH Key Sync Issues:
# If keys don't sync between devices: # Method 1: Manual key copy # Desktop: copy ~/.ssh/id_rsa.pub # Mobile: Termius → Keychain → + → Import Key → Paste # Method 2: Generate fresh key on mobile # Termius Mobile → Keychain → + → Generate Key # Copy public key to server: ~/.ssh/authorized_keys # Method 3: Use Termius cloud sync (Premium feature) # Settings → Sync → Enable Cloud Sync
Mobile Development Environment Setup
Optimized Mobile Config:
# Server-side optimizations for mobile SSH sudo nano /etc/ssh/sshd_config # Add/modify: ClientAliveInterval 30 ClientAliveCountMax 6 TCPKeepAlive yes Compression yes # Mobile-friendly shell setup echo 'export TERM=xterm-256color' >> ~/.bashrc echo 'alias ll="ls -la"' >> ~/.bashrc echo 'alias h="hermes"' >> ~/.bashrc echo 'alias nano="nano -c"' >> ~/.bashrc # Show line numbers # Install mobile-friendly text editor sudo apt install micro # Better than nano on mobile
🛠 Advanced Recovery Procedures
Complete Environment Reset
Nuclear Option (when everything is broken):
#!/bin/bash # complete-reset.sh - Use when nothing else works # 1. Backup user data mkdir -p ~/recovery-backup/$(date +%Y%m%d-%H%M) cp -r ~/.hermes ~/recovery-backup/$(date +%Y%m%d-%H%M)/ 2>/dev/null || true cp -r ~/.claude ~/recovery-backup/$(date +%Y%m%d-%H%M)/ 2>/dev/null || true # 2. Remove all AI development tools code --uninstall-extension anthropic.claude-code code --uninstall-extension hermes.agent npm uninstall -g @openai/codex-cli rm -rf ~/.hermes ~/.claude ~/.cursor/ai-settings # 3. Clean install Hermes curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash # 4. Minimal setup hermes setup # Run setup wizard hermes config set display.interface cli hermes config set model.provider nous # 5. Test basic functionality hermes chat -q "Hello, are you working?"
Selective Component Recovery
Fix Only MCP Integration:
# Reset MCP without touching other configs hermes config unset mcp_servers hermes mcp catalog # Reinstall from catalog hermes mcp install filesystem hermes mcp install github # Test MCP independently hermes mcp serve --verbose & sleep 5 curl http://localhost:8000/health pkill -f "hermes mcp"
Fix Only VSCode Integration:
# Reset VSCode without touching terminal tools
code --disable-extensions
rm -rf ~/.vscode/extensions/anthropic*
rm -rf ~/.vscode/extensions/hermes*
# Reinstall essential extensions only
code --install-extension anthropic.claude-code
code --install-extension ms-vscode.remote-ssh
# Reset settings to minimal
cat > ~/.vscode/settings.json << 'EOF'
{
"claude.mcp.servers": {
"hermes": {
"command": "hermes",
"args": ["mcp", "serve"]
}
}
}
EOF
📊 Validation & Testing
Integration Test Suite
Run After Any Migration:
#!/bin/bash # integration-test.sh echo "🧪 Testing Hermes Agent integration..." # Test 1: Basic Hermes functionality echo "1. Testing Hermes basic functionality..." hermes chat -q "What's 2+2?" | grep -q "4" && echo "✅ Basic chat works" || echo "❌ Basic chat failed" # Test 2: MCP server echo "2. Testing MCP server..." timeout 5 hermes mcp serve & MCP_PID=$! sleep 2 curl -f http://localhost:8000/health && echo "✅ MCP server works" || echo "❌ MCP server failed" kill $MCP_PID 2>/dev/null # Test 3: VSCode extension echo "3. Testing VSCode extension..." code --list-extensions | grep -q "anthropic.claude-code" && echo "✅ Claude extension installed" || echo "❌ Claude extension missing" # Test 4: SSH connectivity (mobile) echo "4. Testing SSH connectivity..." ssh -o ConnectTimeout=5 -o BatchMode=yes root@65.109.89.215 "echo 'SSH works'" && echo "✅ SSH connectivity works" || echo "❌ SSH connectivity failed" # Test 5: Cross-tool integration echo "5. Testing cross-tool integration..." # This requires manual testing in VSCode + Claude Desktop echo " 🎯 Manual Tests Required: - Open VSCode → Ctrl+Shift+P → 'Claude: Chat' - Verify MCP connection in Claude Desktop - Test Termius mobile connection - Verify port forwarding from mobile "
Performance Monitoring
Monitor Integration Health:
# Create monitoring script for ongoing health checks
cat > ~/.local/bin/ai-dev-monitor << 'EOF'
#!/bin/bash
# ai-dev-monitor - Check AI development tool health
echo "=== AI Development Environment Health Check ==="
echo "Time: $(date)"
echo
# Hermes status
echo "🤖 Hermes Agent:"
hermes doctor --quiet && echo " ✅ Healthy" || echo " ❌ Issues detected"
# MCP server status
echo "🔗 MCP Server:"
curl -s http://localhost:8000/health >/dev/null && echo " ✅ Running" || echo " ❌ Down"
# SSH connectivity
echo "🔐 SSH Access:"
ssh -o ConnectTimeout=3 -o BatchMode=yes root@65.109.89.215 "exit" 2>/dev/null && echo " ✅ Connected" || echo " ❌ Failed"
# Disk space (important for Docker/logs)
echo "💾 Disk Space:"
df -h / | awk 'NR==2 {if ($5 < "80%") print " ✅ OK ("$5" used)"; else print " ⚠️ Low ("$5" used)"}'
echo
echo "Run 'hermes doctor' for detailed diagnostics"
EOF
chmod +x ~/.local/bin/ai-dev-monitor
# Run it
ai-dev-monitor
✅ Post-Migration Checklist
Immediate Verification (Day 1)
- [ ] Hermes chat works from terminal
- [ ] VSCode Claude extension connects
- [ ] Claude Desktop shows Hermes MCP tools
- [ ] Termius mobile SSH connection stable
- [ ] Basic AI assistance functions (code completion, chat)
Integration Testing (Week 1)
- [ ] Cross-platform file editing (mobile → desktop)
- [ ] AI tools can access project files via MCP
- [ ] Port forwarding enables mobile web access
- [ ] SSH key authentication works consistently
- [ ] No performance degradation from integrations
Production Readiness (Month 1)
- [ ] Backup/restore procedures tested
- [ ] Alternative access methods configured
- [ ] Monitoring and alerting operational
- [ ] Team members can replicate setup
- [ ] Documentation updated with lessons learned
Long-term Stability (Ongoing)
- [ ] Regular health checks automated
- [ ] Update procedures documented and tested
- [ ] Performance metrics tracked
- [ ] Incident response procedures ready
- [ ] New team member onboarding smooth
🆘 Emergency Contacts & Resources
When All Else Fails
# Emergency recovery command curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash -s -- --reset --force # Community support # GitHub Issues: https://github.com/NousResearch/hermes-agent/issues # Discord: https://discord.gg/hermes-agent # Documentation: https://hermes-agent.nousresearch.com/docs/ # Diagnostic data for support requests hermes doctor --export > hermes-diagnostic-$(date +%Y%m%d).txt
Migration Complete! ★ Your AI development environment should now be integrated and working across desktop and mobile platforms.
Pro Tip: Save the test scripts and monitoring commands - run them weekly to catch issues before they break your workflow.