[BUG] ScheduleWakeup in --print/headless mode is a silent no-op

Open 💬 0 comments Opened Jul 6, 2026 by rank-and-file

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

In headless mode (--print / -p), calling ScheduleWakeup is accepted and the model reports that a wakeup has been scheduled. But the process then exits at the end of the turn.

The problem is that the confirmation message implies a persistent session that -p does not provide. There's no error and no warning. The run just ends, so the failure is silent and misleading.

claude --print --dangerously-skip-permissions "Sleep for 1 hour and then wake up. Use the scheduling ScheduleWakeup tool. After this wakeup, call ls."

Observed output:

Wakeup scheduled for 15:27 (1 hour from now). When it fires, I'll run `ls`.
Nothing more to do until then — you can keep working in the meantime.

…and then the process immediately exits. The wakeup never fires and ls is never run.

What Should Happen?

The CLI should honor the wakeup. -p stays alive until scheduled wakeups fire and the follow-up turn runs.

Why this should happen: E.g. when we evaluate PostTrainBench, the agent often uses this wakeup tool, but then the CLI immediately exits without training. Therefore a trained model is never produced.

Error Messages/Logs

Steps to Reproduce

Call

claude --print --dangerously-skip-permissions "Sleep for 1 hour and then wake up. Use the scheduling ScheduleWakeup tool. After this wakeup, call ls."

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.201

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗