Plan, to-do list and goal
A large task in Buff Code: a plan with approval, the agent’s to-do list and a /goal — the agent takes turns until a check confirms the result.
Three ways to keep a large task under control:
| What it is | When you need it | |
|---|---|---|
| Plan | the agent first studies the code and proposes a plan without changing anything; it starts working after your “yes” | the task touches several files or decisions and you want to agree on the approach |
| To-do list | the agent splits the work into steps and ticks off what is done | any multi-step task — the agent keeps it by itself |
| Goal | the agent takes turn after turn until a check confirms the result | the result can be checked, and the number of steps is not known in advance |
Plan
Click “Plan” in the line under the input field and describe the task. While the toggle is on, the agent reads and searches and asks questions, but does not edit files or run commands that change anything.
- The agent studies the code. If the task lacks a decision, it asks — with a question with answer options (see The agent’s questions).
- The plan arrives as a “Plan · Waiting for approval” card: rules, steps, files, the check. “Show in full” expands a long plan, “Copy” copies it as text.
- Above the input field there is the question “Approve the plan and start working? Or write what to change”:
- “Approve and start” — plan mode is turned off, and the agent gets to work;
- your own answer — what to change; the agent rewrites the plan and asks again.
After approval the card is marked “Approved”. Starting new sessions right in “Plan” can be chosen on first launch or in the settings — see Settings.
To-do list
For multi-step work the agent keeps a to-do list: the line “To-dos 0/4 · Add expensive tea to catalog.js” shows how much is done and what is in progress. The same line sits above the input field; a click expands the whole list, with done items struck through.
Goal
/goal <what must be true> sets a goal for the session. The agent takes a turn; after every turn
a separate check decides whether the goal has been reached — and if not, the agent gets the reason and takes
the next turn.
/goal the file stock.txt contains the number 2. In one turn increase the number by 1 (no file — create it with 1) and end the turnAbove the input field there is the goal line:
- “Goal · iteration 2 · In progress: …” — under it, the check’s output after the previous turn: what is already done and what is missing;
- “Pause” — stop after the current turn, “Resume” — get back to the goal;
- “Reset” — remove the goal.
When the check confirms the result, the line turns green — “Achieved” — with an explanation of why. In the feed, under the last answer, there is a collapsed “Goal” mark with the same result.
Worth knowing:
- If the check’s answer cannot be parsed, it asks again once and then pauses the goal with its answer — instead of an endless loop.
- A turn that broke off with an error pauses the goal with the error text.
- Write the goal as a checkable statement about the result (“the tests are green”, “the file contains 2”), not as an action.
In the console
| What | How |
|---|---|
| plan | shift+tab — switch the agent to Plan and back; the plan arrives in the feed, approval comes as a question |
| to-do list | the line “To-dos N/M · /todos” under the feed; /todos — the whole list |
| goal | /goal <text>; the goal line above the input field; pause, resume and reset — in the palette (ctrl+p): “Buff: goal — pause / resume / reset” |
Changes and undo
What the agent changed in a turn and how to take it back: the summary under the answer, the diff, a safe rewind that checks for other edits, the file tree.
Side conversation
A side conversation: ask something along the way without derailing the main task. It sees the main session, which does not see it; selections go as quotes.