Run Claude Code Overnight Question Explained
This worked Loop Engineering practice question tests Loop Basics. Try the answer first, then review why A is the best choice.
Short answer
The correct answer is A. Scheduled tasks fire only while the Claude Code session is running and idle.
A /loop task belongs to the Claude Code session, not to the operating system. The scheduled-tasks docs say tasks fire only while Claude Code is running and idle, and closing the terminal or letting the session exit stops them. While the laptop sleeps, the Claude Code process does not run, so no task can fire. Missed fires do not catch up. A task that came due while Claude was busy fires once when Claude becomes idle, not once per missed interval. The correct answer is A. Scheduled tasks fire only while the Claude Code session is running and idle
The Question
You start /loop 10m in Claude Code to pick up tasks from tasks.md, close the laptop lid, and go to bed. In the morning no task ran. What explains this?
Why A is correct
A /loop task belongs to the Claude Code session, not to the operating system. The scheduled-tasks docs say tasks fire only while Claude Code is running and idle, and closing the terminal or letting the session exit stops them. While the laptop sleeps, the Claude Code process does not run, so no task can fire. Missed fires do not catch up. A task that came due while Claude was busy fires once when Claude becomes idle, not once per missed interval. The correct answer is A. Scheduled tasks fire only while the Claude Code session is running and idle
Why the other options are wrong
Ten minutes is above the one-minute minimum. An interval given in seconds rounds up to one minute, and Claude Code does not reject it.
The file name is your choice. The prompt tells Claude which file to read, and nothing in the scheduler cares about the name.
There is no ten-run confirmation. Recurring tasks expire seven days after creation, not after a run count.
Key idea: Loop Basics
Loop engineering is a practice skill. Open Claude Code in a throwaway folder, write one small task in a file, and run it with /loop or /goal while you watch. If you doubt an answer, test it against a real run in that folder.
Ready to test the full skill?
Take the free Loop Engineering quiz and find the exact basics to review next. No signup required.
Practice related questions
Same skill area or adjacent concept. Use these after reviewing the explanation.