Products Marketplace Blog About Contact Sign in Download
lac agent PlanMode: Think Before You Touch a File

lac agent PlanMode: Think Before You Touch a File

Running an AI agent that edits files without showing you the plan first is a bit like handing your codebase to a contractor who starts demolition before you've agreed on the scope. PlanMode in lac agent fixes that.

The Problem With "Just Do It" Agents

Most AI coding tools have one mode: aggressive. You give them a task, they start writing files, and somewhere around the fourth edit you realise they've misunderstood the whole thing. You've got half a refactor, a broken import, and no clean way back.

I've been there. You type something like "extract all the auth logic into its own module" and the agent interprets that as permission to restructure half the project. Not what you wanted. Not even close.

That's the gap PlanMode in lac agent fills. Before touching a single file, the agent lays out exactly what it intends to do — which files it'll read, what changes it plans to make, and in what order. You review it. Then you decide whether to proceed.

How to Trigger PlanMode

Start lac agent the usual way:

lac agent

Once you're inside a session, you can activate PlanMode before giving any task. The agent will respond with a structured breakdown of its intended actions rather than jumping straight into edits. Think of it as asking "show me the blueprint" before the build starts.

This is especially useful for tasks that touch multiple files, involve moving or renaming things, or require a sequence of steps where the order matters. Anything where you'd normally want to sanity-check before committing.

What the Plan Actually Looks Like

When PlanMode is active, the agent doesn't just say "I'll update three files." It breaks things down with real specificity. You'll typically see:

  • Which files it's going to read first to understand the current state
  • Which files it intends to create, modify, or delete
  • A rough sequence — what happens first, what depends on what
  • Any assumptions it's making that you should know about

That last point is the one I find most valuable. The agent will surface things like "I'm assuming authMiddleware is the only place this token logic lives — if there are other callsites, let me know." That kind of upfront transparency catches mismatches before they become bugs.

Why This Matters More Than You'd Think

There's a version of this you might brush off as hand-holding. Like, why would you need to review a plan for a small task? Just let it run.

Here's the thing: small tasks don't stay small. "Add a created_at timestamp to this model" turns into a schema migration, a serializer update, and three test fixtures — if the agent is doing it properly. Seeing that spelled out before it starts is useful. You might realise the migration needs to run in a specific order with other pending changes. You might catch that the test fixtures it plans to touch are actually generated, not handwritten, and shouldn't be edited directly.

PlanMode gives you that moment of review without having to interrupt mid-edit.

It also pairs really well with the undo/diff system already built into lac agent. If you approve a plan and something still goes sideways, you can roll back cleanly. But honestly, catching the problem at the plan stage is cleaner than catching it after the diff.

PlanMode vs. Just Asking "What Would You Do?"

You could technically just ask lac agent "what would you do if I asked you to X?" in a normal session and get something similar. I've done that. It works, but it's looser — the agent treats it as a hypothetical and the output is more conversational than structured.

PlanMode is intentional. The agent knows you're in planning mode, so the output is formatted for review, not for conversation. It's the difference between asking a friend what they'd do and asking a contractor to write up a scope of work.

Where It Fits in a Real Workflow

The way I use it: anything that touches more than two or three files goes through PlanMode first. Refactors, feature additions that span layers, anything involving the database schema. Quick fixes — update a string, add a parameter — I just let the agent run directly and use diff preview before confirming.

If you're working on a shared codebase and don't want to explain to a teammate why half a module moved, PlanMode is the check you want before you let the agent loose.

It also works well at the start of a new lac agent session when the project memory in .lac-memory.json is catching up. The plan review gives you a quick signal that the agent has the right mental model of your project before it starts making changes.

One More Thing: PlanMode and /multi

If you're running /multi to split a task across parallel agents, PlanMode becomes even more important. With multiple agents working at once, you really want to confirm the overall plan before the session starts — especially since the Project Manager agent will be synthesising their outputs. A misaligned starting plan compounds across agents fast.

Review the plan, confirm it makes sense, then kick off the multi-agent run. That sequence has saved me from some messy merge situations.

Try It on Your Next Bigger Task

If you haven't used lac agent yet, grab it with:

pip install lac-cli

Or the one-liner:

curl -fsSL https://lacai.io/install.sh | bash

Then next time you're about to kick off something that touches more than a couple of files, start the session and engage PlanMode before you describe the task. Read what comes back. Correct any wrong assumptions. Then let it run.

It adds maybe thirty seconds to the start of a task and regularly saves ten minutes of untangling on the other side. That trade-off is pretty easy to make.

We use cookies to keep you signed in and to serve ads via Google AdSense. By continuing to use this site you agree to our Privacy Policy.