DEV Community

Wadi zaatour
Wadi zaatour

Posted on

Rethinking Claude Code Best Practices

Coding-agent workflows used to require constant supervision:

  1. Start a session.
  2. Approve commands one by one.
  3. Correct the model when it gets stuck.
  4. Add another warning to CLAUDE.md.
  5. Review every change manually.

That made sense when sessions were short and models needed frequent steering. But as coding models become better at understanding repositories, running tests, and working for longer periods, this workflow starts to look like a bottleneck.

In her talk “Rethinking Claude Code Best Practices”, Lydia Hallie argues that developers should move up a level: spend less time supervising every action and more time designing the system around the agent.

The responsibility is moving

The developer is not disappearing from the process. The responsibility is moving to better layers:

Responsibility Better place for it
Understanding the task The model and a clear specification
Routine approvals Permission mode and policy
Absolute prohibitions Deny rules
Limiting side effects Sandbox or isolated environment
Detecting incorrect work Tests, hooks, and CI
Final judgment Human review based on risk

This is the difference between watching an agent work and engineering a safe agent workflow.

Your CLAUDE.md may contain too much history

Project instruction files tend to grow after every frustrating model mistake. Soon they contain:

  • repeated descriptions of the folder structure;
  • obvious framework information;
  • “IMPORTANT” warnings added after one old failure;
  • generic advice such as “write clean code”;
  • rules that are already enforced by tests or permissions.

The problem is not that documentation is bad. The problem is that old corrections may become noise for a stronger model. Too many instructions can lead to unnecessary tool calls or cause the model to follow a less useful path.

What should stay?

Keep information the model cannot reliably discover from the repository:

  • a legacy service that is not clearly referenced in the code;
  • an external system with unusual deployment constraints;
  • a business rule that is not encoded in tests;
  • a security boundary that must always be respected;
  • a precise definition of “done.”

Reduce information the model can discover by inspecting the project:

  • the obvious programming language;
  • the normal directory layout;
  • generic style advice;
  • repeated warnings that are already automated.

A useful test is:

If this instruction disappeared, would the model still be able to discover the answer from the repository?

If yes, it may not belong in the instruction file.

Claude Code running in a terminal

Example of a Claude Code terminal workflow. Image source: Dane Grant.

A better task description

Instead of filling CLAUDE.md with every possible warning, put the important acceptance criteria directly in the task:

Implement the API migration.

Done means:
- existing sessions continue to work;
- new logins use the new API;
- the old API is not called by production code;
- the relevant tests pass;
- the build completes successfully;
- the final response includes the commands run and their output.
Enter fullscreen mode Exit fullscreen mode

This gives the model a clear target without turning the project instructions into a historical list of everything that once went wrong.

The new role of the developer

The central shift is from micromanagement to system design.

You still decide what should be built. You still define what must never happen. You still review important changes. But routine steering can increasingly be handled by the model, while safety and quality move into enforceable controls.

That leads to the next question: if the model is allowed to work more independently, how do we keep it safe?

In Part 2, we look at auto mode, deny rules, sandboxing, and isolated cloud sessions.

Top comments (0)