Help Center

Troubleshooting guides, common issues, and solutions. Can't find what you need? Contact our support team.

Quick Diagnostics

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

Authentication Issues

Critical

401 Unauthorized - Invalid API Key

Error: "Invalid or expired API key"

Your API key is either incorrect, expired, or revoked.

✓ Solution
  1. Verify your API key in the dashboard at chaozcode.com/app/settings
  2. Regenerate key if compromised: Dashboard → API Keys → Regenerate
  3. Check environment variable: echo $CHAOZCODE_API_KEY
  4. Ensure no trailing spaces or newlines in the 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")
Warning

403 Forbidden - Insufficient Permissions

Error: "You don't have permission to access this resource"

Your API key doesn't have the required scopes for this operation.

✓ Solution
  1. Check your key's scopes in Dashboard → API Keys → View Scopes
  2. Required scopes vary by endpoint:
    • read:memory - Search/retrieve memories
    • write:memory - Store memories
    • read:codebase - Analyze code
    • admin - Administrative actions
  3. Create a new key with required scopes if needed
Info

OAuth Token Expired

Error: "Token has expired. Please re-authenticate."

Your OAuth session token has expired (default: 24 hours).

✓ Solution
  1. Re-authenticate via OAuth flow
  2. Use refresh token if available:
    const newToken = await client.auth.refreshToken(refreshToken);
  3. For long-lived access, use API keys instead of OAuth

Connection Issues

Critical

Connection Timeout

Error: "ETIMEDOUT" or "Connection timed out"

Unable to establish connection to ChaozCode servers.

✓ Solution
  1. Check your internet connection
  2. Verify firewall isn't blocking outbound HTTPS (port 443)
  3. Check service status at status.chaozcode.com
  4. Try alternative endpoints if primary is down:
    # Alternative endpoint
    export CHAOZCODE_ENDPOINT=https://api2.chaozcode.com
  5. Increase timeout in SDK:
    const client = new ChaozCode({
      apiKey: 'your_key',
      timeout: 60000 // 60 seconds
    });
Warning

SSL/TLS Certificate Error

Error: "UNABLE_TO_VERIFY_LEAF_SIGNATURE" or "certificate has expired"

SSL certificate verification failed.

✓ Solution
  1. Update your system's CA certificates:
    # Ubuntu/Debian
    sudo apt update && sudo apt install ca-certificates
    
    # macOS
    brew install ca-certificates
  2. Check your system time is correct (certificates are time-sensitive)
  3. If using corporate proxy, ensure root CA is installed
  4. DO NOT disable SSL verification in production
Info

Proxy Configuration

Error: "ECONNREFUSED" behind corporate proxy

Requests failing when behind a corporate proxy.

✓ Solution
  1. Set proxy environment variables:
    export HTTPS_PROXY=http://proxy.company.com:8080
    export HTTP_PROXY=http://proxy.company.com:8080
    export NO_PROXY=localhost,127.0.0.1
  2. Configure in SDK:
    const client = new ChaozCode({
      apiKey: 'your_key',
      proxy: 'http://proxy.company.com:8080'
    });

Memory Spine Issues

Warning

Memory Search Returns No Results

Search queries return empty arrays despite having stored data

Semantic search not matching your stored memories.

✓ Solution
  1. Check if memories exist: memory_stats()
  2. Lower similarity threshold:
    const results = await client.memory.search({
      query: "your search",
      limit: 20,
      threshold: 0.3  // Lower = more results (default 0.7)
    });
  3. Try different query phrasing (semantic search is meaning-based)
  4. Check if memories have correct tags for filtering
  5. Verify embeddings were generated: Check memory.vector exists
Warning

Memory Store Failed

Error: "Failed to store memory" or storage silently fails

Memory couldn't be persisted to the database.

✓ Solution
  1. Check content size (max 100KB per memory)
  2. Verify ID format (alphanumeric, hyphens, underscores only)
  3. Check Memory Spine health:
    curl http://127.0.0.1:8788/health
    # Should return {"ok": true, "version": "0.4.0"}
  4. Check disk space on server
  5. Restart Memory Spine if needed:
    sudo systemctl restart memory-spine
Info

Duplicate Memories

Same content stored multiple times

Memory deduplication not catching duplicates.

✓ Solution
  1. Enable duplicate checking before store:
    // Check for duplicates first
    const isDupe = await client.memory.checkDuplicate(content, 0.85);
    if (!isDupe) {
      await client.memory.store({ content, tags });
    }
  2. Run deduplication:
    await client.memory.deduplicateBatch({ dry_run: false });
  3. Use consistent IDs for same content to prevent duplicates

Rate Limiting

Warning

429 Too Many Requests

Error: "Rate limit exceeded. Try again in X seconds."

You've exceeded your rate limit quota.

✓ Solution
  1. Check your current limits:
    // Response headers include rate limit info
    X-RateLimit-Limit: 100
    X-RateLimit-Remaining: 0
    X-RateLimit-Reset: 1706612400
  2. Implement exponential backoff:
    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;
        }
      }
    }
  3. Rate limits by tier:
    • Free: 100 requests/minute
    • Pro: 500 requests/minute
    • Enterprise: 2000+ requests/minute
  4. Upgrade plan for higher limits

Performance Issues

Warning

Slow Response Times

Queries taking longer than expected (>5 seconds)

Various factors can cause slow responses.

✓ Solution
  1. Reduce context size:
    // Use smaller context windows
    await client.query({
      prompt: "Your question",
      max_tokens: 2000,  // Reduce from 4000
      context_limit: 10  // Fewer memories
    });
  2. Use streaming for long responses:
    const stream = await client.query.stream({
      prompt: "Your question"
    });
    for await (const chunk of stream) {
      process.stdout.write(chunk);
    }
  3. Check your network latency to our servers
  4. Use regional endpoints if available
Info

High Memory Usage

Application using excessive RAM when using ChaozCode SDK

Large responses or memory leaks in client code.

✓ Solution
  1. Use streaming instead of buffering full responses
  2. Limit search results: limit: 10 instead of limit: 100
  3. Dispose of client instances properly:
    const client = new ChaozCode({ apiKey });
    try {
      // Use client
    } finally {
      await client.close();
    }
  4. Monitor with process.memoryUsage()

Integration Issues

Warning

VS Code Extension Not Working

Extension installed but features not responding

Configuration or connectivity issues with the VS Code extension.

✓ Solution
  1. Check extension is enabled: Extensions → ChaozCode → Enable
  2. Verify API key in settings: chaozcode.apiKey
  3. Reload VS Code window: Cmd/Ctrl + Shift + P → "Reload Window"
  4. Check output panel: View → Output → ChaozCode
  5. Update to latest version
Warning

GitHub Action Failing

ChaozCode action fails in CI pipeline

Secret configuration or permission issues.

✓ Solution
  1. Verify secret is set: Repository → Settings → Secrets → CHAOZCODE_API_KEY
  2. Check secret name matches workflow:
    - uses: chaozcode/action@v1
      with:
        api_key: ${{ secrets.CHAOZCODE_API_KEY }}  # Exact match
  3. Ensure workflow has required permissions
  4. Check action logs for specific error

Contact Support

Still need help? Our support team is here for you.

📧

Email Support

Get help within 24 hours

support@chaozcode.com
💬

Community Discord

Chat with developers

Join Discord
🐛

Bug Reports

Report issues on GitHub

GitHub Issues
📚

Documentation

Full API reference

View Docs