AI6 min read10 interview questionsNew · November

AI coding agents: what they do and how to pick one

How tools that read, edit and run your code work, and what to check before trusting them.

In one sentenceAn AI coding agent is a model with tools: it reads your project, changes files, runs commands and checks the result in a loop.

Think of it like thisIt is a junior developer who works very fast: useful when given clear tasks and reviewed carefully, risky when left unchecked.

The big picture

Tap any step to see where to use it, how to use it and an example result.

Chat helper versus agent

A chat assistant answers questions and writes snippets you paste yourself. An agent takes actions: it opens files, edits them, runs the test suite and repeats until the task works or it gets stuck.

What to compare when choosing

Names change quickly, so compare qualities rather than brands:

  • Where it runs: terminal, editor, or in the cloud.
  • What it may touch: files, commands, network. Can you approve each step?
  • Model choice, speed and cost per task.
  • How it handles large projects and keeps context.
  • Team features: shared rules, audit logs, data policies.

Working well with one

Give a clear goal, point to relevant files, say how to test, and keep tasks small. Ask it to explain its plan first on bigger changes. Use version control so every change can be reviewed or undone.

Staying safe

Never paste secrets into prompts. Run agents with least permission, preferably in a separate branch or sandbox. Treat web pages and files it reads as untrusted, because they can contain hidden instructions.

Common mistakes

  • Accepting large changes without reading them.
  • Giving the agent production credentials.
  • Starting with a huge vague task instead of a small clear one.
  • Skipping tests because the agent said it works.

Quick recap

  • An agent acts in a loop: read, edit, run, fix.
  • Compare where it runs, permissions, cost and context handling.
  • Small, clear tasks give better results.
  • You remain responsible for reviewing and testing.

Try it yourself

Pick a tiny bug or a small function in a project of yours. Write the task in three sentences: the goal, the file, and the test that proves it is fixed.

Top 10 interview questions

Ordered from basic to advanced. Try answering out loud first, then open the answer.

  1. What is an AI coding agent?Basic

    A programme that uses a language model plus tools to work on code: it reads files, makes edits, runs commands and tests, and keeps going until the task is done or it needs help.

  2. How is an agent different from a code-completion tool?Basic

    Completion suggests the next few lines as you type. An agent can carry out a multi-step task across many files and run things to check its own work.

  3. Why should you still review the agent's code?Basic

    Models can introduce bugs, misunderstand requirements or add insecure code while sounding confident. You are accountable for what gets merged.

  4. What makes a good task for an agent?Basic

    Small, well defined and checkable, such as fixing a failing test, adding a field, or writing documentation, with a clear way to confirm success.

  5. What do permissions mean for agents?Intermediate

    Settings about what the agent may do without asking, such as reading files, editing, running shell commands or using the network. Tighter permissions reduce risk but need more approvals.

  6. How do tests help when working with an agent?Intermediate

    They give a clear pass or fail signal the agent can use to correct itself, and they let you verify the result without reading every line first.

  7. What is context and why does it matter?Intermediate

    The information the model can see at once: your instructions, files and previous steps. Too little makes it guess, too much dilutes focus, so point it to the relevant files and keep tasks focused.

  8. How do you guard against leaking secrets?Intermediate

    Keep secrets out of the repository and prompts, use environment variables or a secrets manager, add ignore rules for .env files, and use scanning tools in the pipeline.

  9. What is the risk of prompt injection with coding agents?Advanced

    Text in a web page, issue or file the agent reads could contain instructions that it follows, such as running a command or sending data out. Limit network access, require approval for risky actions and review commands.

  10. How would you introduce coding agents in a team?Advanced

    Start with a pilot on low-risk work, agree rules for data and permissions, require the normal review and CI for agent changes, share good prompts and track quality and time saved.

Back to Learn Hub

Guides are simplified on purpose. Tool names and details change, so check the official documentation before relying on a detail.