New · France 2027 presidential election: what the candidates propose on AI, quoted and sourced. Explore the tracker →

Last reviewed:

Running Claude Code autonomously: delegate the loop, keep control

In autonomous mode, you no longer drive every step of Claude Code: you set a stop condition once, and a check (an evaluator model or a script) verifies it after each turn until the work is genuinely finished. Four levers make this loop automatic: /goal, /loop, /schedule and Stop hooks.

Claude Code can work two ways: as an assistant you watch at every step, or as an autonomous agent you delegate a "work, check, repeat" loop to until a stop condition is met. This dossier details the four mechanisms that make that autonomy operational, and where to keep control. Edition verified on October 2, 2026 against the official documentation (Claude Code 2.1.287).

4levers turn Claude Code from an assistant you babysit into an agent that finishes the job.

WYP.agency, practical guide, edition 2.0 verified on October 2, 2026

01From assistant to autonomous agent

Most developers use Claude Code as an assistant they have to prompt at every step. There is another way to work: you set a condition once, and Claude keeps going until it is met.

In the usual flow, you are the loop: you write a prompt, Claude replies, you review, you re-run, twenty times. In the autonomous flow, you set a stop condition, a check runs after each turn, and if the work is not done, Claude goes again. You define the goal once.

WYP take

This is not a convenience setting. It is a different relationship to the tool: instead of driving every step, you delegate the "work, check, repeat" loop. The question is no longer "how do I do this", but "what am I willing to delegate".

02The four levers

Four mechanisms make the loop automatic. Each is defined by what triggers the next turn and by its stop condition, what decides the work is done.

1

/goal: run until a condition is true

You describe the target and Claude starts right away. After each turn, a small fast model reads the conversation and returns one of three verdicts: not yet met (Claude goes again), met, or impossible (the goal ends and control comes back to you). Best when "done" can be proven in the conversation: the tests pass, npm test exits 0.

2

/loop: re-run on an interval

Claude re-runs a prompt at a fixed cadence (/loop 5m) or at a pace it chooses, between 1 minute and 1 hour, until you stop it; a recurring task expires after 7 days. Available since version 2.1.71 (March 2026). Useful to watch a changing state: a deployment, CI, a pull request.

3

/schedule: a routine in the cloud

/schedule creates a routine that runs on Anthropic-managed infrastructure on a schedule, even with your computer off. It works on a fresh clone of the repository, with no access to your local files, and a minimum interval of one hour. Routines are in research preview, on Pro, Max, Team and Enterprise plans. For a task that must touch your machine, the desktop app offers local routines (Code tab, Routines, New routine, Local), at intervals down to one minute, while the app is open.

4

Stop hooks: programmable control of a turn's end

A script or a prompt decides whether Claude may stop. For a script, the exit code rule is strict: 0 allows the stop, 2 blocks it and passes your message to Claude, which keeps going. Any other code, 1 included, is a non-blocking error: Claude stops anyway. To enforce a rule, end with exit 2.

03Choosing the right lever

/goala checkable condition, you want the resultsession required
/loopa changing state, you monitorsession required
/schedulerecurring work, even with the computer offcloud routine, no session
Stop hooksa bespoke stop ruledepends on the settings scope

04Auto mode: autonomy with guardrails

Claude Code's auto mode removes routine confirmation prompts. A second model, the classifier, reviews every action before it runs and blocks what is irreversible, destructive or aimed outside your environment.

Why it exists: according to Anthropic's engineering article of March 25, 2026, users approve 93% of permission prompts. In time, people stop reading them. Auto mode aims for high autonomy at low maintenance cost, without removing every check.

Two layers of defense

A server-side probe scans what Claude reads (files, web pages, command output) and adds a warning when the content looks like an attempt to hijack the agent. The classifier then reviews each action before it runs. It sees only your messages and Claude's tool calls, not Claude's own explanations or tool results, so the agent cannot talk it into letting an action through.

What passes, what is blocked

  • Allowed by default: file operations in the working directory, installing dependencies declared in the project, read-only HTTP requests, and pushing to any branch of the repository you are working in.
  • Blocked by default: downloading and executing code (curl | bash), sending sensitive data to external endpoints, production deploys and migrations, mass deletion on cloud storage, granting access permissions, force push, irreversibly destroying files that existed before the session, and merging a pull request that no human has approved.

By default the classifier trusts only the working directory and the remotes configured for it. Everything else is treated as external until your organization declares its trusted infrastructure in the autoMode.environment setting.

Turning it on

In the terminal, Shift+Tab cycles through the modes (Auto appears when it is available) and claude --permission-mode auto starts a session directly in this mode. An organization on Team or Enterprise can turn it off for every developer with the managed setting permissions.disableAutoMode.

Auto mode versus bypass permissions

These are not two variants of one setting. bypassPermissions mode (the --dangerously-skip-permissions flag) turns off the prompts and the safety checks: the documentation states that it offers no protection against prompt injection or unintended actions, and restricts it to isolated environments such as containers or virtual machines. Auto mode keeps a check running on every action. It also blocks launching an autonomous agent loop with no human approval or sandbox, for instance one started with --dangerously-skip-permissions.

With the four levers

The two settings govern different things. /goal, /loop, /schedule and Stop hooks govern the loop: when Claude keeps going and when it stops. The permission mode governs the actions: what Claude may do on each turn. /goal does not change that mode. A deny rule blocks before the classifier is even consulted, and an ask rule (for example on git push) forces a confirmation even in auto mode.

What stays under human control

Auto mode reduces prompts but does not guarantee safety: the documentation says so explicitly and advises using it for tasks whose general direction you trust. Anthropic's published figures are candid: on 10,000 real actions, 0.4% of legitimate actions are wrongly blocked, but of 52 genuinely overeager actions, 17% got through, and 5.7% of synthetic data exfiltration attempts. The article concludes that auto mode is not a replacement for careful human review on high-stakes infrastructure. After 3 blocks in a row or 20 in total, it pauses and the prompts return.

WYP take

Auto mode does not remove the decision, it moves it. Routine operations are delegated; anything irreversible, anything involving money, production or access keeps a human in the loop, either through the classifier or through a rule you set yourself.

05Keeping control

Delegating the loop does not mean letting go. Useful autonomy is bounded: a provable stop condition, a turn or time limit, a protected scope, and a point where a human signs off on what commits.

/goal does not change your permission mode. Auto mode removes per-tool prompts, with background safety checks; since late September 2026 (version 2.1.283), it is the starting mode of an interactive terminal or VS Code session when no mode is configured, on every plan. In Manual mode, Claude still asks before tools you have not allowed. Increase autonomy in steps: on a sensitive project, run a first /goal in Manual (Shift+Tab), return to auto mode once the result checks out, then add a script-based Stop hook.

Reference points as of October 5, 2026: Claude Code 2.1.289, default model Opus 5.5 since version 2.1.280, /goal available since version 2.1.139.

WYP take

The right question is not "does it work?" but "which decision am I willing to delegate, and which requires my signature?" Autonomy is framed before it is launched.

FAQ

What is Claude Code's autonomous mode?

It is a mode where you no longer drive every step. You set a stop condition once, and a check verifies it after each turn until the work is genuinely finished. You are effectively delegating a work, check, repeat loop.

How does it differ from using it as an assistant?

As an assistant, you watch Claude Code at every step. As an autonomous agent, you delegate the whole loop until the stop condition is met. It is the same tool, but two ways of working, depending on how much control you keep.

What verifies that the work is finished?

A dedicated check: an evaluator model or a script. It runs after each turn and compares the result against the stop condition you defined, until the work is genuinely done and not merely interrupted.

What mechanisms make this autonomy operational?

Four levers make the loop automatic: /goal, /loop, /schedule and Stop hooks. These are the mechanisms that let you delegate the work while keeping control where it is needed. Edition verified on October 2, 2026 against the official documentation (Claude Code 2.1.287).

What is Claude Code's auto mode?

It is a permission mode in which a second model, the classifier, reviews each action before it runs instead of you. It lets routine operations through and blocks what is irreversible, destructive or aimed outside your environment, such as a production deploy, a force push or sending sensitive data out. It reduces prompts without guaranteeing safety.

How does auto mode differ from bypass permissions?

Bypass mode (--dangerously-skip-permissions) turns off prompts and safety checks, with no protection against prompt injection, and is meant for isolated environments. Auto mode keeps a classifier active on every action and blocks risky operations. For fewer prompts with background safety checks, the documentation recommends auto mode.

Get the guide as a PDF

The four levers to run Claude Code autonomously (/goal, /loop, /schedule, Stop hooks), each command cross-checked against the official documentation.

You will receive a link to confirm your address, then the guide. We use this address only for that, unless you tick the box below. Learn more.

PDF · 16 pages · October 2026 edition · FR / EN / ES · delivered in under a minute

See also

Further reading

Claude Code documentation (Anthropic) (official documentation)

Sources

  1. WYP.agency, guide "Running Claude Code autonomously", verified edition 2.0, October 2, 2026. https://wyp.agency/en/glossary/claude-code-autonomous/ (accessed 2026-10-02)
  2. Keep Claude working toward a goal (/goal), Claude Code documentation. https://code.claude.com/docs/en/goal (accessed 2026-10-02)
  3. Run prompts on a schedule (/loop), Claude Code documentation. https://code.claude.com/docs/en/scheduled-tasks (accessed 2026-10-02)
  4. Automate work with routines (/schedule), Claude Code documentation. https://code.claude.com/docs/en/routines (accessed 2026-10-02)
  5. Schedule recurring tasks in Claude Code Desktop (local routines), Claude Code documentation. https://code.claude.com/docs/en/desktop-scheduled-tasks (accessed 2026-10-02)
  6. Hooks reference (Stop, exit codes), Claude Code documentation. https://code.claude.com/docs/en/hooks (accessed 2026-10-02)
  7. Choose a permission mode (Manual, auto), Claude Code documentation. https://code.claude.com/docs/en/permission-modes (accessed 2026-10-16)
  8. Configure auto mode, Claude Code documentation. https://code.claude.com/docs/en/auto-mode-config (accessed 2026-10-16)
  9. How we built Claude Code auto mode: a safer way to skip permissions, Anthropic Engineering, March 25, 2026. https://www.anthropic.com/engineering/claude-code-auto-mode (accessed 2026-10-16)
  10. Model configuration (default model Opus 5.5), Claude Code documentation. https://code.claude.com/docs/en/model-config (accessed 2026-10-02)
  11. Claude Code changelog (versions 2.1.71, 2.1.139, 2.1.280, 2.1.287). https://code.claude.com/docs/en/changelog (accessed 2026-10-02)

Editorial methodCorrections log

← Back to glossary

Address copied