Troubleshooting
Common issues and solutions for GoClaw.
Quick Diagnostics
# Run with debug logging
make debug
# Check configuration
cat goclaw.json | jq .
# Check users
cat users.json | jq .
# Check Ollama
curl http://localhost:11434/api/tags
# Check SQLite database
sqlite3 ~/.goclaw/sessions.db ".tables"
Startup Issues
“failed to load config”
Symptoms: GoClaw exits immediately with config error
Solutions:
- Check
goclaw.jsonexists in working directory - Validate JSON syntax:
cat goclaw.json | jq . - Check file permissions
“failed to create LLM client”
Symptoms: Error about Anthropic client
Solutions:
- Check API key is set in
goclaw.json:{ "llm": { "providers": { "anthropic": { "driver": "anthropic", "apiKey": "sk-ant-..." } } } } - Verify API key is valid (not expired/revoked)
- Check for typos in the API key
“failed to create session manager”
Symptoms: Database initialization error
Solutions:
- Check SQLite path is writable:
touch ~/.goclaw/sessions.db - Check disk space
- Try removing corrupted database:
rm ~/.goclaw/sessions.db
Telegram Issues
Bot Not Responding
Symptoms: Messages sent to bot, no response
Checklist:
- Is Telegram enabled?
{"telegram": {"enabled": true}} - Is bot token correct?
- Is user authorized in
users.json? - Check logs for errors:
make debug 2>&1 | grep -i telegram
“unauthorized user”
Symptoms: Bot ignores messages from user
Solution: Add user to users.json:
{
"users": [
{
"name": "Alice",
"role": "owner",
"identities": [
{"provider": "telegram", "id": "YOUR_USER_ID"}
]
}
]
}
Find your user ID: message @userinfobot
Images Not Processing
Symptoms: Bot receives image but doesn’t process it
Solutions:
- Check media directory:
ls -la ~/.goclaw/media/ - Check file size (default max: 5MB)
- Check supported format (JPEG, PNG, GIF, WebP)
Ollama Issues
“Ollama not available”
Symptoms: Compaction/checkpoints fail, fallback to Anthropic
Solutions:
- Check Ollama is running:
curl http://localhost:11434/api/tags - Start Ollama:
ollama serve - Check URL in config matches Ollama address
“context deadline exceeded”
Symptoms: Ollama requests timeout
Solutions:
- Increase timeout:
{"session": {"summarization": {"ollama": {"timeoutSeconds": 600}}}} - Use smaller model (
qwen2.5:7binstead of14b) - Check Ollama server resources (CPU/GPU/memory)
“truncating input prompt”
Symptoms: Ollama truncates context
Solutions:
- Set explicit context size:
{"session": {"summarization": {"ollama": {"contextTokens": 131072}}}} - Use model with larger context
- Check model’s actual context limit:
ollama show qwen2.5:7b
Repeated “hash changed” Logs
Symptoms: Prompt cache constantly invalidating
Solution: This was a bug, fixed in recent versions. Update GoClaw.
Context/Compaction Issues
“prompt is too long”
Symptoms: LLM rejects request due to token limit
Solutions:
- Lower reserve tokens (triggers compaction earlier):
{"session": {"summarization": {"compaction": {"reserveTokens": 40000}}}} - Force compaction:
/compactin Telegram - Clear session:
/clearin Telegram
“compaction failed: session too short”
Symptoms: Manual compaction fails
Cause: Not enough messages to compact
Solution: This is normal for short sessions. Wait for more conversation.
Emergency Truncation Happening
Symptoms: “compaction failed, truncating session memory” messages
Causes:
- Ollama unavailable
- Anthropic fallback also failed
- No checkpoint available
Solutions:
- Check Ollama is running
- Check Anthropic API key valid
- Enable checkpoints for better recovery
- Background retry will attempt to regenerate summary
Memory Search Issues
“no results found”
Symptoms: Memory search returns empty
Solutions:
- Check files exist:
ls memory/ cat MEMORY.md - Lower minimum score:
{"memory": {"query": {"minScore": 0.2}}} - Check embedding model is loaded:
ollama list
Slow Search
Symptoms: Memory search takes >1 second
Solutions:
- Reduce indexed paths
- Use faster embedding model (
all-minilm) - Increase
minScoreto reduce results
Tool Errors
“path traversal detected”
Symptoms: File operations rejected
Cause: Path contains ../ attempting to escape workspace
Solution: Use absolute paths within workspace or relative paths without ../
“old_string is not unique”
Symptoms: Edit tool fails
Cause: The text to replace appears multiple times
Solution: Include more context in old_string to make it unique
“command timed out”
Symptoms: Exec tool fails after delay
Solutions:
- Increase timeout in tool call:
{"command": "long-running-cmd", "timeout_seconds": 120} - Run command in background
- Check if command is actually hanging
Performance Issues
High Memory Usage
Causes:
- Large session history
- Many indexed memory files
- Large workspace files cached
Solutions:
- Compact session:
/compact - Reduce memory search paths
- Lower prompt cache poll interval
Slow Responses
Causes:
- LLM latency
- Ollama on CPU (slow)
- Large context window
Solutions:
- Use faster model
- Enable GPU for Ollama
- Compact more aggressively (lower
reserveTokens)
Database Issues
Corrupted Database
Symptoms: SQLite errors, “database is locked”, “malformed”
Solutions:
- Stop GoClaw
- Try integrity check:
sqlite3 ~/.goclaw/sessions.db "PRAGMA integrity_check" - If corrupted, backup and recreate:
mv ~/.goclaw/sessions.db ~/.goclaw/sessions.db.bak # GoClaw will create new database on start
“database is locked”
Symptoms: Database operations fail
Causes:
- Multiple GoClaw instances
- Unclosed database connections
Solutions:
- Check for multiple processes:
pgrep -f goclaw - Kill duplicate processes
- Restart GoClaw
Logging
Enable Debug Logging
# Via make (recommended)
make debug
# Via flags
./goclaw gateway -d # Debug logging
./goclaw gateway -t # Trace logging (very verbose)
Log Levels
| Level | Use |
|---|---|
trace | Very verbose (cache hits, token counts) |
debug | Development details |
info | Normal operation |
warn | Potential issues |
error | Errors only |
Filter Logs
# Only errors
make debug 2>&1 | grep -E "ERRO|error"
# Specific component
make debug 2>&1 | grep compaction
# Exclude noise
make debug 2>&1 | grep -v "trace\|TRAC"
Getting Help
Information to Include
When reporting issues, include:
- GoClaw version:
./goclaw versionorgoclaw version - Go version:
go version - OS:
uname -a - Relevant config (redact secrets)
- Error messages (full log output)
- Steps to reproduce
Debug Checklist
- Running latest version?
- Config file valid JSON?
- API keys set and valid?
- Users file has your user ID?
- Ollama running (if configured)?
- Disk space available?
- No duplicate processes?
See Also
- Configuration - Config reference
- Deployment - Production setup
- Architecture - System internals