Keep Claude working toward a goal - Claude Code Docs
code.claude.com · 1,848 words · saved by 1 readers
Set a completion condition with /goal and Claude keeps working across turns until the condition is met.
The /goal command sets a completion condition and Claude keeps working toward it without you prompting each step. After each turn, a small fast model checks whether the condition holds. If the model judges it not yet met, Claude starts another turn instead of returning control to you. The goal clears automatically once the condition is met, if the model judges the condition impossible to satisfy, or if a turn fails on an error you have to fix. Use a goal for substantial work with a verifiable end state: Migrating a module to a new API until every call site compiles and tests pass…
saved by
related reading
- Best practices for Claude Code - Claude Code Docsanthropic.com
- Using Goals in Codexdevelopers.openai.com
- Claude Code Cheat Sheetcc.storyfox.cz
- How I Use Claude Code | Philipp Spiessspiess.dev
- A Guide to Claude Code 2.0 and getting better at using coding agents – sankalp's blogsankalp.bearblog.dev
- Claude Code Setup Guide for Complete Beginnershannahstulberg.substack.com
- Effective harnesses for long-running agents \ Anthropicanthropic.com
- Claude’s Constitution \ Anthropicanthropic.com
- Maximizing the value of your Claude Code sessionsclaude.com
- Prompting best practicesdocs.anthropic.com
- How I Use Claude Code | Boris Taneboristane.com
- Using CLAUDE.MD files: Customizing Claude Code for your codebase | Claudeclaude.com