/cmux-cli:send-at <when> <surface-uuid> <prompt>from cmux-cli
Delivers a prompt into a specific cmux surface by UUID at a target time within the current session. Best-effort timer, not durable cron. Use for 'send this at 3pm to surface <uuid>' or 'in 30 minutes paste X into that tab'.
Ships in cmux-cli. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Deliver a prompt into a specific existing cmux surface, identified by its UUID, at a target time — while this agent session stays alive. The surface UUID is the whole address: no prior hotline connection, no cached session, no discovery. This skill does the when (a harness-native in-session wait) and hands the what/where to a deterministic delivery script.
This is a same-session, best-effort timer, not a durable scheduler. It fires the delivery only if the receiving session is available (with a live Codex queue receiver for Codex) and a cmux-resident agent can run the send at actual delivery time. That boundary is not a limitation to fix later — it is forced by two hard constraints working together:
cmuxOnly: only processes cmux itself spawned may drive it. The agent's own shell (Claude's
Bash tool / Codex's exec cell) has that ancestry; a launchd/cron job or a cloud routine
does not — cmux refuses them. So the thing that fires the send has to be this agent,
in this pane.codex queue into this exact thread;
it must queue an instruction for the cmux-resident agent, never drive cmux itself.
A live receiver and this pane's cmux ancestry are still required. Cloud agents
have no local socket.Consequences to state plainly to the user before scheduling anything far out:
cmux send can sporadically fragment or drop bytes (not size-gated), a busy REPL silently
enqueues the message, and a user-scrolled viewport hides it. The read-screen check is
therefore informational — "not observed" is never proof the send failed.If any of that makes the ask a no-go, stop and say so rather than scheduling theater.
cmux tree --all --json snapshot taken at fire time. Recover its workspace UUID only as targeting
context for the send.launchd, cron, at, a cloud
routine, or any process lacking cmux ancestry.You need three things:
<when> — an absolute time ("3:00pm", "15:00") or a relative one ("in 20 minutes").
Convert it to an epoch-seconds target and to a delay in seconds from now:
now=$(date +%s)
target=$(date -j -f "%H:%M" "15:00" +%s 2>/dev/null) # absolute (macOS date)
# or, relative: target=$(( now + 20*60 ))
delay=$(( target - now ))
If delay is negative (time already passed today) or larger than a few hours, surface that
to the user — the second case bumps against the reliability envelope above.<surface-uuid> — the exact cmux surface UUID. If the user gives a ref (surface:17)
or a name instead, resolve it to a UUID now with cmux tree --all --json --id-format both (or the using-cmux-cli skill's find-surface.sh) and confirm it with the user — the
UUID is what survives; refs renumber.<prompt> — the text to deliver. Single-line is the V1 sweet spot; embedded
newlines/backslash-escapes are not byte-exact (V1 has no paste transport) — warn if the
prompt contains them.Pick the wait that matches your harness. Both resume work in this cmux-resident session; a Codex timer only enqueues the wake instruction, leaving delivery to this agent.
Run a background until-clock loop with the Bash tool's run_in_background. It exits the
moment the target time arrives and re-invokes this same session — so the process (and its
cmux ancestry) is intact when you deliver, and the session is free in the meantime.
# run_in_background: true — a single wake when the clock reaches $target
until [ "$(date +%s)" -ge "$target" ]; do sleep 20; done
When it completes and you're re-invoked, go straight to Step 3.
schedule skill / cloud routines / CronCreate — those run off-machine
with no cmux socket.ScheduleWakeup (clamped to ≤1h per hop) and Monitor (≤1h timeout_ms) also keep this
session, but the background until-loop has no such cap and is simpler. Reach for them only
if you're already inside a /loop.Use the Codex mechanism in the until skill (delayed-work plugin): detect
codex queue (verified on CLI 0.160.1), capture this live thread's exact UUID,
and arm its detached one-shot wall-clock timer. Queue a self-contained instruction
to run Step 3 in this same cmux-resident session at fire time, naming the exact
surface UUID and prompt-file path. The timer never calls cmux. Preserve the exact
surface/no-fallback contract even if the receiver or surface disappears.
Apply the Codex queued sender labels rule in $maestro:conduct to this
wake instruction: use the caller-supplied exact prefix, or [cmux send-at timer]
when none was supplied. Keep the prompt file's delivery text as authored.
Follow until for private payload storage, cancellation/logging, sleep/wake,
receiver availability and opt-in caffeinate limits. End the turn after arming;
on the queued turn go straight to Step 3. Enqueue success is not observed wake or
cmux delivery. If queue is unavailable, report that capability gap and offer a
manual nudge or short blocking active-turn wait (functions.wait on a yielded
exec cell); do not assume every Codex version
requires a blocked turn. current_time_reminder and persistent goals are not timers.
Run the bundled delivery script. Under Claude Code the ${CLAUDE_SKILL_DIR} token resolves
mechanically to this skill's directory.
Codex: this path resolves under Claude Code; substitute the directory containing this
SKILL.md.
SKILL_DIR="${CLAUDE_SKILL_DIR}"
bash "$SKILL_DIR/scripts/send-to-surface.sh" --surface "<surface-uuid>" --prompt-file "<path>"
Prefer --prompt-file — it keeps the payload off the process argument list, which is
ps-visible to any local user. Write the prompt to a temp file and pass its path. --prompt "<text>" is a convenience for quick, non-sensitive sends and is fine there.
The script takes one cmux tree snapshot, resolves the UUID → workspace, cmux sends the
text, settles briefly, then submits with a separate cmux send-key Enter (a newline bundled
into the text would not submit into a TUI/Ink REPL), then does the informational read-screen
check. It prints a single status word on stdout and exits with a matching code.
Read the status word (and exit code) and tell the user the truth:
| stdout / exit | Meaning | What to say |
|---|---|---|
sent delivery_observed=true (0) | text + Enter delivered, and seen on screen | Delivered. |
sent delivery_observed=false (0) | text + Enter delivered, not seen on screen | Delivered — but the on-screen check didn't see it, which a busy or scrolled REPL can cause, so it's not proof either way. |
surface_gone (3) | UUID absent at fire time (or cmux unreachable) | The target surface no longer exists; nothing was sent and no fallback was attempted. |
send_failed (4) | cmux send failed | The send failed; the Enter was deliberately not sent. Do not re-send. |
enter_failed (5) | text sent, Enter failed | The text may be sitting unsubmitted in the input box. Report it; do not re-send. |
error (2) | bad args / cmux or jq missing | Report and stop. |
Never upgrade a false delivery_observed into a claim of failure, and never silently re-send.
No hotline dependency, no delivery nonces, no transcript inspection, no byte-exact paste
transport, no elaborate REPL-state detection, no retries, and no recovery system. If a caller
needs verified cross-workspace delivery, that is the hotline plugin's dial skill, not
this.
What SKILL.md sets; muted values are Claude Code's defaults
Use when the user wants a prompt (or command) delivered into a SPECIFIC existing cmux surface at a later time, and they can give the exact surface UUID. Triggers: "at 3pm send … to surface <uuid>", "in 20 minutes paste this into that tab", "wake up later and send X into the cmux surface I'm pointing at". NOT for cross-workspace agent calls with delivery verification (that is hotline's dial), and NOT for durable scheduling that must survive the session closing (impossible here — see the reliability envelope below). And NOT for running the work in THIS session at a later time — that is the `until` skill in the `delayed-work` plugin, which targets self and needs no cmux.
Three short reads, in order
3 skills in this plugin
/auto-renameRename cmux tabs or workspaces to meaningful names — 'rename this tab', 'auto-rename', 'fix these tab names' — or when default/stale names (zsh, bash, node) should reflect what's actually running./using-cmux-cliDrives cmux (macOS terminal multiplexer) via the `cmux` CLI — windows, workspaces, panes, tabs, sending keystrokes and reading terminal output, the cmux event stream for waiting on and verifying work, embedded browser, notifications, sidebar progress, layouts.Other plugins' skills for the same job
npx claudepluginhub jtsternberg/claude-plugins --plugin cmux-cli