[FEATURE] Add /wait Command for Scheduled Execution

Resolved 💬 9 comments Opened Sep 6, 2025 by gianlucamazza Closed Jan 18, 2026

Preflight Checklist

  • [x] I have searched existing requests and this feature hasn't been requested yet
  • [x] This is a single feature request (not multiple features)

Problem Statement

Summary

Add a /wait command that pauses execution until a given time.
Example:

/wait 16:00 <context to be executed>

This would ensure <context to be executed> only executes once the clock reaches 16:00.

Motivation

  • Useful when session tokens/credits refresh at fixed times.
  • Avoids manual re-running of commands.
  • Keeps automation inside Claude Code without relying on cron or external schedulers.

Proposed Behavior

  • Support both absolute times (HH:MM) and relative delays (+Xm).
  • Queue subsequent commands until the timer completes.

Benefits

  • Improves developer productivity.
  • Enables smoother workflows tied to token/session resets.
  • Lightweight enhancement with clear UX.

Proposed Solution

Proposed Solution

  1. Command Parsing
  • Extend the command parser to recognize the new /wait directive.
  • Syntax:
  • /wait HH:MM → absolute target time.
  • /wait +Xm → relative delay in minutes.
  1. Command Queueing
  • When /wait is invoked, subsequent commands are not executed immediately.
  • Instead, they are stored in an in-memory queue until the timer resolves.
  1. Scheduler / Event Loop
  • A lightweight scheduler monitors the system clock.
  • Once the specified time or delay is reached, the queue is flushed in order.
  1. Edge Case Handling
  • Past time: automatically schedule for the next day.
  • Session ends before timer: queued commands are discarded with a clear message.
  • Cancelation: /cancel aborts any active wait and clears the queue.
  1. User Feedback
  • On invoking /wait continue with our analysis and fixes, show confirmation:

``
Waiting until 16:00… queued 2 commands
``

  • On resume:

``
Timer complete — resuming queued commands
``

  1. Scope
  • No persistence beyond the current Claude Code session.
  • Future enhancement: allow persistence across restarts if requested by users.

Alternative Solutions

_No response_

Priority

Low - Nice to have

Feature Category

Interactive mode (TUI)

Use Case Example

_No response_

Additional Context

Scenario: Token Reset at 16:00

A developer knows that their Claude session tokens will reset at 16:00. They want to queue a script to run immediately after the reset without manual intervention.

# Queue a wait until 16:00
/wait 16:00 continue with our analysis and fixes

# Next command is held until timer completion
/run refresh-tokens.sh

Output:

[Claude Code] Waiting until 16:00… queued 1 command

At 16:00, execution resumes automatically:

[Claude Code] Timer complete — resuming queued commands
→ Running: refresh-tokens.sh

---

Scenario: Relative Delay for Git Operations

A developer is working on a deployment pipeline and wants to delay a push by 30 minutes (to align with a scheduled maintenance window).

/wait +30m push origin main

Output:

[Claude Code] Waiting 30 minutes… queued 1 command

After 30 minutes:

[Claude Code] Timer complete — resuming queued commands
→ Running: git push origin main

View original on GitHub ↗

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