Debugging
Diagnosing a running Mellow instance.
Debugging
Logs
- Set
LOG_LEVEL=debugfor verbose structured logs (slog). - Set
LOG_CHANNEL_IDto mirror gateway connect/disconnect, guild join/leave, and startup events into a Discord channel. /tools logs(owner-only) shows recentSystemLogrows, filterable by type.
Owner commands
/debug database- is the database reachable, and what do the counts look like./debug ai- is the Anthropic key valid and the AI enabled./debug version- what build is running./tools status- uptime, shard count, memory.
Common checks
| Symptom | Look at |
|---|---|
| Commands missing | Global propagation can take up to an hour; owner commands only in PRIVATE_GUILD_ID; try MELLOW_FORCE_DEPLOY=1. |
| No AI replies, only fixed text | ANTHROPIC_API_KEY, and /mellow view for enabled. |
| Startup exits on migrate | DATABASE_URL, database exists, role can run DDL. Try MELLOW_MIGRATE_ONLY=1. |
| "content could not be decrypted" | ENCRYPTION_KEY or ENCRYPTION_SALT_LIST changed; restore the old salt. |
| Shards reconnecting | Network to Discord; shard close events log the reason. |
API 401 | POST endpoints need Authorization: Bearer <API_TOKEN>. |
Local development
make pg-up # throwaway Postgres in Docker
cp .env.example .env
make run # go run ./cmd/mellow
make test # go test ./...
make vet # go vet ./...make migrate-up / migrate-down use the migrate CLI against DATABASE_URL for iterating on
migrations; the binary also applies them on startup.
Reporting a bug
Open an issue at github.com/CodeMeAPixel/Mellow/issues
with the version (/version), what you did, and what happened. For security issues, email
[email protected] instead.