Skip to content

Notify via ntfy when Claude CLI authentication fails #85

Description

@ClaydeCode

Problem

When the Claude CLI credentials expire or become invalid (e.g. after claude auth login replaces the credentials file), clayde silently skips all work every cycle with:

Claude CLI authentication failed — marking unavailable
Claude usage limit hit — skipping all work this cycle

There is no notification, so this can go undetected for hours.

Desired behaviour

When is_claude_available() detects an auth failure (as opposed to a usage/rate limit), send an ntfy notification with high priority so the operator can re-authenticate and restart the container.

Implementation notes

  • In orchestrator.py, is_claude_available() currently returns False for both auth errors and usage limits — distinguish the two failure modes
  • Auth failure → ntfy notification (title: "Clayde: Claude CLI auth failed", high priority / 🔴) + log as before
  • Usage limit → existing behaviour (no notification, just skip)
  • Notification should only fire once per auth-failure streak, not every cycle — add a flag or last-notified timestamp to avoid spam
  • Use existing ntfy infrastructure (settings.ntfy_topic, settings.ntfy_base_url)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions