# Review the plan before the code

Coding agents made it cheap to start writing. They did not make it cheap to say yes. Teams are still reviewing a diff after the tokens are spent. The useful response is a method, not a panic: review the plan, before the code.

*First published on [getlake.dev](https://getlake.dev/blog/review-the-plan-before-the-code/?utm_source=hashnode&utm_medium=crosspost&utm_campaign=shiftleft) on 30 November 2026.*

## The expensive kind of wrong

By the time a pull request is ready, the agent has spent the tokens and you have spent the hours. Changing course in a plan costs a sentence. Changing it in a diff costs a rewrite.

The [2025 Stack Overflow Developer Survey](https://survey.stackoverflow.co/2025/ai) is a clear official snapshot of that mood. 84% of respondents use or plan to use AI tools, up from 76%, and 51% of professional developers use them daily. Favorable sentiment fell from more than 70% in 2023 and 2024 to 60%.

Trust is worse. More developers actively distrust the accuracy of AI tools (46%) than trust it (33%). Only 3% highly trust the output. Experienced developers are the most cautious: 2.6% highly trust, 20% highly distrust. Asked why they would still want a person in the loop, 75% said "when I don't trust AI's answers."

The frustration under those numbers has a name. 66% of developers are dealing with "AI solutions that are almost right, but not quite," and 45% say debugging AI-generated code is more time-consuming. "Almost right" is the expensive kind of wrong: it passes a glance, burns a run, and then burns a review.

## The bill is already in motion

This is not only a quality problem. Anthropic's [Claude Code cost documentation](https://code.claude.com/docs/en/costs) puts the average, across enterprise deployments, at around $13 per developer per active day and $150 to $250 per developer per month, with costs remaining below $30 per active day for 90% of users. Those are Anthropic's published figures, not a Lake measurement. Your team will differ. The point is that the money moves while the approach is still unreviewed.

On a Pro, Max or Ultra plan the dollar figure in `/usage` is an API-equivalent estimate, not your bill. The waste is still real: a wrong approach uses up the usage window, and then someone has to unwind the diff.

## The method

The method is shift-left. Code review stays. It just stops being the first time a human looks at the approach.

1. Review the plan before you let the agent build.
2. See a recommended model and an estimated dollar range for every step, before you approve.
3. Put a per-run cap on the run that stops and asks.

Claude Code already has the first half of step 1. In [plan mode](https://code.claude.com/docs/en/permission-modes) (`Shift+Tab`, or prefix a prompt with `/plan`, or start with `claude --permission-mode plan`), Claude researches and writes a plan but does not edit your source until you approve it. That is the right habit for one person in one session.

The gap is everything after that. A "yes" in a chat is easy to drift past. The plan is not in the pull request, a teammate cannot comment on exact lines, and if the agent later changes the approach there is no exact version that the approval was bound to. For a team, the plan has to live where review already lives: in the PR.

## What Lake puts in front of the agent

[Gate](https://getlake.dev/lake-gate/?utm_source=hashnode&utm_medium=crosspost&utm_campaign=shiftleft) is Lake's plan-approval capability. Plans live in the pull request as versioned files. A teammate or a manager reviews in rounds, comments on exact lines, and approves a specific plan version. Edit one word and the approval no longer applies. A PR check stays red until the current plan is approved, so unapproved work cannot merge.

Meter, in the same install, puts a recommended model and a dollar range on every step, and a run cap that stops and asks. This is a method you can install, not a case study. We are not claiming a savings figure for your team.

Plan approval (Gate) is free for up to 3 users and 20 plan reviews per calendar month per repo. Cost control (Meter) is free forever. Team is $15 per user per month and starts with a 14-day trial at install. Paid checkout is not open yet, so nothing is charged until you choose to subscribe.

```bash
npm i -D lake-gate && npx lake-gate init --cap 5
```

Working solo? Add `--try`. Run it in your repo, then commit. To block merges, make `lake/plan-approval` a required check. That needs a public repo, or GitHub Pro or Team for a private one; otherwise the check is advisory. PRs opened by a bot get the check once a person comments, reviews or pushes. Do not run `npx lake`: that installs an unrelated package.

## Start with plan approval

Put the plan in the pull request and hold the run until a teammate approves that exact version.

- [About Gate](https://getlake.dev/lake-gate/?utm_source=hashnode&utm_medium=crosspost&utm_campaign=shiftleft)
- [Try the live demo](https://getlake.dev/lake-gate/app/?utm_source=hashnode&utm_medium=crosspost&utm_campaign=shiftleft#/demo)

If you want a look at past Claude Code spend first, the [free waste calculator](https://getlake.dev/waste-calculator/?utm_source=hashnode&utm_medium=crosspost&utm_campaign=shiftleft) runs in your browser on a ccusage export. Nothing you paste is uploaded.

## Related

- [How to review an AI agent's plan](https://getlake.dev/blog/reviewing-ai-agent-plans/?utm_source=hashnode&utm_medium=crosspost&utm_campaign=shiftleft)
- [Approve agent plans in the pull request](https://getlake.dev/blog/approving-agent-plans-in-pull-requests/?utm_source=hashnode&utm_medium=crosspost&utm_campaign=shiftleft)
- [How much does Claude Code cost?](https://getlake.dev/blog/how-much-does-claude-code-cost/?utm_source=hashnode&utm_medium=crosspost&utm_campaign=shiftleft)

## Sources

- [Stack Overflow Developer Survey 2025, AI section](https://survey.stackoverflow.co/2025/ai): usage, sentiment, trust, "almost right," and the person-in-the-loop figure.
- [Anthropic, Manage costs effectively](https://code.claude.com/docs/en/costs): published enterprise averages and the note that subscription session costs are not the bill.
- [Anthropic, Choose a permission mode](https://code.claude.com/docs/en/permission-modes): plan mode behavior and how approval works in a local session.

