## Summary Addresses 106 of the 113 conflicts between the docs and the code that the November audit of `main` found: 102 are fixed and 4 have an interim docs fix. Every finding was re-checked against the code before it was fixed. Most fixes are docs-only. Three are small code fixes where the docs described the intended behavior and the code was wrong, each in its own commits so it can be split out. No change in this PR alters template build or agent behavior. ## Changes Fixes by area (finding counts): templates 28, install 13, integrations and monitoring 13, auth and security 12, networking 11, Coder Agents 9, AI governance 7, reference 7, workspaces 6. Code fixes. Each needs a look from the code owner. If an owner prefers not to take one, drop its commits and I will change the docs to describe the current behavior instead. | Commits | Change | Risk to check | |---------|--------|---------------| | `fix: keep built-in listener defaults in packaged coder.env`, and three follow-up commits | `coder.env` comments out `CODER_HTTP_ADDRESS=` and the three `CODER_TLS_*` lines, so an untouched package install listens on `127.0.0.1:3000` as the docs say. Only the `CODER_HTTP_ADDRESS=` line changed behavior. The TLS options default to empty, so commenting them out is for consistency. The Lima examples rewrite the commented line and fail if the line is not found. A test compares every option that the file sets against the built-in defaults. | The deb and RPM packages were not built or installed. Every released package through v2.39.0 ships the empty line, and upgrades keep an existing file (`config\|noreplace`), so the upgrade pages now say how to fix it. | | `fix(cli/clilog): accept log sinks that are all disabled`, and three follow-up commits | `--log-human=/dev/null` with no other log location no longer fails with "no loggers provided". It is the documented way to disable logging. An empty location still fails with that error when no other sink is set, as before. | Behavior change: with `/dev/null`, the server and the provisioner daemon can start with no log output. | | `fix(cli): detect CODER_PROC_PRIO_MGMT by presence`, and a comment follow-up | Log line only. With the variable set to an empty value, the agent now logs that process priority management is enabled, which is what `agentexec` already does. No detection or behavior change. | Low. | Two option descriptions in `codersdk/deployment.go` are corrected, with the CLI reference, configuration reference, and golden files regenerated: the default quiet hours schedule (the max deadline is the quiet hours window on the next day that the template's autostop requirement applies) and `--experiments` (`*` opts in to the experiments marked safe, also in `enterprise/cli/provisionerdaemonstart.go`). ### Code fixes that were reverted after review Two code fixes from the first version of this PR are reverted in the branch. The net diff has no change under `agent/` or `coderd/`. The docs now describe what the code does, and both issues stay open for the owner. - **`error` merge strategy for `coder_env` (DOCS-1669).** The fix made `merge_strategy = "error"` fail whenever a name was set twice, whatever the resource order. Existing template versions that pair an `error` entry with a later `replace` or `append` entry would start to fail every build after `terraform apply`. That is a breaking change that needs its own PR and release note. The fix and its tests are in `dff8e7c6ce` and can be cherry-picked. `environment-variables.md` now says the check runs only when the `error` resource is processed. - **Nice value before the capability drop (DOCS-1687).** The fix let `coder agent-exec` apply a negative nice value by calling `setpriority` before it drops effective capabilities. The current order is deliberate: with the fix, any local process could run the agent binary with `--coder-nice=-20` when the binary has the `CAP_SYS_NICE` file capability. `process-priority.md` now says a nice value below the agent's own is not applied, and no longer tells admins to grant `CAP_SYS_NICE`. ## Not included Seven findings are left out. - DOCS-1629: covered by #31639. - DOCS-1703 and DOCS-1724: covered by #31980. - DOCS-1584, DOCS-1683, DOCS-1685, DOCS-1686: each needs an owner decision, and no neutral docs wording exists until that decision is made. The validation comment on each issue names the decision. Four fixes are interim, so their issues stay open: - DOCS-1600: the AI Gateway pages now agree that the legacy metric names are deprecated and "will be removed in a future release". The code still emits them, and its TODO names v2.37, which has shipped. The owner still needs to set the removal release. - DOCS-1689: the page now says **New Template** opens the builder only for users with the Owner role, because the page gates on read access to the deployment config. Whether Template Admins should get the builder is still open. - DOCS-1669 and DOCS-1687: docs-only for now. Refer to [Code fixes that were reverted after review](#code-fixes-that-were-reverted-after-review). ## Review notes - Claims that describe product intent and need an owner's yes: the Premium qualifier on per-organization workspace sharing (the API route has no license check, the dashboard needs multiple organizations), `organization` port sharing in OSS, the telemetry field list, and the `1-5` cron range in the prebuilds schedule example. - Not run end to end: the PostgreSQL TLS procedure on a cluster, the OpenShift and air-gapped examples, the BSD `date` and `tar` forms on macOS, the Windows command on the multiple Kubernetes clusters page, and the keep-alive script in `docs/reference/index.md` (only its comparison logic was run, against sample values). Nothing was checked on a live deployment. - Likely merge conflicts with open PRs: #31990 (`mcp-server.md`, `feature-stages.md`, `docker-in-workspaces.md`), #31982 (`workspace-management.md`), #31980 (`health-check.md`), #31977 (`manage-provisioner-jobs.md`), #31869 (`airgap.md`), #30486 (`add-envbuilder.md`), and #31326 and #31531 (`codersdk/deployment.go` and generated files). ## Testing - `make pre-commit` (gen, fmt, lint, slim build), before the PR opened and again after the review changes. - `go test` for `./cli/clilog/...`, `./codersdk/`, `./cli/` (`TestServer`, `TestAgent`, and golden files), and `./enterprise/cli/` (provisioner, server, and help golden files). `./agent/agentexec/...` and `./coderd/provisionerdserver/...` pass after the reverts. Linux only. CI covers macOS and Windows. - The `coder.env` test fails against the file on `main` and passes against the new one. It reads the file with `godotenv`, which accepts CRLF line endings. - An empty `CODER_HTTP_ADDRESS=` was confirmed end to end with a full build of the server (output below). - The new `sed` and `grep` lines in the Lima examples were run with GNU tools against the old and the new form of `coder.env`. The Lima VMs were not started. - `--log-human=/dev/null` and `CODER_LOGGING_HUMAN=` were confirmed with the same build (output below). - `coder agent-exec --coder-nice=-5 -- echo` from a full build, as a non-root user: `coder-agent: failed to adjust niceness to -5 ...: permission denied` on stderr, the command output on stdout, exit code 0. - `postgres-ssl.md` rendered with the GitHub Markdown API: two ordered lists with three and five items, where `main` has six lists. - markdownlint, the table formatter, `make lint/emdash`, `make lint/docs-html`, `make lint/docs-manifest`, `make lint/docs-redirects`, `make lint/style-claims`, and Vale on the changed lines. - A doc-check self-review of the docs diff by four independent reviewers. It found six problems, which are fixed. The accuracy and coverage lenses ran on every area. The language and structure lenses ran in full on only part of the diff. <details> <summary>Test and terminal output for the code fixes (Linux)</summary> ```console $ go test ./codersdk/ -run TestPackagedCoderEnvKeepsDefaults -count=1 -v --- PASS: TestPackagedCoderEnvKeepsDefaults (0.00s) ok github.com/coder/coder/v2/codersdk 0.071s $ go test ./cli/clilog/ -run TestBuilder -count=1 -v --- PASS: TestBuilder (0.00s) --- PASS: TestBuilder/NoSinks (0.00s) --- PASS: TestBuilder/NoSinks/JSONDevNull (0.00s) --- PASS: TestBuilder/NoSinks/StackdriverDevNull (0.00s) --- PASS: TestBuilder/NoSinks/NoConfiguration (0.00s) --- PASS: TestBuilder/NoSinks/HumanDevNull (0.00s) --- PASS: TestBuilder/WithHuman (0.00s) --- PASS: TestBuilder/WithFilter (0.00s) --- PASS: TestBuilder/WithJSON (0.00s) --- PASS: TestBuilder/Verbose (0.00s) --- PASS: TestBuilder/FromDeploymentValues (0.01s) --- PASS: TestBuilder/FromDeploymentValues/Defaults (0.00s) --- PASS: TestBuilder/FromDeploymentValues/EmptyHumanEnv (0.00s) --- PASS: TestBuilder/FromDeploymentValues/Override (0.00s) ok github.com/coder/coder/v2/cli/clilog 0.171s $ TMPDIR=$HOME/.cache/agentexec-tmp go test ./agent/agentexec/... ./coderd/provisionerdserver/... -count=1 ok github.com/coder/coder/v2/agent/agentexec 4.236s ok github.com/coder/coder/v2/coderd/provisionerdserver 2.404s # Full build of the server (go build ./cmd/coder). An empty value stops it before it connects to the database. $ CODER_HTTP_ADDRESS= coder server --postgres-url 'postgres://127.0.0.1:1/x?sslmode=disable' Encountered an error running "coder server", see "coder server --help" for more information error: TLS is disabled. Enable with --tls-enable or specify a HTTP address # With the variable unset, the server passes that check and goes on to the database. $ coder server --postgres-url 'postgres://127.0.0.1:1/x?sslmode=disable' 2026-11-13 02:19:41.901 [warn] ping postgres: retrying error="dial tcp 127.0.0.1:1: connect: connection refused" try=11 Encountered an error running "coder server", see "coder server --help" for more information error: connect to postgres: connect to postgres: unable to connect after 11 tries; last error: dial tcp 127.0.0.1:1: connect: connection refused # An empty log location with no other sink still stops the server. $ CODER_LOGGING_HUMAN= coder server --postgres-url 'postgres://127.0.0.1:1/x?sslmode=disable' Encountered an error running "coder server", see "coder server --help" for more information error: make logger: no loggers provided, use /dev/null to disable logging # /dev/null passes the logger check. The server prints no log lines and goes on to the database. $ coder server --log-human=/dev/null --postgres-url 'postgres://127.0.0.1:1/x?sslmode=disable' Encountered an error running "coder server", see "coder server --help" for more information error: connect to postgres: connect to postgres: unable to connect after 11 tries; last error: dial tcp 127.0.0.1:1: connect: connection refused ``` </details> ## Linear Fixes DOCS-1583, DOCS-1585, DOCS-1586, DOCS-1587, DOCS-1588, DOCS-1589, DOCS-1590, DOCS-1591, DOCS-1592, DOCS-1593, DOCS-1594, DOCS-1595, DOCS-1596, DOCS-1597, DOCS-1598, DOCS-1599, DOCS-1601, DOCS-1602, DOCS-1603, DOCS-1604, DOCS-1605, DOCS-1606, DOCS-1607, DOCS-1608, DOCS-1609, DOCS-1614, DOCS-1618, DOCS-1619, DOCS-1620, DOCS-1624, DOCS-1635, DOCS-1639, DOCS-1644, DOCS-1651, DOCS-1652, DOCS-1653, DOCS-1654, DOCS-1655, DOCS-1656, DOCS-1657, DOCS-1658, DOCS-1659, DOCS-1660, DOCS-1661, DOCS-1662, DOCS-1663, DOCS-1664, DOCS-1665, DOCS-1666, DOCS-1667, DOCS-1668, DOCS-1670, DOCS-1671, DOCS-1672, DOCS-1673, DOCS-1674, DOCS-1675, DOCS-1676, DOCS-1677, DOCS-1678, DOCS-1679, DOCS-1680, DOCS-1681, DOCS-1682, DOCS-1684, DOCS-1688, DOCS-1690, DOCS-1691, DOCS-1692, DOCS-1693, DOCS-1694, DOCS-1695, DOCS-1696, DOCS-1697, DOCS-1698, DOCS-1699, DOCS-1700, DOCS-1701, DOCS-1702, DOCS-1704, DOCS-1705, DOCS-1706, DOCS-1707, DOCS-1708, DOCS-1709, DOCS-1710, DOCS-1711, DOCS-1712, DOCS-1713, DOCS-1714, DOCS-1715, DOCS-1716, DOCS-1717, DOCS-1718, DOCS-1719, DOCS-1720, DOCS-1721, DOCS-1722, DOCS-1723, DOCS-1725, DOCS-1726, DOCS-1727 Part of DOCS-1600, DOCS-1689, DOCS-1669, DOCS-1687 <details> <summary>Decision log</summary> ### Scope - One PR for all findings, as agreed with the reviewer. The code fixes are separate commits so an owner can ask for any of them to move to its own PR. Nothing in the PR is a breaking change, so the title has no `!`. - A finding was skipped only when an open PR already covers it, or when every available wording would assert an undecided product behavior. - Each validation comment on the Linear issues records the evidence, the corrections to the original finding, and what was not verified. ### Docs or code - The default was a docs-only fix that describes what the code does. - A code fix was chosen when the docs describe a behavior the code plainly intended and the code change is small and testable: the packaged env file, the log sink check, and the log line for the environment variable presence check. - The `error` merge strategy and the nice value ordering started as code fixes and went back to docs-only after review. The first breaks existing template versions. The second weakens a deliberate security ordering. - The SCIM `userName` finding (DOCS-1609) took the docs path. The handler is unchanged. ### Wording choices worth a second look - `feature-stages.md` says `--experiments=*` enables only the experiments marked safe, and points to the "Get safe experiments" API. It does not list the other experiments, because the list would drift and those experiments are hidden on purpose. The `--experiments` flag help now says the same. - `agent-metadata.md` replaces the writes-per-second formula with a description of the batcher (each server replica writes one statement every 5 seconds, or sooner at 500 entries). - `extending-templates/index.md` no longer calls `startup_script` deprecated. The provider documents it as an alias for a `coder_script`. - `postgres-ssl.md` separates client verification from server verification, so the server verification steps work alone. - `rpm.md`, `upgrade.md`, and the 2.29 to 2.34 ESR upgrade page explain the empty `CODER_HTTP_ADDRESS=` line that older packages shipped, because upgrades keep the old file. The behavior changed in v2.34.0 with the serpent upgrade in #24926. - The keep-alive script in `docs/reference/index.md` reads the current deadline and skips the request when it is already later. The comparison is on text, so it applies only when the API returns a UTC timestamp, which needs the database to use the UTC time zone. Otherwise the script sets the deadline on every pass, as it did before, and the page says so. - `external-auth.md` anchors the new GitHub Enterprise regex example. The older unanchored examples on that page and on `git-providers.md` are not changed here. ### Self-review findings that were rejected - "The builder opens for Template Admins": the Templates page needs a successful deployment config read, which the Template Admin role does not have. - "Organization Admins can set AI model prices": the price write authorizes against a site-level object, which organization-scoped grants do not match. - "The provisioner chart sets no default resources": `helm/libcoder/templates/_coder.yaml` applies 2000m and 4096Mi when `coder.resources` is empty. ### Automated review, round 1 The `coder-agents-review` app left 45 findings on `8853332`. Fixed: the two reverts above, the anchored regex, the `coder.env` follow-ups (Lima examples, upgrade notes, a comment in the file, and a test that covers every option in the file), the clilog change, the two option descriptions, and the docs findings (CORS behavior, token lifetime example, keep-alive script, agent metadata, refresh token errors, `switch` form type, `dbcrypt` skip list, and a stray line in a YAML example). Declined, with the reason on each thread: - Refactoring the `agentexec` logging and renaming its log field: not related to a docs conflict. - Rewording the "process priority management not enabled (linux-only)" log message: the docs quote the message, and the wording predates this PR. - Problems in code and docs that this PR does not change (the `Capabilities` subtest, the Helm values comment, the AWS provider path in `airgap.md`, and others in the review's out-of-scope list). ### Automated review, round 2 The app left 14 new findings on `04925bd`, and accepted the three declined threads on `cli/agent.go`. All 14 are fixed. The main one: the round 1 change that removed the "no loggers provided" error went too far, because an empty log location would then start a server with no logs. The error is back for every case except `/dev/null`. Reported by the app as out of scope and not changed: the swagger annotation for `GET /api/v2/experiments/available` declares an array, but the handler returns an object with a `safe` array. Three Storybook fixtures keep the old `--experiments` description. ### Automated review, round 3 The app confirmed that all round 2 findings are fixed, and left 10 small findings on `f55cb6d` (8 P4, 2 Nit). All are fixed: the TLS condition and the release range in the `coder.env` notes, one place for the `/dev/null` rule in `clilog`, two test cases, a clearer test failure, and the CPU example in `agent-metadata.md`. ### Automated review, rounds 4 and 5 Round 4 left one P4 on `8fffb38` (name the `--trace` option in the logging note), which is fixed. Round 5 on `2ce754e` reports no new findings and says every earlier finding is fixed or closed. The app did not post an approval: it leaves its out-of-scope items and the code fixes to a human reviewer. Two threads on `cli/agent.go` stay open on purpose for the code owner. ### Doc-check review The doc-check workflow left 12 comments on `2ce754e` (10 blocking, 2 suggestions). All are fixed in `c888885`: "refer to" or "visit" in place of "see" for cross-references on the lines this PR added, the **New template** label as the dashboard shows it, one instruction per step in the server verification procedure of `postgres-ssl.md`, and two wording changes in `process-priority.md`. The `CAP_SYS_NICE` sentence keeps a short reason, which differs from the suggested text. The `coder-agents-review` app then reviewed that commit (rounds 6 and 7). Round 6 left two P4 findings, fixed in `30b2c79`: the `failed to adjust niceness` message is described once, in the troubleshooting entry, with where it appears, and the client verification steps in `postgres-ssl.md` render as one numbered list. Round 7 reports no new findings. `2a6035c` then softens one sentence from that fix, because the agent logs the stderr of devcontainer CLI commands. The app was not run again on that commit. ### Adjacent gaps found and not fixed here - `add-envbuilder.md` has the same `zip` command that `template-from-scratch.md` had. - `template-from-scratch.md` leaves the reader in `build/` after `cd $_`, before a step that runs from `template-tour`. </details> --- _Generated by Coder Agents on behalf of @nickvigilante._ --------- Co-authored-by: Ben Potter <me@bpmct.net>
26 KiB
title
| title |
|---|
| Coder Agents |
Coder Agents is a chat interface and API for delegating development work and research to coding agents in your Coder deployment. Developers describe the work they want done, and Coder Agents handles selecting a template, provisioning a workspace, and executing the task.
Coder Agents includes its own self-hosted AI coding agent that runs the agent loop directly within the Coder control plane.
No specialized software, API keys, or network access is required inside your workspace. The only requirement is network access between the control plane and external large language model (LLM) providers.
This screencast shows the Coder Agents chat interface, where a developer describes work for an agent to carry out.
What Coder Agents is and isn't
Coder Agents is self-hosted infrastructure for AI coding workflows. The entire workflow runs inside your Coder deployment, whether that's a virtual private cloud (VPC), an on-premises data center, or an air-gapped network. Orchestration, chat history, and tool execution stay on infrastructure you control, and prompts go only to the LLM providers you approve, including self-hosted models.
Developers delegate work through chat or the API, and Coder handles the rest. It selects a template, provisions a workspace, runs the agent, and delivers branches and pull requests, all under the developer's own identity and permissions. The agent runs in the control plane as part of Coder, so there's nothing to install, license, or update in your workspaces.
Coder Agents isn't a cloud-hosted agent service. There is no SaaS or managed component, and your code never passes through Coder's infrastructure.
Coder Agents isn't a replacement for your IDE. It's where developers start, steer, and review agent work. Developers can still open the workspace in VS Code, Cursor, JetBrains, or another editor to refine and finish what the agent produces.
Who Coder Agents is for
Coder Agents is designed for organizations that need to self-host their AI coding workflows and maintain full control over how agents operate. It is a strong fit for:
- Regulated industries such as financial services, healthcare, and government, where AI tools must run on controlled infrastructure with auditable access and strict network boundaries.
- Platform engineering teams that want to provide developers with a high-quality AI coding experience without managing per-workspace agent installations, API key distribution, or third-party agent licensing.
- Organizations with existing Coder deployments that want to add agentic capabilities using their current templates, workspaces, and identity providers rather than adopting a separate SaaS product.
How it works
The agent loop runs inside the control plane. When a user submits a prompt, the control plane:
-
Sends the prompt to the configured LLM provider (Anthropic, OpenAI, Google, Azure, AWS Bedrock, or any OpenAI-compatible endpoint).
-
Receives the model's response, which can include tool calls such as reading files, writing code, or running shell commands.
-
Executes tool calls by connecting to a Coder workspace over the existing workspace connection.
This is the same path used for web terminals, port forwarding, and IDE access.
-
Returns tool results to the model and continues the loop until the task is complete.
The workspace itself has no knowledge of AI. It is standard compute infrastructure. There are no LLM API keys, no agent harnesses, and no special software installed. All intelligence lives in the control plane.
The agent loop runs in the control plane. It makes outbound requests to LLM providers and connects to workspaces only when tool execution is needed.
Automatic workspace provisioning
Not every chat requires a workspace. The agent uses the conversation and available tools when they're sufficient for your request. If missing tools, skills, Model Context Protocol (MCP) integrations, or context block progress, the agent creates a suitable workspace and uses its capabilities to continue. Workspaces also support reading code, running commands, and editing files. Requests to fix a bug or build an app authorize the necessary workspace setup. You don't need to ask for a workspace separately. Questions and self-contained code examples don't need a workspace when the conversation and available tools are sufficient.
This means:
- Faster responses: conversations that don't require workspace access start immediately with no provisioning delay.
- Lower infrastructure cost: the agent uses existing tools and context when they can complete your request without a workspace.
When a workspace is needed, the agent reads the templates available to that user (including their descriptions and parameters), selects the appropriate one, and creates a workspace automatically. Template visibility is scoped to the user's role and permissions, so the agent can only select templates the user is authorized to use. Users can also manually choose which workspace is used when starting a new chat.
Platform teams control template routing by writing clear template descriptions. For example, a description like "Use this template for Python backend services in the payments repo" helps the agent select the correct infrastructure. Administrators can also block agents on a template, which hides it from the agent completely. Refer to Platform Controls for that setting.
Examples of what triggers workspace creation:
The examples in the first column assume the available tools and context are sufficient. Any request, including planning or Q&A, can require a workspace if the agent lacks the capabilities or context to complete it. Creating a workspace doesn't change the current mode's tool restrictions: workspace MCP tools remain unavailable in Plan Mode. Workspace skills, MCP tools, and context can finish loading after the workspace reports ready. The agent can continue with available file and shell tools, but provisioning doesn't guarantee immediate access to a missing MCP tool.
| No workspace needed | Workspace provisioned |
|---|---|
| "What are the tradeoffs between Representational State Transfer (REST) and gRPC?" | "Find and fix the nil pointer crash in the auth service" |
| "Help me draft a Request for Comments (RFC) for adding a caching layer" | "Run the test suite and fix any failures" |
| "What's the best way to handle retry logic in Go?" | "Refactor the handler to use the new SDK types" |
| "Compare connection pooling strategies for Postgres" | "Read the config file and add the new feature flag" |
Sub-agents
Coder Agents supports sub-agent delegation. The root agent can spawn child agents to work on independent tasks in parallel. Each sub-agent gets its own context window, which keeps individual conversations focused and avoids the quality degradation that occurs as context windows grow large.
For example, an agent tasked with "explore this repository and document its structure" might spawn separate sub-agents to analyze the backend, frontend, and infrastructure directories simultaneously.
Chat persistence
All chat state is stored in the Coder database, not in the workspace. If a workspace is stopped, deleted, or rebuilt, the full conversation history survives. The agent can resume work by creating a new workspace with the same template and continuing from the last known state, such as a git branch.
Message queuing
Users can send follow-up messages while the agent is actively working.
Messages are held and delivered before the agent's next model call, so there is no need to wait for a response before providing additional context or changing direction.
Interrupt the agent only to stop it, not to send it a message.
A message waits for the current step to finish, so a long tool call delays it.
After an interrupt, the agent starts with the messages that were already held.
A message sent while the agent works can change the model: the agent uses that message's model from its next model call.
When several messages are delivered together, the agent uses the model of the last one, and the reasoning effort of the last one that sets an effort.
The chat groups held messages under Next step and After turn.
The agent receives messages under Next step before its next model call, and messages under After turn when the current turn ends.
Send now moves a message under After turn to Next step, or sends it at once when the agent isn't working.
To send a message under After turn, press Ctrl+Enter (Cmd+Enter on macOS) while the agent works.
If you turn on Require Cmd/Ctrl+Enter to send agent messages in Agents > Settings > General, or you use a phone or tablet with a keyboard, press Alt+Enter (Option+Enter on macOS) instead.
You can also right-click the send button, or touch and hold it on a touch screen, and select Send after turn.
API and MCP clients set busy_behavior to queue for the same result.
Users can edit a queued message before it is delivered.
While a message under After turn is being edited, it and the messages behind it wait.
While a message under Next step is being edited, every held message waits.
File attachments
Users can attach files to chat messages by pasting from the clipboard, dragging files into the input area, or using the attachment button.
Supported types are PNG, JPEG, GIF, and WebP images, plus plain text, Markdown, CSV, JSON, SVG, and PDF files.
Each upload can be up to 10 MiB.
By default, a chat can have up to 50 attachments.
Adding more permanently deletes the earliest uploads, which then show as expired.
You can change the limit with CODER_CHAT_MAX_ATTACHMENTS_PER_CHAT.
Attachments are sent to the model as multimodal content alongside the text prompt.
This is useful for sharing screenshots of errors, UI mockups, terminal output, logs, or other context that helps the agent understand the task. Messages can contain attachments alone or combined with text. Image attachments require a model that supports vision input, and Anthropic models (including Bedrock-hosted Claude) cap each inline image at 5 MiB. Providers differ in which types they accept as native file content. A text file the provider rejects reaches the model as text. Any other file the provider rejects reaches the model as a short note that names the file. For example, the Azure OpenAI and Google providers reject PDFs, and the Google provider rejects GIF images.
The agent can also attach files to its messages (for example, with the attach_file tool).
After a turn ends, an Attachments button at the end of the turn opens a list of the files the agent attached during it.
The Attachments section of the chat's Summary tab lists the files the agent attached across the chat.
In either list, you can download the files, and open PNG, JPEG, GIF, and WebP images and plain text, Markdown, CSV, and JSON files in the chat.
Security benefits of the control plane architecture
Running the agent loop in the control plane rather than inside the developer workspace is an architectural decision that directly addresses the primary concerns regulated organizations have with AI coding tools: how do you give developers access to coding agents without introducing unnecessary risk?
Traditionally, agents run inside the same compute where code lives. This means the agent needs LLM API keys in the workspace, outbound network access to model providers, and often elevated permissions. In a regulated environment, this creates a surface area that is difficult to lock down.
Coder Agents eliminates this by moving the agent loop out of the workspace entirely:
- No API keys in workspaces. LLM provider credentials never enter the workspace. The control plane makes all outbound requests to model providers directly, so there is nothing for a developer or a compromised process to exfiltrate.
- No agent software to manage. Workspaces don't need Claude Code, Codex, or any agent harness installed. This eliminates a class of supply chain risk and removes the need to keep agent software up to date across all workspaces.
- Network boundaries are simpler.
Because the workspace doesn't need access to LLM APIs, you can apply strict egress rules.
An agent-only template might permit access to only your git provider (for example,
github.com) and nothing else. The workspace never needs to reach the internet for AI functionality. - Centralized, enforced control. Platform teams configure models, system prompts, and tool permissions from the control plane. These settings are enforced server-side, so they are not user preferences that developers can override.
- User identity is always attached. Every action the agent takes (PRs opened, code pushed, commands run) is tied to the user who submitted the prompt. There is no shared bot identity or anonymous execution.
- No privilege escalation. The agent operates with the exact same permissions as the user who submitted the prompt. If a developer cannot access a template, workspace, or resource through the Coder dashboard, the agent cannot access it either. There is no escalation of privileges and no shared service account.
- Workspace isolation is preserved. The agent can only access workspaces owned by the user who submitted the prompt. There is no cross-user workspace access. An agent running on behalf of one developer cannot read files, execute commands, or interact with another developer's workspaces.
Tip
For highly sensitive environments, create a dedicated set of templates for agent workloads with stricter network policies than your standard developer templates. Because the AI comes from the control plane, these templates don't need any outbound access to LLM providers.
Warning
By default, agent workspaces have the same network access and permissions as any workspace the user creates manually. If your templates do not restrict outbound network access, the agent has full internet access from the workspace. See Template Optimization for guidance on configuring network boundaries and scoping credentials for agent workloads.
LLM provider support
Coder Agents works with any LLM provider. Administrators configure providers and models from the Coder dashboard or API. Supported providers include:
| Provider | Description |
|---|---|
| Anthropic | Claude models via Anthropic API |
| OpenAI | GPT and Codex models via OpenAI API |
| Gemini models via Google AI API | |
| Azure OpenAI | OpenAI models hosted on Azure |
| AWS Bedrock | Models available through AWS Bedrock |
| OpenAI Compatible | Any endpoint implementing the OpenAI API |
| OpenRouter | Multi-model routing via OpenRouter |
| Vercel AI Gateway | Models via Vercel AI SDK |
Most providers support custom base URLs, which allows integration with enterprise LLM proxies, self-hosted model endpoints, and internal gateways.
Administrators can configure multiple providers simultaneously and set a default model in each organization. Developers select from enabled models when starting a chat. Providers are deployment-wide, and models belong to an organization. Refer to Organization scope for details.
The model configuration in the Agents settings panel.
Built-in tools
The agent has access to a set of workspace tools that it uses to accomplish tasks:
| Tool | Description |
|---|---|
list_templates |
Browse available workspace templates |
read_template |
Get template details and configurable parameters |
create_workspace |
Create a workspace from a template |
start_workspace |
Start a stopped workspace for the current chat |
stop_workspace |
Stop the current chat's workspace and wait for the stop build to finish |
propose_plan |
Present a Markdown plan file for user review |
ask_user_question |
Ask the user structured clarification questions during plan mode |
read_file |
Read file contents from the workspace |
write_file |
Write a file to the workspace |
edit_files |
Replace old_text with new_text across files |
execute |
Run shell commands in the workspace |
process_output |
Retrieve output from a background process |
process_list |
List all tracked processes in the workspace |
process_signal |
Send a signal (terminate/kill) to a tracked process |
attach_file |
Attach a workspace file to the chat as a durable downloadable attachment |
spawn_agent (type=general or explore) |
Delegate a task to a sub-agent running in parallel, optionally on a specific model |
list_subagent_models |
List the models available for spawn_agent's model_config_id argument |
wait_agent |
Wait for a sub-agent to complete and collect its result |
message_agent |
Send a follow-up message to a sub-agent; a busy sub-agent receives it before its next model call |
interrupt_agent |
Halt a sub-agent's current turn; it transitions to waiting, to running if there are queued messages, or to paused if the next queued message, or any message under Next step, is being edited |
spawn_agent (type=computer_use) |
Spawn a sub-agent with desktop interaction (screenshot, mouse, keyboard) |
list_agents |
List spawned child agents, most recently active first |
read_skill |
Read the instructions for a skill by name |
read_skill_file |
Read a supporting file from a skill's directory |
web_search |
Search the internet (provider-native, when enabled) |
find_tools |
Search the deferred MCP tool catalog and activate matching tools. Only available when the turn has MCP tools to defer |
These tools connect to the workspace over the same secure connection used for web terminals and IDE access. No additional ports or services are required in the workspace.
Platform tools (list_templates, read_template, create_workspace, start_workspace, stop_workspace, propose_plan, ask_user_question) and orchestration tools (spawn_agent, list_subagent_models, wait_agent, message_agent, interrupt_agent, list_agents) are only available to root chats.
Sub-agents do not have access to these tools and cannot create workspaces or spawn further sub-agents.
spawn_agent with type=computer_use works only after an administrator enables the virtual desktop feature.
It also requires a model from an Anthropic, OpenAI, or OpenAI-compatible AI provider, or a Claude model from an AWS Bedrock AI provider.
read_skill is available when personal, organization, project, or workspace skills exist, and read_skill_file is available when the workspace has skills.
propose_plan and ask_user_question are only available while plan mode is active.
In plan mode, the agent can still inspect the workspace and template metadata, execute shell commands for exploration, and read process output.
write_file and edit_files remain available only for the chat-specific plan file under .coder/plans/.
Workspace MCP tools are unavailable in plan mode, and plan-mode sub-agents receive no MCP tools.
Plan mode
Plan mode lets you ask the agent to investigate first and present a plan before implementation. Open the chat input menu and choose Plan first to enable it for the current chat. After you enable it, later turns in that chat stay in plan mode until you turn it off or select Implement plan after a proposed plan. Because the mode is stored on the chat, reloading the page preserves the current setting.
While plan mode is active:
- The agent can inspect repository files, workspace state, and available templates.
write_fileandedit_filescan only modify the chat-specific plan file under.coder/plans/.ask_user_questioncan gather structured clarification from the user before a plan is proposed.propose_plansnapshots the current plan file into the transcript so you can review it before implementation starts.executeandprocess_outputremain available for exploration, such as cloning repositories, searching code, and running inspection commands.- External MCP tools are available to root chats only for the server configurations an administrator approved for plan mode. Workspace MCP tools and MCP tools for plan-mode sub-agents are not available.
- Dynamic tools, provider-native tools, and computer-use tools are not available.
- Root plan-mode chats can also use external MCP tools that an administrator approved for plan mode.
This keeps planning turns focused on analysis and plan authoring rather than implementation. Once you select Implement plan, the next turn runs in normal mode again.