Build features with Claude Code auto mode
Hand a whole feature to Claude Code in auto mode: it edits files, runs your tests and fixes failures without asking at every step, in about 25 minutes.

What you need
Auto mode needs Opus 4.6, Sonnet 4.6 or a newer model. On Team and Enterprise plans, an admin can turn it off.
Step 1: Install Claude Code
3 minAuto mode is built in, so a current install is all you need.
- On a Mac or Linux, run the command below in a terminal. On Windows, use the PowerShell command on the setup page.
- Open a new terminal window and run
claude --version.
Mac or Linux: run thiscurl -fsSL https://claude.ai/install.sh | bash
You should see a version number, such as
2.1.300 (Claude Code).The terminal says it can't find
claude?The install folder isn't on your PATH yet. Open a new terminal window first. If that fails, follow Fix your PATH in the docs.
The native install updates itself in the background. Version 2.1.283 and newer start new sessions in auto mode.
Step 2: Add a checkpoint before pushes
2 minAuto mode lets Claude push to any branch and open pull requests, so make it ask you first.
- Open
~/.claude/settings.jsonin a text editor. Create the file if it doesn't exist. - Add the
askrules below. If the file already has apermissionsblock, add the two lines to it. - Save the file.
Your config{ "permissions": { "ask": [ "Bash(git push *)", "Bash(gh pr create *)" ] } }You should see the file saved with an
asklist underpermissions.Claude Code says the settings file is invalid?
A comma or bracket is likely missing. Run
claude doctorin your shell to see which line fails, then fix it.Ask rules apply even in auto mode. A push written another way, such as
git -C [DIR] push, doesn't match the rule.- Open
Step 3: Start on a branch in auto mode
2 minA separate branch keeps the work apart from main, so you can throw it away if it goes wrong.
- In your project folder, run the commands below. Put your own branch name in place of the brackets.
- Sign in with your Claude account if asked.
- Check the status bar under the prompt. If it doesn't say auto mode on, press
Shift+Tabuntil it does.
Run thisgit switch -c [FEATURE-BRANCH] claude --permission-mode auto
You should see
⏵⏵ auto mode onin the status bar.Auto mode won't turn on?
Run
/modeland pick Opus 4.6, Sonnet 4.6 or a newer model. On a Team or Enterprise plan, ask your admin whether auto mode is turned off.Step 4: Describe the feature
3 minClaude won't stop to ask much, so the prompt has to carry the scope, the limits and what done means.
- Paste the prompt below and fill in the brackets.
- Name the files, tables or APIs to leave alone, and the exact test command.
- Press Enter and let Claude start.
Your promptBuild this feature: [WHAT IT SHOULD DO]. Stack: [FRAMEWORK AND KEY LIBRARIES]. Follow the patterns already in this repo. Don't change: [FILES, SCHEMA OR APIS TO LEAVE ALONE]. When you're done, run [TEST COMMAND] and fix any failures. Commit to this branch. Don't push or open a pull request until I review. End with a short summary of what changed and why.
You should see Claude reading files, then editing code and running commands without asking first.
Claude still stops to ask a question?
Answer it in the chat. Next time, put that detail in the prompt, such as the test command or the folder to use.
Step 5: Watch and steer
10 minA correction halfway through costs far less than a rewrite at the end.
- Read Claude's updates as it works through the files.
- If it heads the wrong way, type a correction and press Enter.
- Press
Escto stop the current action if you need to.
You should see your test command running, and Claude fixing what fails.
A notice says an action was blocked?
The safety classifier stopped it. Run
/permissionsand open the Recently blocked tab. Approve the action there if it's safe, and Claude can retry.After 3 blocks in a row, or 20 in a session, auto mode pauses and Claude Code asks you again.
Step 6: Review the changes
5 minAuto mode cuts the prompts, not the review. You still check the code before it ships.
- Run
/diffto see everything that changed. - Ask for fixes in the same session, such as "The login route needs rate limiting."
- When you're happy, push the branch and open a pull request. The rule from step 2 asks you to approve both.
You should see a diff you've read, passing tests and a branch ready for review.
The diff touches files you said to leave alone?
Ask Claude to undo the changes to those files and say why it made them. Then name the files again in your next prompt.
- Run
You get
A finished feature on its own branch, written and tested by Claude Code with a checkpoint before anything leaves your machine
Try next
Did this guide work for you?
Thanks. It helps us fix the steps.


