All guides

Cline Plan then Act: implement one small change

Work out one small, non-obvious change in read-only Plan mode, switch to Act, then review the diff and keep a rollback point.

AINavWritten / Updated Sources checked
On this page

At a glance

Plan and Act split thinking from doing. In Plan mode Cline can read your codebase, run searches and discuss strategy, but cannot modify files or execute commands. Switching to Act lets it edit files and run commands, and the conversation history carries over. This tutorial walks one small change through that path: use Plan to establish which file to touch and how, confirm nothing was written, then make only that change in Act. On task size, the official guidance is that typo fixes, missing imports and config-value edits are usually faster straight in Act. This article is for changes that are small in scope but where you cannot yet say which file or approach is right.

Workflow

  1. Decide whether to plan at all

    The official guidance is by size. Small tasks such as typos, a missing import, a config value or renaming a variable go straight to Act. Medium tasks such as a new endpoint, a UI component, a bug needing investigation or refactoring one module use Plan then Act. Work spanning frontend and backend, needing architectural decisions or several sessions uses the /deep-planning slash command. This article covers only the small case where the location is unclear.

  2. Plan mode is read-only

    Cline can read files, search and discuss, but cannot modify files or execute commands. The documentation calls this constraint intentional: it keeps the conversation on understanding and planning instead of implementation detail.

  3. Act inherits the context

    Conversation history carries over when you switch, so you do not need to repeat the request. When unexpected complexity appears, the documented move is back to Plan rather than pushing through in Act.

Each stage cites official sources.

Before you start

  • A project open in your editor that Cline can read. If Cline has not run in this workspace yet, set it up with the official installation instructions first.
  • One change you can express as an acceptance criterion, such as "formatDate('') returns an empty string and a test covers it", rather than a backlog of chores.
  • A baseline to compare against: Cline checkpoints enabled, or a version-control record of your own.

1. Write the change as one acceptance sentence

Draft it in the input box without sending yet: the current behaviour, the wanted behaviour and how you will know it passed. Point at the files you already suspect with file mentions. If you can name the exact line to edit, skip planning and use Act, as the official guidance suggests.

2. Be in Plan mode before sending the first message

Confirm Cline is in Plan mode, then send the drafted message. In this mode it reads, searches and discusses without writing. Ask it first to list the files it intends to read, so you can see immediately whether it is looking in the right place.

3. Ask for a plan in the chat that you can check

Request four things in the conversation: the files and functions it would change, the shape of the edit, the edge cases (empty or null input, existing callers that rely on the current behaviour) and how it would verify the result. Plan mode cannot modify files, so do not ask it to write a document now. To keep a record, copy the plan yourself, or after switching to Act ask Cline to write it into a markdown file, as the documentation's tips suggest; that file will then show up in the Act diff.

4. Confirm Plan mode wrote nothing

Compare the workspace against your baseline and confirm no file changed. If the plan turns out to touch far more files than you expected, stop and treat it as a larger task, for example with /deep-planning, instead of improvising inside Act.

5. Enable checkpoints, then switch to Act

The documentation recommends enabling Checkpoints before Act so you can roll back. After you switch modes the planning context carries over, so do not restate the request. If planning needs stronger reasoning while implementation needs speed, Cline Settings offers "Use different models for Plan and Act", with one model chosen per mode and switched automatically.

6. Keep Act inside the agreed scope

Ask for the one planned change only: no opportunistic renames, refactors or dependency upgrades. When it finishes, read the diff line by line and confirm every change lands in the files the plan named (apart from a plan file, if you asked for one).

7. Verify, then keep or roll back

Run the verification the plan named, using your project's own tests or checks, and confirm the acceptance sentence holds. If unexpected complexity appears, switch back to Plan and rethink instead of stacking more edits. Commit if you keep the change; roll back through checkpoints if you do not, and stop there.

Original example

Synthetic example, not a test run. A small internal tool repository has src/format.js, where formatDate throws on an empty string. The first Plan-mode message could read: "Plan only, do not change files. Goal: formatDate('') should return an empty string instead of throwing, with a unit test covering that case. Relevant files: src/format.js and the test file beside it; mention them so I can confirm the location first." What you want back from the Plan phase, all in the conversation: the affected file (src/format.js), the function to change, whether any caller depends on the current throw, which test file the case belongs in and what it is called, and the command your project already uses to run tests. At that point the workspace should still be unchanged. Then enable checkpoints, switch to Act, ask for that single edit, and finish by reading the diff and running the test command.

Completion checks

  • After the Plan phase the workspace diff is empty apart from your own manual edits, which shows the read-only constraint held.
  • The plan names a concrete file, function and verification step instead of something unverifiable like "clean up the formatting".
  • The Act diff touches only the files the plan named; any extra change gets questioned or rolled back.
  • Verification runs the project's own tests or checks, and you see the result yourself instead of accepting "should be fine".

Limits

  • The documentation says obvious small fixes (typos, a missing import, a config value, a renamed variable) are faster straight in Act; the planning path here suits small changes whose location is not yet clear.
  • Planning builds context but does not guarantee a correct result. You still review the diff and run the verification yourself.
  • The documentation says conversation history carries over when you switch modes. Saving a baseline (checkpoints or version control) before you start is this article's editorial advice, not a documented promise about manual edits.

Verification scope

Written from the current official Plan & Act documentation, which was read for this page. Sign-in, installation, running the product API, file uploads and generated output were not tested. The sample is a synthetic project, not your repository, and nothing here claims how well a particular model performs.

Article sources

Original editorial content; official descriptions and checking suggestions are distinguished.

  1. Cline · Official sources
    View details