Skip to content
zero2vibecodelearn vibe coding
Level 3 · Autopilot 8 min Reviewed by the author · Oct 22, 2026 Verified against Claude Code v2.1.306 · Oct 22, 2026Official docs: /goal, Agent view, /loop and scheduled prompts, Cloud scheduled tasks (/schedule, formerly routines)Something out of date? Tell us

/goal, /loop and Agent view: work that runs without you

/goal keeps working until a condition is met, /loop repeats a task on an interval, a cloud scheduled task runs on a schedule, and Agent view keeps several background sessions on one screen. Powerful — and each needs its own boundary.

Level 3 · 0 / 4 lessons0%
In this lesson

In earlier lessons you ran Claude without an interface. Now, four ways to keep it working on its own while you are not pressing Enter.

/goal — until the condition is met

/goal npm test exits with code 0, a new test in test/links.test.js checks links with ?query, existing tests are not changed, the fix is committed; or stop after 8 turns

Claude starts right away. After every turn, a separate evaluator model reads the conversation and decides whether the condition is met. If not, Claude keeps going. It stops when the condition is met, judged impossible, an error happens, or you type /goal clear.

The evaluator sees only the conversation. Hence the rules for a good condition:

  • name a check whose result will show up in the output: "npm test exits with code 0“, not ”the code is clean";
  • say what must not change;
  • end with a turn limit.

/loop — on an interval

/loop 1m run npm test and append a line to .practice/loop-log.txt with the time and the number of failing tests. Do not change any other files.

The task repeats every minute while the session is idle — between your requests, never in the middle of a Claude answer. It stops when you cancel it (“cancel the npm test loop”) or when it expires.

Cloud scheduled task — in the cloud

/schedule in 5 minutes run npm test and reply with the number of passing and failing tests. Do not change files, do not commit, do not push.

A cloud scheduled task (until recently called a routine) runs in the cloud — on a schedule, through the API, or on a GitHub event. It is a full cloud session that does not stop for approvals and acts in your name: its commits and pull requests are signed by your GitHub user. To list them — /schedule list.

Agent view — several background sessions

claude agents --permission-mode manual --model sonnet

One screen for background sessions. Each request you type starts a separate session, which keeps running after you close the screen. Before its first file edit, a session moves into its own in .claude/worktrees/, so parallel tasks do not get in each other’s way. Rows are grouped into Working, Needs input and Completed; Space peeks at what a session is doing, → attaches to it.

Quick check

You set /goal 'make the code beautiful'. The loop has been running for twenty turns. Why?

Careful

Practice in the terminal

Check your understanding

Answered 0/3
Mode:

How does /goal know the condition is met?

Which /goal condition is well written?

Why open Agent view with an explicit --permission-mode?

Finish the task in the terminal and answer the questions to complete the lesson.

📝 My notes

Saved automatically in this browser · shows up on the Notes page.

Task

Open Agent view — the background sessions screen — so that new sessions start in manual mode on the sonnet model.

Tab complete · ↑ history · Ctrl+L clear · help commands

  • Not done: Agent view opened in manual mode
  • Not done: Background sessions will ask for permission

Lesson Q&A

How does /goal know the condition is met?

After every turn, a separate evaluator model reads the conversation and decides whether the condition holds — The evaluator sees only the conversation. So the condition has to name a check whose result shows up in the output, such as "npm test exits with code 0".

Which /goal condition is well written?

"npm test exits with code 0, existing tests are not changed, the fix is committed; or stop after 8 turns" — A good condition can be checked from the output, says what must not change, and ends with a turn limit. The evaluator cannot check "clean code".

Why open Agent view with an explicit --permission-mode?

Without it, background sessions start like ordinary new sessions — often in auto, where they commit and push their branch without asking — A background session works while you are not watching. Choose the mode deliberately — and never use --dangerously-skip-permissions.

You set /goal 'make the code beautiful'. The loop has been running for twenty turns. Why?

The condition has to name a check with a visible result and end with a turn limit. Otherwise the evaluator has nothing to go on.

Commands in this lesson

Terms in this lesson

Move between lessons with ← → · search with ⌘K

Written and reviewed by Mikhail Kuzmitskii