Overview
Goal is an autonomous execution mode in Qoder CLI. It is best suited for scenarios where you have a clear completion condition and want Qoder to work continuously until it is achieved. Once a goal is set, Qoder breaks it down into steps and executes them continuously, minimizing interruptions until the goal is completed or you manually stop it.
Goal is ideal for tasks with clear endpoints, such as "fixing all failing tests," "completing a refactoring until the build passes," or "implementing a feature according to requirements and passing self-tests."
Setting a Goal
In an interactive session, use /goal to create a goal:
- Qoder will start working continuously towards the goal, breaking it down into multiple steps if necessary.
- Goal does not change your permission mode; tool approvals during execution follow the current mode. For unattended execution, switch to
autooryolobeforehand. - The interface will display a goal status indicator.
Limiting Maximum Turns
Use the --turns parameter to limit the maximum number of conversation turns for goal execution. Once the limit is reached, Qoder will stop and wait for your instructions:
--turns must be a positive integer; otherwise, the parameter will be ignored.
Checking Goal Status
Use /goal status to check the progress of the current goal:
- Goal: The goal description.
- Status: Active (in progress) or Paused (paused, including auto-pause after reaching the turn limit).
- Turns: The number of turns used. If a limit is set, it is displayed as "used / limit".
- Time: The time consumed by the goal.
/goal status afterward will prompt that there is no active goal.
If the goal is held by another session, the status will indicate this, and you can use /goal take to take over.
Pausing and Resuming
When you need to temporarily interrupt the goal to handle something else, use /goal pause to pause:
/goal resume to continue later:
Taking Over a Goal
Goals can be persisted across sessions. If a goal was created and is held by another session, the current session cannot directly update it by default. Use /goal take to claim ownership of the goal for the current session:
Clearing a Goal
When a goal is completed or you no longer need it, use /goal clear to clear it:
When Qoder determines that the goal has been achieved, it will also automatically mark the goal as completed and clear it, without requiring manual intervention.
Working with Plan
Goal can be used in conjunction with Plan: use Plan first to analyze the problem and confirm the approach, then enter Goal to let Qoder execute autonomously until completion. If Plan is active before entering Goal, Qoder will re-enter the Plan state when resuming the goal, maintaining a consistent workflow.
For detailed information on Plan, see Plan Before Execution (Plan).
Command Summary
| Command | Description |
|---|---|
/goal <description> [--turns <n>] | Create or update a goal, with an optional limit on maximum turns |
/goal status | View the current goal status |
/goal pause | Pause the current goal |
/goal resume | Resume a paused goal |
/goal take | Take over goal ownership for the current session |
/goal clear | Clear the current goal |

