/login command not registered when scheduled task fires during startup with expired auth

Resolved 💬 2 comments Opened Apr 14, 2026 by nhr Closed May 23, 2026

Bug Description

When a scheduled task (cron) is configured to fire on Claude Code startup and
authentication has expired, the /login slash command is never registered. Claude
Code tells the user to run /login, but the command is not available.

Steps to Reproduce

  1. Configure a scheduled task (via /cron) that runs on or shortly after startup
  2. Allow authentication credentials to expire
  3. Launch Claude Code

Expected Behavior

Claude Code detects expired auth, registers /login as an available command, and
prompts the user to run it — regardless of whether a scheduled task is also firing.

Actual Behavior

  • The scheduled task fires during startup
  • Something in the load order prevents /login from being registered
  • Claude Code tells the user to run /login, but the command is not recognized
  • The user is stuck: told to do something that isn't available

Hypothesis

Race condition in the startup sequence: the scheduled task execution path runs
before slash command registration completes, and the auth-check codepath that
would normally register /login either gets skipped or conflicts with the
task execution.

Workaround

Restart Claude Code after disabling or removing the scheduled task, or run
claude /login from the terminal outside of the session.

Environment

  • Platform: macOS (Darwin)
  • Shell: zsh

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗