Files
Thomas KosiewskiandJaayden Halko 2c96f05186 feat: show the overview card in Coder Agents chats (#31412)
Shows the overview card container from #31590 in Coder Agents chats. The
card sits in the chat's top-right corner, and a list button in the chat
top bar shows and hides it, as in the Codex desktop app. The card and
the button exist only while the right panel is closed, the transcript is
not full width, and the page is not an embed. Both show only from an
84rem chat, so the card never covers the transcript and the transcript
never moves. Below 84rem the card does not mount, so its cost and
attachment requests do not run. Phones and narrow windows do not show
the card.

The card shows by default and stays open until the user hides it. The
choice is stored in localStorage under `agents.overview-card-open`, for
every chat. The right panel keeps its own saved preference. A row opens
the right panel on its tab, which hides the card. The card returns when
the panel closes.

The Repositories section lists every repository the git watcher reports,
by folder name with its branch below. A clean repository shows `+0 −0`,
so a chat keeps a Repositories row when AI Gateway turns cost off. The
card reads the attachments through `useChatAttachments` from #31411, so
it shows the Summary panel's list and shares its query. When the earlier
attachments fail to load, the card shows the error and a **Retry**
button in Attachments, as the Summary panel does.

The docs describe the card in the Coder Agents overview and add it to
the places that show spend. #31260 (do not merge) stays the hands-on
reference.

1600px chat with the card open:

![1600px chat with the overview card
open](https://github.com/user-attachments/assets/6d1760c7-0707-42e2-8284-2a5e133e3f71)

1600px chat after the user hid the card:

![1600px chat after the user hid the
card](https://github.com/user-attachments/assets/d7cf7d7a-92c8-4fa4-9096-2c12043e0a06)

960px chat, no card and no button:

![960px chat without the card or the
button](https://github.com/user-attachments/assets/384d7db8-7c2f-4c1a-9a75-a9d59ae0dd4f)

## Decision and open questions for Jaayden

Decision you can reverse: a clean repository row is plain text, not a
button. The Git panel lists only repositories with changes, so a click
on a clean row used to open the default Git view. To reverse it, give
the clean row its `onClick` back in `ChatOverviewCardView`.

1. Should a new chat show the card instead of the Summary panel? This PR
keeps the right panel's saved preference as it is.
2. A chat with no repository and no cost shows "Nothing to show yet". Is
that the placeholder you want?
3. Subagents (#31410): the heading says "not idle" instead of "active"
because errored subagents stay in the list, and the ones that need the
user sort first. Do that wording and order work for you?
4. A row click (#31478) moves focus to the active right panel tab. Do
you prefer the Git view switcher instead?

## How to test

1. Open Storybook at `pages/AgentsPage/AgentChatPageView`, stories
`OverviewCardBesideTranscript`, `OverviewCardHiddenWhenNarrow`,
`OverviewCardHiddenInFullWidth`, and `OverviewCardHiddenByUser`.
2. Run `pnpm exec vitest run --project=unit
src/pages/AgentsPage/AgentChatPage/AgentChatPage.test.tsx
src/pages/AgentsPage/hooks/useChatOverview.test.ts` in `site/`. The page
tests set the chat width with the repo's `MockResizeObserver`. They
check that a narrow chat requests none of the card's data, and that
**Retry** in the card requests the earlier attachments again.
3. In a dev deployment, open a chat in a window at least 84rem wide.
Hide the card with the list button, reload, and check that it stays
hidden.

## What to look at first

1. `hooks/useChatOverview.ts`: one `canShow` value gates both the toggle
and the card, so the page only renders what the hook returns. The hook
measures the chat's outer element with a `ResizeObserver` through
`observeChat`, and `OVERVIEW_MIN_CHAT_WIDTH_REM` holds the 84rem value
in one place, so the button and the card cannot disagree.
2. `AgentChatPageView.tsx`: the page passes `observeChat` as the chat
element's ref and destructures it from the hook result. The React
Compiler treats an object that holds a ref callback as a ref, so the
page keeps it apart from the other values.
3. `components/ChatOverviewCard.tsx`: this PR adds `ChatOverviewToggle`
to the container from #31590.

<details>
<summary>Review history</summary>

The repository's frontend-deep-review ran three rounds on the first
version, a clean-context advisor ran once, then one strict code quality
review ran, then a polish pass and one final review round ran on the
whole stack.

Polish pass changes:

- Split `ChatOverviewCard.tsx` into the container plus
`ChatOverviewToggle`, with the view in `ChatOverviewCardView.tsx`
(#31409). The `getOverviewCost` tests moved to
`ChatOverviewCard.test.tsx` unchanged.
- Added `useChatOverview`, which owns the visibility gate and the open
state.
- The card builds repository rows with `repoLabel`, the repository's
branch, and `countRepoChanges`. Before, it filtered repositories through
`computeRepoStats` only to add the clean ones back.
- The docs say that you cannot select a clean repository row.

Final round fixes: renamed the top bar prop `overview` to
`overviewToggle`, inlined the toggle value in the hook, and corrected
three doc comments.

Follow-up fixes, after the final round:

- The card no longer mounts below an 84rem chat. Before, it stayed
mounted and CSS hid it, so its queries kept running. The repo has no
element-size hook, so `useChatOverview` observes the chat element
itself. The `@container/chat` class and the `@min-[84rem]/chat` classes
are gone.
- The card wires the earlier attachments request into the view, so a
failure shows its error and a retry.
- New tests: the hook test checks the 84rem boundary on both sides, and
two page tests check the narrow chat's requests and the card's retry.
Each fails without its fix. The existing page tests now set a 1600px
chat width before they look for the card. Their assertions did not
change.
- The container moved to #31590, because this PR grew past 600 changed
lines. GitHub cannot insert a PR in the middle of a stack, so I removed
stack #31413 and linked the six PRs again as stack #31591.
- Safari: Playwright 1.63.0 downloaded WebKit, but WebKit does not start
on this host, because system libraries such as `libsoup-3.0` and
`libGLESv2` are missing. I did not check the narrow right panel or the
card in WebKit. The `@container/chat` wrapper that the check was about
no longer exists.

Skipped in the polish pass: passing the card's placement class from the
page. That keeps the 84rem breakpoint in one file with the toggle, and
moving it adds a pass-through prop.

Declined:

- The page test checks that the card is gone while the right panel is
open (`toBeNull`). That unmount is the behavior under test, and no
callback or request captures it.
- `@container/chat` traps the right panel's `fixed inset-0` overlay
below the `lg` breakpoint. I rendered `NarrowWithSidebarPanel` at 390px
and 900px in Chromium, and the panel still covers the viewport. The
follow-up fixes removed `@container/chat`.
- `try`/`catch` around `localStorage` in `overviewCardStorage.ts`. The
file follows `sidebarTabStorage.ts`.
- Final round: move `ChatOverviewToggleProps` into the hook. The hook
imports only a type from the component file, so no runtime cycle exists.

</details>

---
_Generated with [`xum`](https://github.com/coder/xum) • Model:
`anthropic:claude-opus-5-5` • Thinking: `high`_

---------

Co-authored-by: Jaayden Halko <jaayden.halko@gmail.com>
2026-11-18 16:55:09 +00:00

27 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:

  1. Sends the prompt to the configured LLM provider (Anthropic, OpenAI, Google, Azure, AWS Bedrock, or any OpenAI-compatible endpoint).

  2. Receives the model's response, which can include tool calls such as reading files, writing code, or running shell commands.

  3. 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.

  4. 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.

Architecture diagram showing the control plane in the center, with arrows out to LLM providers and arrows to workspaces

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.

Chat overview

On a wide screen, a chat shows an overview card in its top-right corner while the right panel is closed. The card lists the chat's cost, the uncommitted changes in each repository, the pull requests, the subagents that are not idle, and the attachments. The cost appears when the deployment has the AI Gateway entitlement and the chat has sent at least one model request. A repository without uncommitted changes shows zero added and zero deleted lines, and you cannot select it.

Select a row to open the matching tab in the right panel, or select a subagent to open its chat. The card returns when you close the right panel.

The card shows by default. To hide or show it, select Toggle overview (the list icon) in the chat top bar. Your browser remembers the choice for every chat. The card does not appear when the chat uses the full width.

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
Google 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.

Screenshot of the provider/model configuration in the Agents settings

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_file and edit_files can only modify the chat-specific plan file under .coder/plans/.
  • ask_user_question can gather structured clarification from the user before a plan is proposed.
  • propose_plan snapshots the current plan file into the transcript so you can review it before implementation starts.
  • execute and process_output remain 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.