Skip to main content

Quick Diagnostics

Before diving into specific issues, run these quick checks:

Installation & Setup Issues

Docker Compose Fails to Start

Symptoms:
  • Services won’t start
  • Exit code errors
  • Container crashes immediately
Common Causes:
Check:
Solution:
Check which ports are in use:
Solution - Kill conflicting processes:
Solution - Change Shannon ports: Edit docker-compose.yml to use different ports:
Check Docker resources:
Solution - Increase Docker resources:
  • macOS: Docker Desktop → Preferences → Resources
    • RAM: Minimum 8GB (16GB recommended)
    • CPUs: Minimum 4 cores
    • Disk: Minimum 20GB free
  • Linux: Edit Docker daemon config
Error: WARNING: The OPENAI_API_KEY variable is not setSolution:
Error: python_wasi/bin/python3.11: No such file or directorySolution:

API & Connection Issues

401 Unauthorized

Symptoms:
  • HTTP 401 responses
  • “Unauthorized” error messages
Diagnosis:
Edit .env:
Restart:
Test:
Request with API key:
Python SDK:

Connection Refused / Service Unavailable

Symptoms:
  • connection refused
  • dial tcp: connect: connection refused
  • Services not responding
Diagnosis:
Wait for all services to initialize:
Typical startup time: 30-60 seconds
Check for crash errors:
Restart crashed service:
Full reset if needed:
Check PostgreSQL:
Solution:

Task Stuck in RUNNING or QUEUED State

Symptoms:
  • Task never completes
  • Status remains RUNNING for hours
  • No progress updates
Diagnosis:
Check LLM service logs:
Solution:
Restart Temporal workers:
Force workflow termination (last resort):
Check circuit breaker status:
Circuit breakers protect against cascading failures:
  • LLM Service circuit breaker
  • Database circuit breaker
  • Redis circuit breaker
Solution - Wait for automatic recovery (30-60 seconds) Or restart services:

Budget & Cost Issues

Budget Exceeded Errors

Symptoms:
  • budget exceeded error
  • Tasks fail with cost limit errors
  • HTTP 429 (Rate Limited) Payment Required
Diagnosis:
Edit .env:
Restart:
Budgets are configured server-side via environment variables. The SDK does not accept per-request budget parameters.
Cost comparison:
  • Simple: 1 LLM call, $0.01-0.05
  • Standard: 3-5 LLM calls, $0.05-0.20
  • Advanced: 10+ LLM calls, $0.20-1.00+
⚠️ Warning: Only for development/testingEdit .env:
Restart:

Performance Issues

Slow Response Times

Symptoms:
  • Tasks take 2-3x longer than expected
  • High latency
  • Timeouts
Diagnosis:
Check resources:
Increase Docker resources:
  • macOS: Docker Desktop → Resources → increase RAM to 16GB, CPUs to 6
  • Linux: More powerful machine or reduce concurrent workflows
Tune worker concurrency in .env:
First request is always slower (10-30s)Subsequent requests use caching:
  • LLM response cache (Redis)
  • Session context cache
  • Tool result cache
Solution: Warm up with a test request
Increase pool size in .env:
Restart:

Tokens > 0 but empty result

Symptoms:
  • Database or logs show non‑zero completion tokens, but the final result text is empty.
  • Complex prompts return nothing while simple prompts work.
Cause:
  • Some GPT‑5 chat responses return content as structured parts instead of a plain string. Older parsing could miss the text. This is fixed by routing GPT‑5 models via the Responses API and defensively normalizing content for chat responses.
Fix (Shannon ≥ 2025‑11‑05):
  • LLM Service routes GPT‑5 models to the Responses API and prefers output_text when available.
  • Chat providers normalize content by joining text parts when a list is returned.
  • If you upgraded from an older build, restart the LLM Service to clear cached empty responses.
Verify:
  • Re‑run a long, multi‑paragraph prompt. result length should be > 0 and session history should include the assistant message.

High Memory Usage

Symptoms:
  • OOM (Out of Memory) errors
  • Container restarts
  • Swap usage high
Diagnosis:
Edit config/shannon.yaml or set env vars:
Restart:

Data & State Issues

Sessions Not Persisting

Symptoms:
  • Session context lost between requests
  • Agent doesn’t remember previous tasks
Diagnosis:
Check Redis status:
Restart Redis:
Test connection:
Sessions expire after 30 days by defaultIncrease TTL in .env:
Check session expiry:
Provide a stable session_id explicitly:

Database Migration Errors

Symptoms:
  • Table doesn’t exist errors
  • Column not found errors
  • Schema version mismatch
Solution:

Debugging Tools

Viewing Logs

Temporal UI

Access: http://localhost:8088 Features:
  • View all workflows
  • See execution history
  • Replay failed workflows
  • Terminate stuck workflows
  • Time-travel debugging
Usage:
  1. Navigate to Workflows
  2. Search by workflow ID (task ID)
  3. View execution history to see where it failed
  4. Check Activity logs for detailed errors

Prometheus Metrics

Key metrics:
  • tasks_submitted_total
  • tasks_completed_total
  • tasks_failed_total
  • llm_requests_total
  • circuit_breaker_state

Real-time Monitoring

For real-time views of task execution:
  • Use the Shannon Desktop App (Runs view and Run Details) for live event streams
  • Use Prometheus/Grafana for metrics once configured (see Monitoring concepts)

Getting Help

Installation Guide

Detailed setup instructions

API Documentation

Complete API reference

GitHub Issues

Report bugs or request features

Quick Reference Commands