What is a coding agent?

A coding agent is an AI agent that works on a code project. It reads files, edits them, and runs commands and tests in a loop. It uses the test results as feedback for its next step.

Updated

How a coding agent works

A model reads the code and plans a change. It uses tool calling to read files, write files and run shell commands. Each result goes back to the model, which decides the next step.

A coding agent can edit many files for one task description. It stops when the task is done or when it needs a person.

What it needs from the environment

It needs a shell that keeps its state during a run. Anthropic's Bash tool runs shell commands in a persistent session that maintains state. It also needs a file system to write to. The task may need network access too, for example to fetch packages.

Why it runs in a sandbox

The agent chooses the commands. A command can delete files or read credential files. Anthropic's sandboxing docs describe two layers. Filesystem isolation sets which paths a command can read and write. Network isolation sets which domains it can reach. A sandbox applies both layers. Code from a package or a repository can also be untrusted code.

What to check on a provider

  • Which paths and hosts the environment allows.
  • Whether files stay between runs, and for how long. See the idle timeout.
  • Whether the environment can run the project's build and tests.

Related terms

All glossary terms

Related