Troubleshooting guides, common issues, and solutions. Can't find what you need? Contact our support team.
Run these commands to quickly diagnose common issues:
# Check system status
curl -s https://api.chaozcode.com/health | jq
# Verify API key
curl -s -H "Authorization: Bearer YOUR_API_KEY" https://api.chaozcode.com/v1/auth/verify
# Check Memory Spine status
curl -s http://127.0.0.1:8788/health
# View recent errors (CLI)
chaozcode logs --level error --limit 20
# Test connectivity
chaozcode diagnose
Error: "Invalid or expired API key"
Your API key is either incorrect, expired, or revoked.
chaozcode.com/app/settingsecho $CHAOZCODE_API_KEY# Test your key
curl -H "Authorization: Bearer YOUR_KEY" https://api.chaozcode.com/v1/auth/verify
# Common fix - remove newline
export CHAOZCODE_API_KEY=$(echo -n "your_key_here")
Error: "You don't have permission to access this resource"
Your API key doesn't have the required scopes for this operation.
read:memory - Search/retrieve memorieswrite:memory - Store memoriesread:codebase - Analyze codeadmin - Administrative actionsError: "Token has expired. Please re-authenticate."
Your OAuth session token has expired (default: 24 hours).
const newToken = await client.auth.refreshToken(refreshToken);
Error: "ETIMEDOUT" or "Connection timed out"
Unable to establish connection to ChaozCode servers.
status.chaozcode.com# Alternative endpoint
export CHAOZCODE_ENDPOINT=https://api2.chaozcode.com
const client = new ChaozCode({
apiKey: 'your_key',
timeout: 60000 // 60 seconds
});
Error: "UNABLE_TO_VERIFY_LEAF_SIGNATURE" or "certificate has expired"
SSL certificate verification failed.
# Ubuntu/Debian
sudo apt update && sudo apt install ca-certificates
# macOS
brew install ca-certificates
Error: "ECONNREFUSED" behind corporate proxy
Requests failing when behind a corporate proxy.
export HTTPS_PROXY=http://proxy.company.com:8080
export HTTP_PROXY=http://proxy.company.com:8080
export NO_PROXY=localhost,127.0.0.1
const client = new ChaozCode({
apiKey: 'your_key',
proxy: 'http://proxy.company.com:8080'
});
Search queries return empty arrays despite having stored data
Semantic search not matching your stored memories.
memory_stats()const results = await client.memory.search({
query: "your search",
limit: 20,
threshold: 0.3 // Lower = more results (default 0.7)
});
memory.vector existsError: "Failed to store memory" or storage silently fails
Memory couldn't be persisted to the database.
curl http://127.0.0.1:8788/health
# Should return {"ok": true, "version": "0.4.0"}
sudo systemctl restart memory-spine
Same content stored multiple times
Memory deduplication not catching duplicates.
// Check for duplicates first
const isDupe = await client.memory.checkDuplicate(content, 0.85);
if (!isDupe) {
await client.memory.store({ content, tags });
}
await client.memory.deduplicateBatch({ dry_run: false });
Error: "Rate limit exceeded. Try again in X seconds."
You've exceeded your rate limit quota.
// Response headers include rate limit info
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1706612400
async function withRetry(fn, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
return await fn();
} catch (err) {
if (err.status === 429) {
const wait = Math.pow(2, i) * 1000;
await new Promise(r => setTimeout(r, wait));
} else throw err;
}
}
}
Queries taking longer than expected (>5 seconds)
Various factors can cause slow responses.
// Use smaller context windows
await client.query({
prompt: "Your question",
max_tokens: 2000, // Reduce from 4000
context_limit: 10 // Fewer memories
});
const stream = await client.query.stream({
prompt: "Your question"
});
for await (const chunk of stream) {
process.stdout.write(chunk);
}
Application using excessive RAM when using ChaozCode SDK
Large responses or memory leaks in client code.
limit: 10 instead of limit: 100const client = new ChaozCode({ apiKey });
try {
// Use client
} finally {
await client.close();
}
process.memoryUsage()Extension installed but features not responding
Configuration or connectivity issues with the VS Code extension.
chaozcode.apiKeyCmd/Ctrl + Shift + P → "Reload Window"ChaozCode action fails in CI pipeline
Secret configuration or permission issues.
- uses: chaozcode/action@v1
with:
api_key: ${{ secrets.CHAOZCODE_API_KEY }} # Exact match
Still need help? Our support team is here for you.