Troubleshooting
Common issues and solutions when using ccremote.
Installation Issues
Command Not Found
Problem: ccremote: command not found after installation.
Solutions:
Check installation:
bash# Verify ccremote is installed npm list -g ccremote # or bun pm ls -g | grep ccremoteCheck PATH:
bash# Check if npm/bun global bin is in PATH echo $PATH npm config get prefix # Should be in PATHRestart terminal: Close and reopen your terminal
Reinstall globally:
bashnpm uninstall -g ccremote npm install -g ccremoteUse npx as alternative:
bashnpx ccremote --version
Permission Errors
Problem: Permission denied errors during installation.
Solutions:
Use Node Version Manager (recommended):
bash# Install nvm curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash nvm install node npm install -g ccremoteFix npm permissions:
bash# Change npm default directory mkdir ~/.npm-global npm config set prefix '~/.npm-global' echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc source ~/.bashrcUse sudo (not recommended):
bashsudo npm install -g ccremote
tmux Issues
Problem: tmux commands fail or sessions don't start.
macOS Critical Issue ⚠️: macOS ships with tmux 3.3a which has critical bugs. Install latest version:
# Install latest tmux
brew install tmux
# Verify version (should be 4.0+)
tmux -VOther Solutions:
Install tmux:
bash# Ubuntu/Debian sudo apt install tmux # RHEL/CentOS sudo yum install tmux # macOS brew install tmuxCheck tmux is working:
bashtmux new-session -d -s test tmux list-sessions tmux kill-session -t testPermission issues:
bash# Check tmux server permissions ls -la /tmp/tmux-* # Kill tmux server and restart tmux kill-server
Configuration Issues
Configuration Not Loading
Problem: ccremote doesn't find or load configuration.
Debug Steps:
Check configuration locations:
bash# Show current config ccremote config --path # Check files exist ls -la ~/.ccremote.env ls -la ./ccremote.env ls -la ./.envVerify file format:
bash# Configuration should look like: CCREMOTE_DISCORD_BOT_TOKEN=your_token_here CCREMOTE_DISCORD_OWNER_ID=123456789012345678Check file permissions:
bashchmod 600 ~/.ccremote.envTest specific config file:
bashccremote --config ./ccremote.env config
Environment Variable Issues
Problem: Environment variables not working.
Solutions:
Check export syntax:
bash# Correct export CCREMOTE_DISCORD_BOT_TOKEN="your_token" # Incorrect (no spaces around =) export CCREMOTE_DISCORD_BOT_TOKEN = "your_token"Verify variables are set:
bashecho $CCREMOTE_DISCORD_BOT_TOKEN env | grep CCREMOTEMake variables persistent:
bash# Add to ~/.bashrc or ~/.zshrc echo 'export CCREMOTE_DISCORD_BOT_TOKEN="your_token"' >> ~/.bashrc source ~/.bashrc
Discord Issues
Bot Not Sending Messages
Problem: Discord bot doesn't send notifications.
Debug Steps:
Test Discord connection:
bashccremote test-discordCheck bot token:
- Verify token is correct and complete
- Check token hasn't expired
- Regenerate token if needed
Check user ID:
bash# Enable Developer Mode in Discord # Right-click profile → Copy User ID # Verify ID is all numbers, 17-19 digitsBot permissions:
- Bot needs "Send Messages" permission
- Check bot role permissions in server
- Re-invite bot with correct permissions
Direct message settings:
- Allow DMs from server members
- Bot must share a server with you
- Try sending bot a DM first
Bot Token Issues
Problem: Invalid or expired bot tokens.
Solutions:
Get new token:
- Go to Discord Developer Portal
- Select your application → Bot
- Click "Reset Token"
- Copy new token immediately
Check token format:
bash# Should start with MT and be ~70 characters # Example: MTExMjc4NzI4OTU5NTkzOTg5MQ.GvKZoP.xyz...Update configuration:
bash# Update token in config file ccremote init --force
Permission Errors
Problem: Discord API permission errors.
Solutions:
Re-invite bot:
- Developer Portal → OAuth2 → URL Generator
- Scopes:
bot - Permissions:
Send Messages - Use generated URL to re-invite
Check server permissions:
- Bot needs permission to send messages
- Check role hierarchy (bot role above restricted roles)
- Verify channel-specific permissions
Bot in correct server:
- Bot must be in at least one server with you
- If bot left server, re-invite it
Session Issues
Sessions Won't Start
Problem: ccremote start fails or sessions don't launch properly.
Debug Steps:
Check tmux access:
bashtmux new-session -d -s test-session tmux list-sessions tmux kill-session -t test-sessionVerify Claude Code access:
bash# Check Claude Code is available which claude claude --version # Test manual start claude --helpCheck session limits:
bash# List existing sessions ccremote list tmux list-sessions # Clean up old sessions if needed ccremote stop --session ccremote-1Resource issues:
bash# Check system resources df -h # Disk space free -m # Memory (Linux) top # CPU usage
Monitoring Not Working
Problem: ccremote doesn't detect patterns or send notifications.
Debug Steps:
Check session status:
bashccremote status --session ccremote-1Enable debug logging:
bashDEBUG=ccremote:* ccremote status --session ccremote-1 --watchVerify session output:
bash# Manually check tmux session tmux capture-pane -t ccremote-1 -pTest pattern detection:
- Manually trigger a usage limit in Claude Code
- Check if ccremote detects the pattern
- Verify notification is sent
Sessions End Unexpectedly
Problem: Sessions terminate without warning.
Debug Steps:
Check session logs:
bashccremote status --session ccremote-1tmux session logs:
bashtmux capture-pane -t ccremote-1 -pSystem resource limits:
bashulimit -a # Check process limits dmesg | tail # Check system messages (Linux)Claude Code issues:
- Check Claude Code version compatibility
- Verify authentication is still valid
- Test Claude Code outside of ccremote
Performance Issues
High Resource Usage
Problem: ccremote using too much CPU or memory.
Solutions:
Adjust polling interval:
bash# Reduce polling frequency (less CPU, slower detection) export CCREMOTE_MONITORING_INTERVAL=5000Limit concurrent sessions:
bash# Stop unused sessions ccremote list ccremote stop --session unused-session-idMonitor resource usage:
bash# Check ccremote processes ps aux | grep ccremote top -p $(pgrep -d',' -f ccremote)
Slow Response Times
Problem: ccremote is slow to detect patterns or send notifications.
Solutions:
Reduce polling interval:
bash# Faster polling (more CPU, faster detection) export CCREMOTE_MONITORING_INTERVAL=1000Check network connectivity:
bash# Test Discord API access ping discord.com curl -I https://discord.com/api/v10/gatewayOptimize patterns:
- Custom patterns should be efficient regex
- Avoid overly complex pattern matching
Network Issues
Discord API Errors
Problem: Network errors when connecting to Discord.
Solutions:
Check internet connection:
bashping discord.com curl -I https://discord.com/api/v10/gatewayFirewall/proxy issues:
- Check corporate firewall settings
- Configure proxy if needed:bash
export HTTP_PROXY=http://proxy:port export HTTPS_PROXY=https://proxy:port
DNS issues:
bash# Try different DNS nslookup discord.com 8.8.8.8
Rate Limiting
Problem: Discord API rate limiting errors.
Solutions:
Reduce notification frequency:
- ccremote handles rate limiting automatically
- Multiple rapid notifications may be delayed
Check bot usage:
- Make sure bot isn't used by other applications
- Each bot has separate rate limits
Advanced Troubleshooting
Enable Debug Mode
Get detailed information about what ccremote is doing:
# Enable all debug output
DEBUG=ccremote:* ccremote start --name debug-session
# Specific debug categories
DEBUG=ccremote:discord,ccremote:monitor ccremote start --name test
# Save debug output to file
DEBUG=ccremote:* ccremote start --name test 2>&1 | tee debug.logCheck Dependencies
Verify all dependencies are working:
# Node.js version
node --version # Should be >= 20.19.4
# tmux version
tmux -V # Should be >= 3.2 (4.0+ recommended for macOS)
# Claude Code access
which claude
claude --version
# Network connectivity
ping discord.com
curl -I https://discord.com/api/v10/gatewayClean Slate Restart
When all else fails, start fresh:
# Stop all ccremote sessions
ccremote list
# Stop each session individually
# Kill tmux server (⚠️ affects all tmux sessions)
tmux kill-server
# Remove configuration
rm ~/.ccremote.env ./ccremote.env
# Reinstall ccremote
npm uninstall -g ccremote
npm install -g ccremote
# Reinitialize
ccremote initSystem Information
Gather system info for bug reports:
# System info
uname -a
node --version
npm --version
tmux -V
# ccremote info
ccremote --version
ccremote config --path
# Process info
ps aux | grep ccremote
ps aux | grep tmux
# Network info
curl -I https://discord.com/api/v10/gatewayGetting Help
If you're still having issues:
Check existing issues: GitHub Issues
Create bug report with:
- System information (OS, Node.js, tmux versions)
- ccremote version
- Complete error messages
- Steps to reproduce
- Debug output if possible
Community help:
- GitHub Discussions
- Stack Overflow (tag:
ccremote)
Security issues: Email security issues privately rather than posting publicly
Remember to never share your Discord bot tokens or user IDs in public issues or forums.