lac agent: The Coding Assistant That Remembers Your ProjectPhoto by
Brett Jordan
on Unsplash
lac-cliJune 11, 2026· 5 min read
lac agent: The Coding Assistant That Remembers Your Project
lac agent is the part of lac-cli that actually reads and writes your code for you. It remembers your project between sessions, plans before it acts, and lets you undo any change with a diff preview before it's gone.
The part of lac-cli most people sleep on
Most people install lac-cli, run lac shell a few times, feel good about themselves, and stop there. Understandable. The shell is immediately satisfying — type plain English, get a command, done.
But lac agent is where the real work happens. It's the agentic coding assistant baked into lac-cli, and once you actually sit with it for a day, going back to copy-pasting from a chat window feels genuinely painful.
The first time, it'll walk you through picking your AI provider — Claude, GPT, or a local Ollama model if you want to run fully offline. After that, you're in.
Project memory: the thing that changes everything
Here's my old workflow: open a chat window, paste in three files worth of context, explain what the project does, what stack it uses, what I've already tried. Every. Single. Session.
lac agent doesn't do that to you. It stores project context in a .lac-memory.json file at the root of your project. The first time you use it in a repo, you give it a quick description of what you're building. From then on, it reads that file automatically every time you open a session. It already knows what the project is.
You can update the memory at any point — just tell it something like "we switched from Express to Fastify" and it updates the file. No manual editing required.
The difference in actual usage is hard to overstate. You stop re-explaining. You just ask.
When I give an agent a vague-ish task — "add email notifications to the auth flow" — I don't actually want it to start writing files immediately. I want to see its plan first.
That's what PlanMode is for. Before lac agent touches a single file, it lays out what it intends to do: which files it'll modify, what new files it'll create, what logic it'll add. You read through it, say yes (or push back), and then it executes.
It's a small thing that prevents a lot of mess. If the plan is wrong, you catch it before the codebase is touched. If the plan looks right, you've also got a quick mental model of the change before you review the diff — which makes reviewing faster too.
Undo with diff preview
Agents write code fast, and sometimes fast is wrong. lac agent has undo built in, and it's not just a raw revert. Before anything gets undone, you see a diff — exactly what changed, line by line — so you know what you're rolling back to.
I've used this more times than I'd like to admit. Usually it's because I was vague in my prompt and the agent made a reasonable interpretation that wasn't what I actually wanted. Two seconds to undo, then a more precise prompt, and it's fine.
Redo works the same way. You can step back and forward through changes with full visibility at each step.
This sounds obvious but it's worth saying clearly: lac agent doesn't give you code to copy. It opens the file, makes the change, and saves it. If you ask it to "add input validation to the user registration endpoint," it finds that file, writes the validation logic, and saves the result.
You can watch it work in real time. It tells you which file it's touching, what it's doing, and why. If something looks off midway through, you can interrupt it.
Combined with undo, this ends up being pretty low-risk in practice. You're not helpless if it goes sideways.
HTTP request runner
This one surprised me when I first used it. lac agent has a built-in HTTP request runner, so after it writes an endpoint, it can immediately fire a request at it and show you the response.
The workflow: describe the endpoint you need, agent writes it, agent hits it with a test request, you see the response in the same terminal session. If the response is wrong, you tell it what you expected and it iterates.
It's not a full replacement for something like the Route Explorer in LacCode Studio — but for quick backend work in the terminal, it covers a lot of ground without making you context switch.
For longer sessions with multiple moving parts, lac agent tracks tasks. You can give it a list — "implement auth middleware, add rate limiting, write tests for the user routes" — and it'll work through them one at a time, marking each done as it goes.
It also keeps this visible in the session, so you don't lose track of where you are if you step away and come back. The session state is just there.
A note on providers
Everything above works with Claude, GPT, or a local Ollama model. The config lives in ~/.lac/config.json. If you ever want to switch providers without redoing the whole setup, just run:
lac shell --setup
It'll walk you through the provider wizard again and update the config. Your project memory is untouched.
lac agent isn't trying to be a full IDE replacement. It's a focused tool: it knows your project, plans before it acts, writes and edits files directly, and lets you undo anything with a diff in front of you. That's it.
For the kind of work I do — building out features, wiring up endpoints, refactoring specific modules — that's enough. I spend less time in chat windows re-explaining context, and more time actually reviewing and shipping code.
If you haven't gone past lac shell yet, run lac agent in a real project today. Give it something non-trivial and see how it handles the plan step. That's usually the moment it clicks.