Updated June 2026

Habits that separate productive sessions with a coding agent (Claude Code, Cursor, Codex, Copilot’s agent mode, or anything like them) from frustrating ones. None of this is about prompts; it’s about workflow.

Plan before code, especially when it’s tempting not to

For anything beyond a small fix, have the agent state its plan before touching files. Reviewing a plan takes thirty seconds; reviewing a 400-line diff built on a wrong assumption takes thirty minutes and usually ends in a revert. The plan is where you catch “oh, you thought the config lived in the database” while it’s still free to fix. The corollary: when the agent’s plan is wrong, stop it and correct the framing rather than letting it finish and patching the result.

Specify the destination, not the route

Agents do better with a well-specified goal and constraints than with step-by-step instructions. “Add rate limiting to the public endpoints; use the existing Redis client; don’t introduce new dependencies; tests must pass” beats a numbered list of edits, because the agent can adapt when reality differs from your mental model of the code. Save the prescriptive style for when you’ve already decided exactly what you want, and then say it exactly.

Make it prove its work

“Done” from an agent is a claim, not a fact. The difference between a useful agent and a confident liar is whether the claim comes with evidence: the test output, the command that exercised the change, the screenshot. Build verification into the request itself (“run the tests and show me the output before reporting done”) rather than auditing after. Agents are generally good at running checks when asked and notably optimistic when not.

Keep diffs reviewable

The agent can produce more code per hour than you can review per hour, and the moment you stop reviewing is the moment quality becomes unknown. Work in increments that fit in your head: one feature, one fix, one refactor per session-chunk, committed when green. If a diff comes back too large to actually read, that’s a prompt problem; ask for less at a time. You are the rate limiter, on purpose.

Give corrections a permanent home

When you correct the agent (“we use pnpm, not npm,” “tests live next to the source”), that correction dies with the session unless you write it down. Project instruction files (CLAUDE.md or equivalent) are where session-corrections go to become defaults. A team’s instruction file is compound interest: every mistake it prevents, it prevents forever. The test for what belongs there: would I have to say this again in a fresh session?

Know when to reset

Sessions degrade as transcripts fill with dead ends and stale file contents (see Context Windows in Practice). When the agent starts re-asking settled questions or contradicting earlier decisions, don’t push through; summarize the state, start fresh, and paste the summary. Two good one-hour sessions beat one degraded three-hour one.

The thread through all of it: treat the agent like a fast, eager collaborator with no memory and no stake in the outcome. Structure supplies the memory; verification supplies the stake.