Goal supports continued execution and verification toward an explicit objective. In Editor, set an objective and a maximum number of turns to keep the agent working within a defined limit.
Enable Goal in Editor and describe the objective, constraints, and acceptance criteria. For example:
Monitor progress and results, and use the controls available in the interface when adjustments are needed. Review changes and verification results when execution ends.
Core capabilities
- Describe a verifiable objective for the agent to work toward.
- Execution is limited by a turn budget. Reaching the limit does not mean the objective has been achieved; check the results.
Use cases
- Long-running coding tasks: work with clear success criteria and a verification loop — e.g. raising test coverage, performance tuning, cross-file consistency fixes. the agent autonomously iterates and verifies until the goal is met.
- Large-scale refactoring: code migrations, whole-repo framework upgrades, batch API replacements — tasks that can't be planned out step by step in advance. Describe the desired end state as a Goal, and the agent plans the path and keeps iterating.
How to use
Enable Goal in Editor and describe the objective, constraints, and acceptance criteria. For example:
Set the maximum number of turns to suit the task. When the limit is reached, review completed work and verification results before deciding whether to continue.
Goal vs. Planning
| Goal-driven | Planning (/plan) | |
|---|---|---|
| Positioning | Goal-oriented; the Agent plans the path autonomously | Review an implementation plan before execution |
| Input | Describe the desired end state | A structured solution description |
| Execution | The Agent iterates on its own and judges completeness | Executes after plan review |
| Typical scenarios | Raising test coverage, code refactoring, performance tuning | New feature development, building to a design, delivering well-defined requirements |
Best practices
- Describe a verifiable end state: a good goal is "test coverage reaches 80%," not "write some tests." the agent needs a clear completion criterion to judge whether the goal is met.
- Include key constraints: if there's something you don't want changed, say so in the goal. For example, "optimize the internal implementation without modifying the public API."
- Keep the scope reasonable: an overly grand goal (such as "make the whole project better") makes it hard for the agent to stay focused. Breaking it into specific, measurable sub-goals works better.

