16. Plan and todo
16.1 Plan
Under plan mode the assistant typically produces a structured plan:
- Overall goal
- Phases
- Per-phase inputs / outputs / risks
The plan shows on a floating card and supports:
- ✓ Accept (enter execute)
- ✏ Edit (edit inline and hand back)
- ✗ Reject (have the assistant redo)
16.2 Todo
During execution the assistant maintains a live todo list, marking progress:
- Todo
- In progress
- Done
- Skipped / failed
The todo list is shown live in the "Todos" strip (forms described in §5.5.1); you can add / adjust items at any time.
Removing an item by hand: unfinished items (todo, in progress) have a "Remove" button at the end of the row; finished items don't show it, to prevent accidental removal. While the session is running the button is greyed out ("Session is running; remove after it finishes") — remove it after the turn ends. The removal is written into the session history as a hidden record and tells the Agent this is your explicit decision and not to add it back — so it doesn't come back after reopening the session, context compaction or a restart.
16.3 Preserved across compaction
When history compaction happens (Chapter 17), plan and todo structured state is preserved verbatim in the new summary — never compressed into something fuzzy. So even in long conversations the AI knows exactly "what I'm doing, where I am".
16.4 End-of-turn todo check
When a turn wraps up (isGoalTurnFinalRecord), the todo list still has open items, and the turn called other tools after it last updated the list, AVL Code auto-injects a hidden user message (source = auto_todo_nudge) asking the agent to reconcile the list only: mark finished items as completed, rewrite items whose wording no longer matches what was done, delete ones that are no longer needed — then end the turn.
- Bookkeeping, not taskmastering: the check turn explicitly tells the agent not to execute unfinished items and not to ask whether it should continue — driving the work is up to you (or the session goal); the check only keeps the list in step with reality.
- No wasted turns: a turn that already updated the list after its work, a plain Q&A turn that called no tools (or only helper tools such as asking you, loading tools, or recalling memory), and a turn you stopped yourself do not trigger a check; the check turn itself never triggers another check. Reading and analysis tools do count as work — many todos are completed by analysis alone.
- Rides along when it can: if the turn already sends an automatic message (goal continuation, compaction follow-up, …), the check is appended to that message as a one-line "also reconcile the todo list" instead of costing an extra turn.
- Same family as goal auto-continuation and the compact nudge — another end-of-turn hook member.
- Hidden user message: doesn't show in the visible conversation stream, but the agent reads and responds to it.
16.4.1 Giving the model a dignified way to stop
After you say "hold on a moment", the assistant can report a pause of its own — it emits an internal marker meaning "holding off on these todos as you asked" — and automatic checks stop until the todo list actually changes (an item gets crossed off or the list is rewritten for a new task). A working turn that ends by asking you a question is likewise treated as waiting on you, and no check is sent.
- The marker never appears in the body text; your replies stay clean. It is visible in the Trace panel as a "Todo paused" step, and the summary card carries a "Todo paused" counter (see §9.4.2).
- The pause intent survives context compaction, so a compaction doesn't make the check "forget you said stop" and start over.
- It can ask you for help when it's stuck: when the assistant genuinely can't make progress it raises a question and waits for your answer (this channel used to be blocked by an internal allowlist, so a stuck model had nowhere to turn).
- Unattended subtasks won't raise a form at you: asking for help only happens in sessions you are actually present in; unattended runs never leave a form sitting there with nobody to answer it.
- Restarts don't lose the thread: the pause intent is persisted with the session and inherited after a restart; a turn that stops midway through tool calls (an abnormal ending) still gets one check.
16.5 Session goals and auto-continuation
The session goal strip (the "Goal" item in the status strip — shapes in §5.5.1) sets one overall goal for the session and keeps the assistant moving toward it.
You can edit it right in the panel: opening the goal popover lets you edit the objective and the token budget in place:
- Changing the objective pulls the state back to "Active" and injects the updated guidance on the next turn; changing only the budget leaves progress alone.
- An empty budget means unlimited; when the budget is exhausted the assistant enters wrap-up mode and starts no new work — you can click "Continue" to let it carry on, or simply raise the budget.
- Slash commands work too:
/goal <text>to set,/goal budget <N>for the budget,/goal pause/resume/complete/clear.
States, and "Paused (idle)":
| State | Meaning |
|---|---|
| Active | Being advanced toward the goal |
| Paused | You paused it by hand |
| Paused (idle) | The goal is still there, but no assistant is currently running, so nothing is advancing it |
| Complete / Budget exhausted | Terminal states |
In the idle state the popover offers a "Keep going" button — one click and the assistant carries on toward the goal; the short window between the click and the actual start no longer flashes "Paused (idle)" by mistake.
Spinning gets stopped: goal auto-continuation carries stall detection — several rounds in a row without real progress and it stops, instead of burning the budget all the way to the ceiling. Stall detection is frozen while a subtask is running (a parent session merely waiting on a subtask isn't "stuck"), and those waiting rounds don't count toward the continuation round cap.
Goals and todos no longer fight: goal continuation and the todo check share one injection channel — when a check is due it rides along in the continuation message as a postscript, so neither starves the other (previously the two competed for the same slot and one of them would go ineffective for long stretches).
The counter display is switchable: clicking the token-usage figure on the goal strip cycles the format (raw / thousands separators / compact / percentage), which makes big numbers in long sessions much easier to read; with subagents present you can expand the "self / subagent / tool calls" breakdown.
