---
name: wake-at
description: Schedule a wake-up for the current live Claude Code session at a specific wall-clock time (America/Los_Angeles). A background process sleeps until the target time, then exits with the task text, waking the session to perform it. Use when the user says "wake up at <time> and do X", "at 2:30 AM run Y", or wants a timed task in this same session without Slack or cron.
---

# wake-at

Wake the **current live session** at a given LA wall-clock time and perform a task. Same mechanism as slack-tether's `ask` — a detached background process whose exit re-invokes the model — but the trigger is the clock, not a Slack reply.

## Arming

Run from the repo root, **always with `run_in_background: true`** (a foreground run would block the session and hit the tool timeout):

```
node .claude/skills/wake-at/wake.mjs <time> "<task text>"
```

- `<time>` — `13:00`, `2:30am`, `11:05pm` (interpreted in America/Los_Angeles). If the time has already passed today, it arms for tomorrow.
- `<task text>` — what to do on wake. Also restate the task in the conversation when arming, so the wake-up doesn't depend solely on stdout.

The script prints an `ARMED …` line immediately, polls the wall clock every 20s (robust to brief suspends), then prints `WAKE …` + `TASK: …` and exits 0.

## On wake

The harness re-invokes the session when the process exits. Read the task output: the `TASK:` line is what to do — do it, then report the actual fire time vs target.

## Constraints

- The session terminal must stay open and the machine must stay awake until the target time (James's laptop never sleeps while plugged in).
- One waiter per armed task. To cancel, stop the background task (TaskStop / kill).
- For tasks that don't need this session's context, prefer `/schedule` (cloud cron) instead — it survives reboots and closed terminals.
