- **Strength per phase** (off): turn on **Set strength per phase** to pick **Thrifty**, **Balanced**, **Best** or **Match my session** for each phase still to build (or **Set all to** one pick). A phase you leave untouched runs on the model the app was launched with, as before. A phase whose agent crashes or goes quiet gets its one retry (when the retry tick is on) one step up (Thrifty to Balanced, Balanced to Best; Best stays Best; **Match my session** runs on the launch model and its retry stays there), and the phase's helpers follow the same strength. Which model each word means for your agent is set in User Preferences, **Agents & models**, under **Strengths in the loop**; an agent with nothing mapped shows the toggle off with a link there. The picks are remembered per project and spec, and a pick for a phase that is done or gone is dropped.
- **When a phase asks something**: **Take the agent's best guess** (the default), which records the
assumption as a `[?]` task, **Pause and wait for me**, or **Stop the loop**.
- **After the last phase**: **Stop and offer Finalize** (the default) or **Run Finalize automatically**.
- **Quick check**: a command run after each phase, pre-filled from the project (for example
`npm run build`). Clearing it still lets you start; the setup warns that nothing is checked.
- **If a phase crashes or goes quiet**: **Retry it once** (on), and how many minutes with no file changes, in the project or the agent's
session, count the agent as stuck (20). Waiting on your answer does not count.
- **Send a notification** (no address, so off): a message from the loop when it waits on your answer or
ends. Send it to a Discord, Slack, Microsoft Teams or Google Chat webhook, or to any `http` or `https`
address with the message in its query string or a JSON body.
- **Commit each phase** (on): one local commit per phase, with the subject and `AI Assisted`.
The last setup is remembered per project in `~/.plan2code/console/loop-setup.json`, so the next loop
starts from it. The quick check is typed text the page never runs: the app reads it from that file
itself and names it in its own window before the loop begins. The notification gets the same treatment,
and Resume asks again if either one changed.
**The notification.** The loop says a question is waiting, that it is complete, or why it stopped. Nothing
is sent when you stopped it yourself, and with **Take the agent's best guess** no question ever waits on
you. What the app sends depends on the **Send to** choice:
| Send to | Request | Where the message goes |
| --- | --- | --- |
| A web address, query string | GET | A parameter you name (`message` by default), added to the address's own |
| Discord webhook | POST JSON | `content`, with mentions turned off |
| Slack webhook | POST JSON | `text` |
| Microsoft Teams webhook | POST JSON | An Adaptive Card, for a Workflows "when a webhook request is received" trigger |
| Google Chat webhook | POST JSON | `text` |
| A web address, JSON body | POST JSON | A field you name (`message` by default) |
**Send a test** saves the setup and sends a test message right away, after the app names the address in its
own window, so a wrong address shows up before a long run. A name can use letters, digits and `- _ . ~`. Pasting a Discord, Slack, Teams or Google Chat address picks
its choice for you, since a plain GET to a Discord webhook answers 200 and posts nothing. The call has 10
seconds and any 2xx answer counts. One that fails never changes what the loop does: the finish line or the
stop screen's evidence says so, without repeating the address, which is stored in `loop-setup.json` and
usually holds a token.
**It uses the app's agent.** The loop starts every phase on the agent and model you launched the app
with, and it needs permission checks off. With them on, an agent would wait on a prompt that nobody
sees, so **Start the loop** stays grayed out until you turn them off (see
[Permission checks are off by default](#permission-checks-are-off-by-default-same-as-the-terminal)).
**What is locked while it drives.** Answers, sign-offs, launches, Workspace, Helpers, **Back** and
**New Session** are read-only, and Ask is off, except for a question the loop is waiting on. Activities, Notebook, Help, Preferences, the documents
and the code review stay usable, so you can watch, play, or read along.
**You can always see it's running.** From the moment you confirm Start until the loop ends, a banner runs
across the top of the window, outside the console page, so it stays put as each phase's session comes and
goes. It says what the loop is doing right now (starting, building, between phases, stopping), with the
phase, its name and step, a pip per phase, the time so far and any retries. It turns amber when a question
needs your answer. The window title says the same, for the taskbar. While the loop works, the page's Send
button and "Nothing to send" line go away, and they come back when a question waits.
**Stopping it.** Two buttons on the banner: **Stop after this phase** lets the phase finish its
review, mark and commit, then ends the loop; **Stop now** ends the agent at once, after you confirm, and never commits, retries or finishes the build (a commit already begun finishes first). Stop after can be canceled by pressing it again. After a window reload the banner and both buttons come back, and Change project and Change agent are blocked while the loop runs.
Quitting the app ends the loop too, and the quit check says which phases are already committed.
**A question holds the loop.** When a phase needs an answer (with **Pause and wait for me**), the loop
waits with no time limit and nothing is lost. The app calls you back with the taskbar dot, a flash
of the window and the question sound, and carries on once you answer.
**When it stops by itself.** The loop ends on a stop screen, saying what failed and showing the
evidence, when:
- the phase's named tests or the quick check fail;
- Critical or Warning findings are left after the re-check, at a level the setup said to fix (a leftover Suggestion does not stop it);
- a task is blocked or the spec conflicts with itself;
- a commit is refused, for example by a pre-commit hook (the app puts the phase file back as it was, so the spec and git agree, and stops with the hook's first line; if the undo fails too, it says so and remembers it across a restart);
- a staged file looks like a secret (`.env` and the like; `.example`, `.sample` and `.template` are fine) or is oversized (nothing stays staged, and the stop line names the file);
- the project is on a detached HEAD (the loop will not start);
- the agent's report is missing task data or says its tests failed (the phase is refused);
- the watcher cannot read the session or hits an internal error (it ends on a stop screen, never a hang);
- the Smart pick skipped a Critical finding.
A crashed or silent agent gets exactly one retry per phase when the retry tick is on, and none when it is off.
It never retries a real failure. On a stop screen, **Ask a question** (first in the row, offered whenever Resume is) wakes an ordinary agent on the stopped phase on the same page, so the Ask tab answers; it starts no loop and changes nothing, and **Resume the loop** is still there afterwards. **Resume the loop** carries on from the stopped