-
Notifications
You must be signed in to change notification settings - Fork 1
troubleshooting
Niladri Das edited this page Aug 19, 2025
·
1 revision
This guide helps you diagnose and fix common issues with Harper.
Error: Command not found: harper
harper: command not found
Solution:
- Ensure you've installed Harper:
cargo install --path . - Add Cargo's bin directory to your PATH:
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc source ~/.bashrc
Error: Failed to connect to API
Error: Failed to connect to API: Connection refused
Solution:
- Check your internet connection
- Verify your API key is correct
- Check if the API service is down
- If using a proxy, configure it:
export https_proxy=http://your-proxy:port
Error: Invalid API Key
Error: 401 Unauthorized - Invalid API key
Solution:
- Verify your API key in
~/.config/harper/config.toml - Ensure there are no extra spaces or special characters
- Regenerate your API key if needed
- Check your account's usage limits
Possible Causes:
- Network latency
- High server load
- Large context size
Mitigation:
[model]
max_tokens = 512 # Reduce max tokens
temperature = 0.3 # Lower for more focused responsesSymptoms:
- Application becomes unresponsive
- System slows down
Solution:
- Limit context size:
[context] max_history = 10 # Keep last 10 messages max_tokens = 4096 # Limit context tokens
- Close unused sessions
- Clear conversation history:
/clear_history
Error: Rate limit exceeded. Please try again in 20s
Solution:
- Wait before making more requests
- Upgrade your API plan if needed
- Implement exponential backoff
Error: Model 'gpt-5' does not exist
Solution:
- Check the model name spelling
- Verify the model is available in your region
- Update to the latest version of Harper
# Set log level
export RUST_LOG=debug
harperLogs are stored in:
- Linux/Mac:
~/.local/share/harper/logs/ - Windows:
%APPDATA%\harper\logs\
rm ~/.config/harper/config.toml
harper setuprm -rf ~/.cache/harpercd /path/to/harper
git pull
cargo install --path . --force/help
/help commands
/help config
If you can't resolve your issue:
- Check GitHub Issues
- Include:
- Harper version (
harper --version) - OS and version
- Steps to reproduce
- Error logs
- Configuration (with sensitive info removed)
- Harper version (