Add three new sections to all 14 examples: - "Carry Forward": what output feeds into later examples (01-10) - "The Cumulative Path": alternative prompt building on previous output (02-10) - "Now Try It Yourself": personalized template with transferable pattern (all) - "Building On" callout connecting back to previous examples (02-10) Add Example 14: Build Your Personal Agent - capstone that guides reader through writing their own CLAUDE.md, creating a personal skill, connecting a messaging channel, setting up automation, and testing end-to-end. Update README with cumulative path diagram, two usage modes, and example 14. Update GETTING-STARTED.md with cross-references to relevant examples. 17 files changed, 703+ lines added. The examples now form a coherent learning path from "see what it can do" to "build your own agent." Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
109 lines
3.7 KiB
Markdown
109 lines
3.7 KiB
Markdown
# Example 13: Auto Mode
|
|
|
|
Let Claude Code run autonomously with an AI safety classifier
|
|
reviewing every action. No manual approvals needed. This is the
|
|
feature that makes Claude Code feel like OpenClaw's daemon mode.
|
|
|
|
**OpenClaw equivalent:** Default autonomous mode with Docker
|
|
sandbox + exec approvals for dangerous commands.
|
|
|
|
**Requirements:**
|
|
- Claude Code v2.1.86+
|
|
- Team plan or higher (research preview)
|
|
|
|
## Enabling Auto Mode
|
|
|
|
From the CLI:
|
|
```bash
|
|
claude --enable-auto-mode
|
|
```
|
|
|
|
In an active session, press `Shift+Tab` to cycle through
|
|
permission modes until you reach Auto Mode.
|
|
|
|
## The prompt
|
|
|
|
```
|
|
Clone the repository at https://github.com/example/sample-app,
|
|
install dependencies, run the test suite, fix any failing tests,
|
|
and create a summary of what you changed in CHANGES.md.
|
|
```
|
|
|
|
## What happens
|
|
|
|
1. Claude Code clones the repo (no permission prompt)
|
|
2. Runs `npm install` (no permission prompt)
|
|
3. Runs `npm test` (no permission prompt)
|
|
4. Reads failing test output, edits source files (no prompt)
|
|
5. Re-runs tests until they pass (no prompt)
|
|
6. Writes CHANGES.md (no prompt)
|
|
|
|
Every action is reviewed by the safety classifier (Sonnet 4.6)
|
|
before execution. If an action is flagged as risky (e.g., mass
|
|
file deletion, data exfiltration), it is blocked and Claude is
|
|
redirected to take a different approach.
|
|
|
|
## How the safety classifier works
|
|
|
|
Two-layer system:
|
|
1. **Fast filter:** Quick yes/no on the action category
|
|
2. **Chain-of-thought:** Detailed reasoning for borderline cases
|
|
|
|
Performance (Anthropic's internal testing):
|
|
- 0.4% false positive rate (safe actions incorrectly blocked)
|
|
- 5.7% false negative rate (risky actions not caught)
|
|
|
|
The classifier runs on Sonnet 4.6 regardless of your session model.
|
|
|
|
## Permission mode comparison
|
|
|
|
| Mode | Approvals | Safety | Use case |
|
|
|------|----------|--------|----------|
|
|
| Default | Every action | Maximum | Learning, sensitive projects |
|
|
| Auto-edit | Pre-approved patterns | High | Known workflows |
|
|
| Auto Mode | AI classifier | High | Autonomous execution |
|
|
| Bypass | None | Minimal | Sandboxed environments only |
|
|
|
|
## How this compares to OpenClaw
|
|
|
|
OpenClaw runs autonomously by default. Safety comes from Docker
|
|
sandboxing (container limits what the agent can do even if it
|
|
tries something dangerous).
|
|
|
|
Claude Code Auto Mode runs autonomously with an AI classifier
|
|
reviewing each action before execution. Safety comes from
|
|
pre-execution screening, not post-execution containment.
|
|
|
|
Different philosophy:
|
|
- **OpenClaw:** "Let it try, contain the damage" (sandbox)
|
|
- **Claude Code:** "Review before executing" (classifier)
|
|
|
|
Both have trade-offs. Sandboxes catch unknown threats. Classifiers
|
|
prevent the action from happening at all but may miss novel attacks
|
|
(5.7% false negative rate).
|
|
|
|
---
|
|
|
|
## Now Try It Yourself
|
|
|
|
Auto Mode works best for well-defined, bounded tasks. Try it on something safe first:
|
|
|
|
```
|
|
[With Auto Mode enabled]
|
|
Read all markdown files in this project. Create a table of contents
|
|
in pipeline-output/index.md listing every file with a one-line
|
|
description. Verify the file count matches.
|
|
```
|
|
|
|
**The pattern you just learned:** Auto Mode removes the permission prompts. Use it when you trust the task scope and want Claude to work without interruption. Start with read-heavy, write-light tasks and expand as you build confidence.
|
|
|
|
When to use Auto Mode:
|
|
- Research tasks where you trust the search and write scope
|
|
- File organization within a known project
|
|
- Running a tested pipeline end-to-end without babysitting
|
|
- Batch processing files with a predictable pattern
|
|
|
|
When NOT to use Auto Mode:
|
|
- First time running an untested pipeline
|
|
- Tasks that touch production systems or external APIs
|
|
- Anything involving credentials, payments, or irreversible actions
|