For the past three years, AI coding help has mostly meant a copilot: autocomplete and chat, with the developer firmly in control of every keystroke. Since February, that has changed quickly:
- Anthropic released Claude Code, a terminal-based agent that reads a codebase, edits files and runs commands, as a research preview on 24 February.
- GitHub introduced agent mode in Copilot for VS Code, which iterates on its own changes, runs terminal commands and fixes errors it sees.
- Cursor, Windsurf and others made agentic workflows the default in their editors.
- Benchmarks such as SWE-bench Verified show the best systems resolving well over half of a curated set of real GitHub issues, up from single digits two years ago.
Andrej Karpathy coined the phrase "vibe coding" in February for letting the AI drive entirely. Most professional teams are finding a more disciplined middle ground.
What is the difference?
A copilot predicts or drafts code in response to what you are doing right now. It sees your editor and perhaps some of the repository, and you decide what to keep.
An agent is given a goal and works towards it in a loop, using tools:
flowchart LR
T[Task] --> P[Plan]
P --> E[Edit files]
E --> R[Run build / tests / linters]
R --> C{Passing?}
C -->|no| P
C -->|yes| D[Summarise diff<br/>for human review]It can search the codebase, open and edit many files, run the test suite, read the errors and try again, sometimes for many minutes, before handing back a diff.
When to use which
Copilots work best when:
- you are in flow on a task you understand well,
- the change is small and local,
- you want to stay close to every decision, or
- you are exploring and do not yet know what you want.
Agents work best when:
- the task is well specified, with clear acceptance criteria,
- the codebase has good tests and fast feedback,
- the work is mechanical but spread across many files (upgrading a library, adding a field end to end, fixing a class of lint errors), or
- you can run it in parallel with other work and review the result later.
Agents struggle when:
- requirements are vague or depend on unwritten business context,
- the test suite is weak, so "passing" does not mean correct,
- the environment is hard to reproduce (external services, special hardware), or
- the change needs architectural judgement.
Working effectively with agents
Write the task like a good ticket. Context, goal, constraints and a definition of done. Agents follow instructions literally.
Goal: Add optional `purchase_order` (string, max 64 chars) to invoices.
Scope:
- DB migration (nullable column), model, serializer, API docs
- Show it on the invoice PDF under the billing address if present
- Do not change existing invoice numbering or PDF layout otherwise
Done when:
- `make test` and `make lint` pass
- New tests cover create/update/validation (length > 64 rejected)
- Summarise every file you changed and whyKeep tasks small. A focused task produces a diff you can actually review. "Refactor the billing module" produces thousands of lines nobody can check.
Give the agent a project guide. Most tools read an instructions file (for example CLAUDE.md, or rules files in Cursor) with build commands, conventions and things to avoid. It saves repeated explanation and reduces mistakes.
Invest in tests. An agent is only as good as the feedback it gets. Fast, reliable tests are now a productivity multiplier for AI as well as humans.
Review like it came from a new colleague. Check that it solved the right problem, that tests actually test the behaviour, and that it did not quietly change unrelated code, weaken assertions or skip failing tests.
Security and safety
Agents run commands and edit files, often with your credentials. Sensible defaults:
- Run in a sandbox (container, dev container or cloud workspace) without production credentials.
- Require approval for commands outside a known-safe list, and for anything touching the network, secrets or Git history.
- Scope tokens the agent can see to the minimum. Never leave cloud admin credentials in the environment.
- Be wary of untrusted input. Issue text, README files and dependency code can contain instructions aimed at agents.
- Keep the normal gates. Agent-authored pull requests go through CI, security scanning and human review like any other.
What it means for teams
The developer's role is shifting from writing every line to specifying, supervising and reviewing. Skills that matter more than ever:
- breaking work into clear, testable tasks,
- understanding the system well enough to judge a diff quickly,
- writing good tests, and
- knowing when to take the keyboard back.
The bottom line
Copilots and agents are complementary. Use copilots when you want to stay in the flow of writing code, and agents when you can describe the outcome and let a tireless, fallible colleague do the legwork. Either way, humans stay accountable for what ships.
Our secure SDLC team uses coding agents within a reviewed, sandboxed workflow, and our agentic AI security practice helps organisations adopt them safely.