Background agent runs
When you send a message to the Compass in-app agent, the work happens on the server, not in your browser. You can close the tab, switch conversations, put the laptop to sleep, or lose your connection — the agent keeps going, and the reply is waiting in the conversation when you come back.
This also means a turn is no longer limited to what fits in the few minutes a browser will hold a request open. Ask for something substantial.
While a run is going
The conversation shows the agent's progress as it happens: the text it is writing and the Compass tools it is using, in order.
Underneath the transcript you will see a note — This runs on the server, you can close this tab and pick the reply up here later. That note is the signal that the turn is detached. While it is showing:
- The Send button becomes a Stop button. Sending another message has to wait: a conversation runs one turn at a time.
- Closing the tab, navigating away, or reloading does not cancel anything.
- You can watch the same run from more than one place at once — a second tab, or your phone — and both views show the same transcript.
Coming back to a run
Reopen the conversation and Compass reattaches automatically. If the run is still going, the live view resumes, including everything that happened while you were away. If it finished, the reply and the tool steps it took are simply part of the conversation.
Nothing is lost in between: the agent records each step as it happens rather than only at the end, so a run you never watched has the same transcript as one you watched throughout.
Links to Compass items appear as cards
When the agent links to something in your workspace — an opportunity, task, doc, key result and so on — the link shows as a card with the item's current title, status and a line of context, rather than a bare URL. Click the card to open the item.
Cards are live: they refresh when you return to the tab, so a status changed elsewhere shows up without re-asking the agent. A link to another site, to a page rather than one item, or to something you don't have access to stays an ordinary link.
The board
The Agent page has a Chat | Board switch in its title bar. Board replaces the chat with your conversations laid out by status, newest activity first in each column:
- Working: a run is queued or going. The card shows a live spinner and the current tool or activity step (pausing with an amber dot if no heartbeat has arrived for 45 seconds).
- Awaiting: the agent asked a structured question (
AskUserQuestion) and is paused for your input. You can answer directly on the board card or above the chat composer; if you answer while the sandbox is still open the run resumes in place within a couple of seconds, and if the run's time budget expired first Compass parks its session cleanly and starts a continuation run as soon as you submit your answer. - Waiting: the agent scheduled a self-wakeup (
ScheduleWakeup) — for example while waiting on CI or a preview deploy. Both the board card and the chat banner show a liveResumes in Xm — <reason>countdown with a Cancel button, and sending a manual message cancels the timer automatically. - New: finished, and you have not looked at it since it last changed.
- Done: finished, and you have looked at it since.
- Failed: the latest run failed or was interrupted. It stays here until the conversation runs again.
- Ready: a conversation with no messages yet.
Working and New are always shown; the other columns appear only when they have a card.
Columns keep a minimum width and the board scrolls sideways, so on a phone you swipe between
them. The board streams live updates over /api/agent/board/stream (falling back to polling if needed), so a run updating or finishing patches its card in place without losing scroll position or input focus.
Each card (and each conversation row in the Chat left sidebar) surfaces rich context at a glance:
- Summary & live activity: idle conversations show a short summary of the latest assistant reply; active runs show the current step.
- Subtask checklist: tasks linked to the conversation appear inline with a
completed / totalprogress bar and up to five checklist items. - Footer chips: linked Compass items (
OPP,SOL,DOC,DEC), a Squad badge when assigned, a clickablePR #Nchip when a GitHub pull request URL appears in the thread, and a◉ Nsub-agent badge whenever the run delegated work to child sub-agents (clicking it opens the conversation's sub-agent tree popover). - Sub-agent tree & breadcrumb timeline: inside Chat, a sub-agent team pill sits above the composer whenever child agents ran; opening any child agent drills into its tool steps, nested delegations and result summary under sticky
Main conversation › Parent › Childbreadcrumbs while preserving your main chat scroll position. - Search & Group by: filter across titles, summaries, live activity, subtasks, sub-agent roles, PR numbers and linked items, and switch Group between Status and Squad on both the Board and the Chat sidebar.
Click a card to open that conversation in the chat; it counts as looked at. Whether you have looked at a conversation is yours alone: when a conversation is shared, your opening it does not mark it Done for anyone else, and new activity after you looked makes it New for you again. The switch is remembered across visits.
Pin, collapse and reorder columns
The board uses the same dock as the Tasks board and the other status boards. On a wide screen (the medium breakpoint and up), any column can be pinned: it moves into one dock on the right, outside the scrolling area, so it stays put while the other columns scroll. Nothing is pinned until you pin it, so the board looks the same as before.
The dock is one slot, however many columns you pin: a panel showing one pinned column, with a narrow rail of tabs at its right edge, one per pinned column (its name and conversation count). Pinning more columns adds tabs; it never makes the dock wider.
- Pin or unpin. Use the pin button in a column's header (it appears when you hover the header) or Pin to the right / Unpin in the column's ⋯ menu. A pinned column becomes the active tab and the dock opens on it.
- Switch and collapse. Click a tab to show that column. Click the active tab, or the Collapse button in the panel's header, to close the panel and leave only the tab rail. Arrow keys move between tabs; Enter or Space shows one.
- Reorder columns. Move left / Move right in a column's ⋯ menu. A pinned column's place in that order is its place among the tabs.
- Empty columns. A column that is hidden because it has no conversations has no tab either, but the pin is kept: its tab returns with its first conversation. Working and New are always shown.
- Cards. Cards in the docked panel open their conversation exactly as before. The board is read-only, so a tab is not a drop target. The board's refresh never changes your layout or the tab you have open.
- Narrow screens. Below the medium breakpoint nothing is docked: pinned columns appear in the scrolling board in their saved order, and the pin button is hidden. Your layout comes back when the screen is wide again.
The layout is remembered in this browser, for each workspace. The board has no saved views, so it does not follow you to other devices.
Sharing a conversation
A conversation starts private to the person who began it. The owner, or anyone already in the conversation, can invite other members of the workspace from the people panel; there is no limit on how many. Invited people see the whole conversation, can send messages, and can watch a run as it happens.
- Each message shows who sent it, and the agent is told who said what, so it can tell two colleagues apart.
- Usage from a turn is counted against the person who sent it.
- Still one turn at a time: if someone else's run is going, you cannot send until it finishes (you are told the agent is busy).
- Only the person who started a run, or the conversation owner, can Stop it.
- The owner can remove anyone; anyone else can leave. Someone who is removed, or who leaves the workspace, loses access straight away.
- Other people's messages and replies appear within a few seconds. There is no live push, so a brief delay is expected.
- Conversations the agent starts from a hand-off or interview stay private to the person who began them and cannot be shared.
Stopping a run
Stop ends the run on the server and releases its resources. The conversation records that it was canceled.
Stopping is not an undo. Anything the agent already did — a task it created, a comment it added — stays done. Check the conversation's tool steps to see what that was, and look at Agent activity for the full record.
If the agent finishes in the moment between your clicking Stop and the request arriving, the result is kept rather than thrown away. The conversation shows what actually happened.
Time limits, and runs that end on their own
Every run gets a time budget — 20 minutes by default, and never more than one hour. A run that reaches its budget stops, and the conversation says so. Whatever the agent produced before that point is preserved.
A run can also end on its own without a reply, if the machine it was running on fails. Compass notices at its next daily sweep and marks the run interrupted rather than leaving the conversation looking busy forever. Your transcript up to that point is kept, and you can send the message again.
Daily usage limits are unchanged, and they apply when a run starts. A long run does not consume more of your daily allowance than a short one.
When a turn fails
A turn that fails while it is running inside the browser request now reports why. If the sandbox wrote anything to its error output before the failure, the first part of that output is appended to the error message, so a failure reads as a cause rather than only an exit code. Error output from a turn that succeeds is ignored. Output is capped, so a very noisy failure shows its beginning, not its end. Runs that execute in the background do not include sandbox error output.
A blank or whitespace-only API key for the selected model provider (see below; Claude harness only) is treated the same as a missing one: the turn is rejected up front with a configuration error, before a sandbox is started.
Model provider
The agent uses Anthropic's API by default. A deployment can opt in to AWS Bedrock instead with environment variables:
| Variable | Meaning | Default |
|---|---|---|
AGENT_MODEL_PROVIDER |
anthropic or bedrock |
anthropic |
ANTHROPIC_API_KEY |
Required when the provider is anthropic |
none |
BEDROCK_API_KEY |
Required when the provider is bedrock: a Bedrock long-lived API key (bearer token) |
none |
AWS_REGION |
Bedrock region | us-east-1 |
AGENT_MODEL_ID |
Overrides the model id | claude-sonnet-5 (anthropic), global.anthropic.claude-sonnet-5-5 (bedrock) |
Only the selected provider's key is needed and only that key is passed into the
sandbox. An unrecognised AGENT_MODEL_PROVIDER is rejected with a configuration
error, the same as a missing key. The Bedrock default is a cross-region inference
profile id; set AGENT_MODEL_ID if your account uses a different profile. The model
recorded on each assistant message is the one the turn actually ran with.
Web search backend
The agent's web_search tool uses Perplexity Search through the Vercel AI Gateway by
default. A deployment on AWS can opt in to Amazon Bedrock Web Search or to an Amazon
Bedrock AgentCore Gateway web-search connector instead. Nothing changes unless
AGENT_WEB_SEARCH_BACKEND is set to bedrock or agentcore.
| Variable | Meaning | Default |
|---|---|---|
AGENT_WEB_SEARCH_BACKEND |
bedrock selects Bedrock Web Search, agentcore selects an AgentCore Gateway; anything else keeps the AI Gateway |
unset |
BEDROCK_API_KEY |
Required for the Bedrock backend (the same key as the model provider) | none |
BEDROCK_WEB_SEARCH_MODEL |
Model that runs the search | openai.gpt-5.6-terra |
BEDROCK_WEB_SEARCH_REGION |
Region for the Bedrock endpoint | AWS_REGION, else us-east-1 |
BEDROCK_WEB_SEARCH_BASE_URL |
Overrides the endpoint | https://bedrock-mantle.<region>.api.aws/openai/v1 |
AGENT_WEB_SEARCH_GATEWAY_URL |
Required for agentcore: MCP URL of an AgentCore Gateway with the Web Search connector target (AWS_IAM auth) |
none |
AGENT_WEB_SEARCH_GATEWAY_TOOL |
Tool name on that gateway | web-search___WebSearch |
Results are the URL citations the model returns, with the cited text as the snippet.
The request sets external_web_access: false, so retrieval stays inside AWS. See the
Amazon Bedrock web search documentation
for supported models and regions.
The AgentCore backend is model-independent, so it works with the Claude agent. It signs
each request (SigV4, service bedrock-agentcore) with the deployment's AWS credentials:
Vercel OIDC via AWS_ROLE_ARN on Vercel, otherwise the standard AWS credential chain. That
identity needs bedrock-agentcore:InvokeGateway on the gateway. The region comes from the
gateway URL, else AWS_REGION, else us-east-1. No search API key is stored.
Harness and provider
AGENT_HARNESS is the outer choice; the model provider only applies inside the
default claude harness.
AGENT_HARNESS |
AGENT_MODEL_PROVIDER |
Credential passed into the sandbox | Model |
|---|---|---|---|
claude (default) |
anthropic (default) |
ANTHROPIC_API_KEY only |
AGENT_MODEL_ID or claude-sonnet-5 |
claude |
bedrock |
Bedrock token (AWS_BEARER_TOKEN_BEDROCK), CLAUDE_CODE_USE_BEDROCK=1, AWS_REGION only |
AGENT_MODEL_ID or global.anthropic.claude-sonnet-5-5 |
opencode (experimental) |
ignored | AI Gateway credential only (AI_GATEWAY_API_KEY or Vercel OIDC) |
AGENT_OPENCODE_MODEL |
Choosing a model per message
A chat turn may carry an optional model field (the chat's Model menu). It is
validated on the server against the allowed list (the built-in models plus
COMPASS_CLOUD_AGENT_MODELS) filtered to what the active harness can serve: Claude
model ids for claude, provider/model gateway references for opencode. An unlisted
value is refused with 400 INVALID_MODEL; on the bedrock provider any value is
refused with 400 MODEL_CHOICE_UNAVAILABLE. Precedence is the explicit pick, then the
selected agent's own model, then the deployment default. The model actually used is
stored on the run (model) when it starts and is not overwritten when it finishes, so
the run viewer and usage reporting show the real one.
With opencode, AGENT_MODEL_PROVIDER, AGENT_MODEL_ID, ANTHROPIC_API_KEY and
BEDROCK_API_KEY are not read: a Bedrock selection is ignored (not an error), even
an invalid one, and neither an Anthropic nor a Bedrock credential is ever passed to
that harness. The blank-key check described above applies only to claude.
Choosing an agent's model (AI Gateway catalog)
People who can create or edit cloud agents (Settings > Agents, and the workspace's
Agents section) choose the agent's own model in the Model field. On a deployment
that runs the opencode harness the field offers the full Vercel AI Gateway catalog,
not just the short allowed list:
- Source and filter. The public listing
https://ai-gateway.vercel.sh/v1/models(no credential is sent). Only entries withtypelanguageand thetool-usetag are kept, because an agent run is a tool-calling loop. - Picker. A search box (name, id or provider), a provider filter, and a list grouped by provider, showing each model's name and id. The curated models appear first as "Recommended"; "System default" stays the first row.
- Cache and timeout. The listing is fetched server-side and cached for about one
hour (Next.js
fetchrevalidation); each fetch has a two second timeout, and a failed read is remembered for about a minute so an outage never stalls every page render. - Fallback. If the gateway cannot be read (error, timeout, bad response) the picker shows the curated list with a short note, and saving accepts only curated models plus an agent's already stored model. Editing an agent never clears its stored model.
- Validation. The server action re-checks the chosen id against a fresh read of the catalog (and the usual id shape rule); the browser's list is never trusted. Curated models are accepted without a catalog fetch.
- Claude harness. The Claude harness can only serve Claude model ids, so the catalog is neither offered nor accepted there; the field keeps the curated list and says why.
- Chat is unchanged. The chat's per-message Model menu above still offers only the curated list. A turn for an agent whose own model is a catalog model runs on that model (the agent's own model, second in the precedence order); the chat shows its catalog name when the catalog is readable, otherwise the bare id.
Deployment
Administrators must apply and verify migration 069_background_agent_runs
before this behavior is available. Until it is applied, the agent keeps working
exactly as it did before — turns run inside the browser request, with the
previous few-minute ceiling — so deploying ahead of the migration is safe and
changes nothing for users.
The board's per-person "looked at" state needs migration 109_agent_conversation_reviews.
Until it is applied the board still works, but every finished conversation shows as New.
Rich card metadata (conversation squad, persisted summary/PR URL, and live run substatus/activity) uses migration 119_agent_board_rich_cards, durable child sub-agent hierarchies use migration 120_agent_child_runs, interactive agent questions plus scheduled wake-ups use migration 121_agent_interactive_controls (plus /api/cron/agent-wakeups in vercel.json), and personal Workspace/Squad orchestrator supervision plus two-stage wakeup batching and activity-gated heartbeats use migrations 122_agent_orchestrator_supervision and 123_agent_orchestrator_wakeups (plus /api/cron/agent-orchestrator in vercel.json), all falling back gracefully if unapplied.
Two settings matter for a deployed environment:
CRON_SECRETmust be set. Compass runs a scheduled job once a day (the Vercel plan only allows daily crons) (/api/cron/agent-run-sweeper) that ends runs which have exceeded their budget or whose sandbox has stopped reporting. Without the secret the job refuses to run, and interrupted runs stay visible as in-progress until it is configured.- The scheduled job is declared in
vercel.json. A deployment that drops that file keeps working, but nothing cleans up after a failed run.