Skip to main content
Editor

Goal-driven

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.

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:
Raise test coverage for the addition module to 80%, preserve the public API, and run the tests to verify the result.
Monitor progress and results, and use the controls available in the interface when adjustments are needed. Review changes and verification results when execution ends.
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-drivenPlanning (/plan)
PositioningGoal-oriented; the Agent plans the path autonomouslyReview an implementation plan before execution
InputDescribe the desired end stateA structured solution description
ExecutionThe Agent iterates on its own and judges completenessExecutes after plan review
Typical scenariosRaising test coverage, code refactoring, performance tuningNew 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.