---
title: Shared Team agent
description: Space identity, native Pi code execution, original-user authority and named file publication.
owner: engineering
sourceFiles:
  - .env.preview
  - .env.production
  - packages/db/src/schema/team-agent.ts
  - packages/contracts/src/server/team-agent.ts
  - apps/server/src/domain/runtime/team-activation.ts
  - apps/server/src/domain/runtime/team-response-activation.ts
  - apps/server/src/domain/runtime/team-response-preference.ts
  - apps/server/src/runtime/team-response-decision.ts
  - apps/web/src/features/settings/components/team-response-preference.tsx
  - apps/server/src/domain/conversations/interactions.ts
  - packages/db/src/schema/conversation-interactions.ts
  - apps/server/src/domain/runtime/team-authority.ts
  - apps/server/src/domain/runtime/team-conversations.ts
  - apps/server/src/domain/runtime/team-tools.ts
  - apps/server/src/domain/runtime/team-people.ts
  - apps/server/src/http/conversations.ts
  - apps/server/src/worker.ts
  - apps/server/src/runtime/team-agent/delivery.ts
  - apps/server/src/runtime/team-agent/session.ts
  - apps/server/src/runtime/team-agent/pi.ts
  - apps/server/src/runtime/team-agent/prompt.ts
  - apps/server/src/domain/onboarding/data.ts
  - apps/server/src/domain/onboarding/service.ts
  - apps/server/src/domain/onboarding/dispatch.ts
  - packages/db/src/schema/team-onboarding.ts
  - apps/web/src/features/conversation/persisted-queries.ts
  - apps/server/src/runtime/team-agent/tools.ts
  - apps/server/src/runtime/team-agent/schedules.ts
  - apps/server/src/runtime/team-agent/executor.ts
  - apps/server/src/runtime/browser/workspace.ts
  - packages/contracts/src/server/browser.ts
  - apps/web/src/features/browser/browser-panel.tsx
  - apps/web/src/features/conversation/use-team-agent.tsx
  - apps/web/src/features/conversation/components/composer.tsx
  - apps/server/src/runtime/team-agent/activity.ts
  - infra/team-agent.ts
  - infra/team-code-sandbox.ts
  - infra/team-computer.ts
  - infra/team-computer/Dockerfile
  - apps/server/src/runtime/team-computer/worker.ts
---

A space has one shared Team-agent identity and one default space-level Team conversation. New space creation saves both in the existing database transaction. Existing spaces initialize them idempotently under current Team creation authority. Initialization records intent and opens durable state; it makes no model request or per-space infrastructure deployment.

## Execution boundaries

The API Worker deployment exports the Team agent Durable Object. The DO runs native Agents PiHarness, Lifecycle, Scheduler and Computer. A separate RPC-only Worker exports Pi's native remote code-mode sandbox Durable Object. Its QuickJS VM evaluates generated JavaScript with bounded memory and interruption budgets, invoking only the tools supplied by Pi. It has no application database, storage or credential bindings, and no public HTTP endpoint.

The flow is API Worker → Team DO/Pi → remote sandbox → supplied tool callbacks → authorized domain services. Computer tools call a separate RPC-only Worker whose Durable Object and Linux container are addressed by the Team instance and operation ID. Each operation owns its own SQLite filesystem and container; a shell cannot read another operation's working files. Native Computer synchronizes files between SQLite and the container, so file tools, Python and named-file publication use the same bytes. Tool declarations and results cross native Workers RPC as data; live Computer filesystem objects stay inside their owning Durable Object.

Pi's QuickJS sandbox runs JavaScript tool orchestration. Computer's `exec` runs Python 3, bash and standard Linux commands in the pinned Computer daemon image. Python's standard library is available. The container receives no application bindings or credentials. Direct outbound internet access lets the agent install missing software using apt-get and language package managers; Ruby, Node and npm are not preinstalled. Installed system packages belong to the live container and must be reinstalled after replacement or in a new operation. Commands have a five-minute execution limit, support cancellation and return stdout, stderr and exit status. Execution is unsafe to replay automatically. Computer calls run sequentially, and their native sync connection closes after each call so the container can sleep after 60 seconds of inactivity. Scratch persists in SQLite across container sleep.

This follows the published [Cloudflare Pi harness](https://developers.cloudflare.com/agents/harnesses/pi/) and the pinned native Pi remote sandbox API. Pi owns code-mode dispatch, tool replay and recovery; Workbench supplies application policy and adapters.

## Instructions and authority

The shared prompt in `runtime/team-agent/prompt.ts`, imported by the Pi registry, covers teammate voice, onboarding, connected-app discovery, initiative and runtime constraints. For interactive requests that need live connected data, Wes searches the space's authorized Executor catalog and uses the tool path it returns. For QuickBooks aging, Wes prefers the Finance Core QuickBooks report tool when available and checks the returned cutoff before reporting a result. The prompt describes the onboarding loop below. Runtime code owns triggers and delivery. General periodic check-ins are not configured. Background onboarding can complete quietly without a Team message. Standing responsibilities and monthly-close policy remain product decisions tracked in [WB-97](https://linear.app/wurthy/issue/WB-97), outside the system prompt.

An authorized Team member addresses a message to **@Wes** in the default space-level Team conversation. The composer’s mention menu offers Wes separately from people, with its orb; choosing Wes never sends an agent ID as a human mention. Typing the standalone `@Wes` address also works. For a direct invocation, the server records a pending start alongside the human message in the same transaction. After commit, the append handler registers bounded dispatch with the Worker execution context and returns the saved human message without waiting for Jev or admission. Dispatch has a five-second bound and does not wait for model completion. The durable intent remains available to recovery if background dispatch is interrupted. The exact saved message ID becomes the stable operation ID. The browser observes status rather than issuing an automatic start request. Onboarding events use the separate server-owned admission below. Messages without a Wes mention remain ordinary Team messages when their sender has disabled the response preference below. Task and Client rooms do not accept direct Team-agent invocation. Authorized Client inputs can trigger onboarding continuation when their room is watched by an open need.

Each native session executes one run at a time. Ordinary explicit requests retain member-owned thread sessions. Newly opted-in requests use a member-owned default Team room session, allowing unthreaded additions to join the same work. Separate members retain isolated transcripts, source receipts and working files. Schedules and onboarding keep their separate contexts. Unrelated instructions enter Pi’s durable follow-up inbox in order, one instruction per run; related inputs marked as steers enter together after the current tool round. The [conversation UI](/architecture/conversations) places Wes’s activity and status/retry actions alongside the reply context instead of a separate trigger panel. A failed start keeps the saved human message and retries its original ID. Waiting instructions keep the ordinary Wes activity indicator and continue status polling without queue labels or a manual Retry. Unavailable model/runtime configuration retains an explicit Retry action. Unknown or interrupted admission remains pending; the existing five-minute Worker sweep recovers at most 50 pending messages per pass within a 45-second budget, rechecking original-user authority. Denied authority blocks the intent. Historical messages have no pending marker and are never backfilled or replayed by recovery. Reloading checks the initiating user’s unanswered mention without automatically starting another operation. Terminal operations clear their working indicator and reconcile persisted tool changes, including task lists and details; see [mutation reconciliation](/architecture/data-fetching#mutations).

Wes’s working model uses the native `report_progress` tool to share task-specific progress phrases of at most 3 words, such as “Checking for duplicates”. Each update is limited to three whitespace-separated words and 60 characters of single-line plain text and rechecks current invocation authority before durable storage. The latest phrase survives later generation and tool hooks and appears without a name prefix in the existing Trace row and polite live announcement. It remains separate from the final saved reply; completed, stopped and denied operations show no stale progress.

Before a generated update exists, native Pi hooks provide activity fallbacks: pending admission shows “Getting started…”, generation shows “Thinking…”, and tools show categories such as “Reviewing tasks…”. Concurrent calls retain their own activity until they finish. The authenticated status contract carries only these public categories and optional milestone prose. Instructions require sparse user-facing updates without tool names, code, raw reasoning or unverified success claims. Status and Stop retain the original-user authorization boundary; other users cannot read an operation through its working indicator.

Each operation retains its original user, organization, exact space, default Team conversation and immutable instruction. Onboarding events retain the responsible user from setup; a client contribution never supplies Team authority. Sharing the agent identity never shares a user's permissions. Every model request resolves credentials only after checking current authority. The check is bound to Pi’s task abort signal so overlapping sessions cannot exchange credential authority. Native observational hooks alone are insufficient to block a request. Tools and final delivery also recheck current membership, relationship and grants.

Interactive requests reuse a native Pi session and Computer workspace scoped to the original member, organization, Team conversation and root thread; opted-in response requests use the member-owned default Team room context instead of a root-thread context. A reply chain is resolved server-side to its root, including replies to agent messages. Follow-ups retain the member's tool transcript and working files across eviction and restarts. Another member or another thread receives a separate working context; authorized canonical replies remain shared. Scheduled definitions use separate member-owned working contexts, and background onboarding events keep fresh isolated sessions. Actual task reads, exact imported file versions and Client recipient lists generate server-side source receipts; later model requests and tools must still have access to those sources. Default Team history is the only implicit conversation context for direct requests. Onboarding adds its authorized setup/need state and exact triggering Client input, without loading earlier Client history. Task-room agent invocation requires separate admission.

Working contexts retain source receipts across messages and compaction. Current access to every retained source is checked before further generation, tools and delivery. Deleting a task does not discard the provenance of its retained contents. Revoked sources block continuation; the runtime does not silently reset and reconstruct restricted context. Native task memos pin generation and tool calls to the original operation, so session reuse cannot transfer authority to a later request. Stop records cancellation before awaiting native abort; stopping a queued instruction withdraws only that instruction. Failed runs leave their own operation unanswered and automatically advance the native inbox to the next follow-up. Blocking context compaction uses the same credential authorization boundary; background compaction is disabled.

The server independently verifies native settlement before appending the canonical agent message. Exact retries return the same message. A stopped, interrupted or denied operation is not presented as a successful response. Native recovery retains completed tool results; an interrupted model generation can remain unanswered rather than automatically repeating a request with an unknown outcome.

The `finance_core` Team tool runs the original pinned Finance Core CLI on Computer. Workbench supplies current invocation scope and rejects model-supplied authority fields. Discovery and preparation execution share the complete package described in [Executor updates](/operations/executor-bootstrap#finance-core-app-updates). Its results remain preparation work; normal file saving and publication require their existing tools and permissions.

## Replies without mentions

In **Settings → the space → About → Wes replies**, **Reply to me without @Wes** controls the default space-level Team chat. The preference is not displayed above the conversation. This preference is on by default for eligible Team members and owned by the authenticated Team member in that conversation. A member with current Team write access can change their own preference; the request cannot name another member. Each member’s choice is independent; changing yours does not change anyone else’s. Task rooms, Client rooms and private conversations are outside this policy. Replies remain visible in the shared Team chat. Turning it off prevents new automatic starts; already admitted work retains the existing runtime and cancellation rules.

For an eligible message, the append transaction creates an enabled preference only if that member has no saved choice, preserving every explicit opt-out. It snapshots the enabled preference revision only for a newly saved, original human message in the default Team room. After commit, the server claims that exact saved-message decision once. It checks current account and room authority before sending a bounded snapshot to Jev. Historical messages, imported/shared messages and agent messages never acquire an automatic trigger. Duplicate saves do not classify again. Changing the preference invalidates outstanding intents, including an off/on cycle.

Every eligible unmentioned human message is evaluated, including open questions to the room and messages without Wes's name. Human mentions and reply relationships are evidence for the judgment, rather than a blanket exclusion. The bounded transcript contains only this authorized Team room's text: at most eight preceding original messages from the previous ten minutes, each at most 2,000 characters. The current message has the same size limit. Longer evidence is skipped rather than truncated. The server separately inspects up to eight earlier admitted inputs belonging to the sender to identify running room work. Native run membership identifies the original task when several placed inputs are running together. The server resolves that owner under the sender’s current authority and confirms it is still running; only its short original instruction is supplied as the active target. A later correction does not replace the task anchor. Attachments, private working transcripts, file contents, Client history and task sources are not loaded for the decision.

One native Effect decision request asks independent questions about invitation, acknowledgment, continuation and stopping, plus a Choice among the existing six reaction emojis. Transcript text is untrusted evidence. Initial decision cutoffs are 0.70 for a useful response, 0.80 for steering a known running request, and 0.90 for acknowledgment or stopping. These are provisional policy values, not calibrated production accuracy. Open questions may invite Wes; human-to-human commitments can receive a restrained reaction without a text response or taking over responsibility. Low or uncertain participation, missing credentials, invalid results and a two-second timeout stay quiet. A response with uncertain relationship uses follow-up delivery. Explicit @Wes bypasses the decision and retains reliable follow-up admission.

The continuation Noul asks whether a message supplies input for, corrects, or changes how to do or present that active task. Its explicit true/false criteria include figures, dates, units, output length and format as task refinements, even when the original request already asked for a concise answer. An independent deliverable, explicitly separate work, or a correction to another queued task remains follow-up work. An unclear relationship also uses follow-up. This uses native [Effect probability decisions](https://effect.website/docs/v4/api/effect/ai/Decision) and the existing Pi boundary; it introduces no text-based answer suppression or custom queue. Once a run has finished, a new reformatting request can produce a new answer.

Before admission or a lightweight reaction/control action, the server rechecks the saved preference revision, original sender authority and two-minute freshness. A newer human message never suppresses an earlier intent. Decisions and saved message IDs remain durable and are not reclassified after an unknown provider outcome. The existing sweep marks stale claimed decisions unavailable; it never backfills old messages. Reactions use the existing authorized, idempotent reaction write and create no main-model operation. A stop judgment can cancel only the same sender's running input observed before the judgment; it does not delete drafts or cancel another member's work. The explicit Stop control remains available.

Native `whenBusy: steer` queues input until the current tool round finishes, then includes it in the next model request. It neither interrupts an in-flight model request nor stops tools. `steeringMode: all` places all waiting steers together; `followUpMode: one-at-a-time` keeps unrelated requests separate. If a run has already answered, an arriving steer can become a later run. There is no collection timer, custom editable queue, selective merge of arbitrary pending requests, or guarantee that every rapid burst produces one answer. Those are separate extensions if observed behavior warrants them.

Before generation, credential resolution and tools, every joined input must retain its original authority; another input cannot lend it permission. Native run history attests which input operations share an answer. Those inputs reconcile to one canonical reply under the run's original input, avoiding duplicate chat replies while retaining every saved human message and operation identity. Unknown or revoked work fails closed. Jev scores never grant tool permissions or publication authority.

The browser observes admitted work through existing activity/status polling. Waiting inputs have no queue label. Quiet or reaction-only decisions create no working indicator. The implementation uses the existing harness and delivery lifecycle; it adds no background principal or execution scheduler.

```mermaid
flowchart TD
  A[Save and render human message] --> B{Explicit Wes mention?}
  B -->|Yes| F[Authorized native follow-up admission]
  B -->|No| C{Member preference and message eligible?}
  C -->|No| Q[Ordinary chat]
  C -->|Yes| D[Jev participation and relationship decisions]
  D -->|Quiet| Q
  D -->|React| R[Authorized emoji reaction]
  D -->|Stop| S[Cancel own observed running input]
  D -->|Related to running work| T[Native steer at tool boundary]
  D -->|New or uncertain relationship| F
  T --> H[Native model and tools]
  F --> H
  H --> I[One canonical reply per native answer]
```

The implementation adapts TypeSafe's [Noul screening pattern](https://docs.typesafe.ai/patterns/noul-screen) and [implemented chat filter](https://github.com/typesafe-ai/typesafe-public-examples/blob/main/cookbooks/twitch_chat_filter/twitch_chat_filter.py): code owns eligibility and the action taken from a model judgment. The [OpenClaw Smart Mention issue](https://github.com/openclaw/openclaw/issues/1721) is a proposal, not a verified shipped decision gate. Workbench retains its own saved-message, authorization and native Pi boundaries.

## Capabilities and files

| Capability | Current boundary |
| --- | --- |
| Tasks | List, read, create, edit and delete real tasks in this space through existing task services and grants |
| Team context | Read the default Team conversation under current access |
| Computer | Durable working files and Python/shell execution per member and thread; isolated scratch for background onboarding |
| Named files | Import an exact saved file version; save a named Computer snapshot through the existing file service |
| People | Add an existing account as a Firm Operator; manage current client-business members as exact Client conversation recipients |
| Client messages | Explicit text publication to an authorized Client conversation in the same space; task targets also require share authority |
| Browser | Native `agents/browser/pi` tool drives managed Chromium, reads pages and takes screenshots; each private working context owns its cookies and tabs |
| Scheduling | Native one-off, interval or UTC cron timing under the original user's current authority |
| Executor | Native MCP adapter still requires its trusted connection resolver; the WB-84 preview additionally supplies a server-gated, read-only Linear connection tool |

Team Wes uses the scoped Executor connection to read QuickBooks invoice PDFs and uploaded PDF attachments into the current private Computer workspace. The PDF tool returns the path and file metadata. When the user asks for a downloadable file, `file_save` creates the named file under the existing space permissions.

Scratch remains in Computer. Saving a name creates an immutable file version: Postgres owns its metadata and authorization, while [space storage](/architecture/space-storage) owns the private R2 location for its bytes. Apps & Files shows named saved versions. A member's follow-up in the same thread reuses its working files. Another member must explicitly import an authorized named version to reuse shared work; private working files and tool transcripts are not inherited across members. Legacy operation workspaces are not silently imported into new persistent contexts.

Client posting has no extra Workbench approval step in this version. Current share permissions still apply. File publication into Client requires the dedicated exact-version publication service; saving an internal Team file does not expose it to Client.

A schedule stores its original instruction and actor. Each due occurrence persists a distinct operation ID before admission. A blocked occurrence records the denial, contention or missing model and cancels future timing until explicitly resumed. Scheduled runs cannot create more schedules. `admitted` records admission, not successful model completion; a one-off `completed` definition means its timing has fired. Scheduling grants no additional permissions.

## Onboarding loop

Every new space immediately receives a saved Wes introduction in its default Team conversation, independently of model availability. See [space channel provisioning](/architecture/conversations#space-channel-provisioning). The background review uses that history to avoid introducing Wes again.

Creating a new client-bound Finance space atomically records a `team_onboarding` responsibility and its initial event alongside the default Team identity. An explicit Finance setup request also installs the loop idempotently, including for an existing bound space. Other spaces and existing rows are not automatically backfilled. The setup user remains responsible for the loop.

Wes uses `onboarding_state` to inspect the business, client membership count and tracked inputs. QuickBooks execution is still unconfigured in this runtime; a connection or diagnostic is never fabricated. `onboarding_track` creates a real Team task and an open need in the same transaction, including the normal task grants. A stable key reuses that task across turns and tool retries. A deleted task leaves a tombstone instead of being silently recreated. `onboarding_resolve` records the outcome and marks the same task done after Wes verifies the input. Receiving any file or reply alone is not evidence that a requirement is satisfied.

Every open need accepts space-level Client inputs in its Finance space, including when it is also bound to a task conversation. Client conversations on the need’s linked task are watched automatically; an explicit binding may watch another authorized Client conversation in the same space. Watching does not share a task, grant client access or send a request. After a human client message is committed, or a client upload becomes ready, the same transaction records an event when the room is space-level or matches an open need’s task or explicit conversation binding. Private/Team messages, internal authors, unmatched task rooms and failed uploads do not enqueue client-input events. Exact message and upload retries reuse the same event.

The existing five-minute Worker sweep dispatches at most one event per selected loop per pass. This is durable event-driven continuation with up to five minutes of initial dispatch latency, not a periodic conversational nudge. Busy spaces and missing model configuration leave events pending for a later pass. Each event ID owns one native Pi operation and canonical output ID, so a lost dispatch/save response reconciles the same run. Unknown or cancelled native outcomes become `unanswered`; denied authority becomes `blocked`. Those events are retained rather than automatically replayed as fresh work. An explicit resume admits a new review event after the cause is fixed.

Task-room sources must have a firm-wide Team read grant; being readable only by the responsible user does not authorize a background summary in the default Team room. Before generation, tools and delivery, the server rechecks the original user's current Team access, tracked task/source access, and the exact client source. The model receives the current Team history, onboarding state and exact client message or immutable ready-file metadata. Only the triggering Client file version can be imported from outside Team during that event. Client input remains untrusted evidence. A background run may inspect context and track/resolve onboarding tasks; the tool dispatcher blocks general task mutations, Client posting and recipient changes. Computer reads can inspect imported files in the isolated operation workspace. Computer writes and command execution, Executor and scheduling tools reject background onboarding. Invitations, provider connection setup, external writes and automatic diagnostics remain separate capabilities.

At the end of a background review, `onboarding_result` records an internal outcome note and selects `team` or `quiet` delivery. The prompt uses current Team history and onboarding state to avoid repeated unchanged findings. Greetings, acknowledgments and reviews without a useful announcement should finish quietly; task changes may still be saved. A requested confirmation, useful new result, decision requiring a person or explicitly agreed follow-up may warrant a Team update. No standing reminder cadence or deadline is invented.

Only a successfully settled native operation can become `quiet`: the event keeps its audit note and native completion acknowledgment, while no conversation message is created. Native errors or cancellation remain `unanswered`; a quiet preference does not turn failure into success. Quiet delivery is unavailable in direct human turns. Existing events default to Team delivery for compatibility. Team-delivered runs save one standalone Wes message in the default Team room, without fabricating a human instruction or attaching the reply to a Client message. Open conversation views use the shared live-query policy: authorized messages refresh every ten seconds in the foreground and on returning to the tab. Transient failures retain existing content; access denial removes unavailable data. Other clients' and private conversations remain isolated.

The responsible user can ask Wes to pause, resume or complete the loop through `onboarding_control`. Background runs cannot change that policy. Paused loops retain newly saved client-input events but do not dispatch them; resume rechecks current authority and preserves source/task identities. Completed loops stop collecting inputs. These controls currently operate through Team chat, with no new settings screen. Monthly-close responsibilities, timing and escalation choices remain in [WB-97](https://linear.app/wurthy/issue/WB-97).

The HTTP integration tests cover real transactions, task/grant reuse, retry deduplication, client reply and ready-upload sources, failed-upload exclusion, standalone canonical delivery, quiet task completion without a message, failed quiet reviews, task/chat routing, pause/resume and revoked original authority. The native Pi test protects code-mode execution, recovery and durable quiet completion acknowledgment. The complete production Worker → Pi → authorized database callback roundtrip for onboarding still requires hosted preview acceptance; local boundary tests do not establish it.

## Optional tools and inbox behavior

The Browser button opens the latest captured page and a downloadable screenshot for the current member and thread. Take control grants a short-lived native Live View link to sign in or interact; browser tools wait until Return control to agent. Takeover and session closure reject while a browser tool is running, so stop the agent first. Ending the session discards its browser login. Browser Run reclaims an idle browser after five minutes; the next tool use reports replacement and cannot promise the former login survived.

The `BROWSER` binding supplies Cloudflare Browser Run; `BROWSER_LOADER` runs the native tool's generated browser code with no outbound network or application bindings. Current invocation and retained-source authority are checked before and after each tool and before returning a browser view. Screenshots requested by the model are saved into the current Computer workspace and can be published through `file_save` under existing file permissions. The viewer's latest screenshot is stored in the agent's SQLite, separately from named shared files. Native Live View URLs reach only the authorized initiating user's browser, never the model or chat. Page content remains untrusted. Browser tools are unavailable during background onboarding; user-authorized scheduled work retains its own private working context. The former public-web stubs have been removed; no separate search-provider account is required to navigate or read a webpage.

Questions/suggested-answer tools are outside the current scope. Pi provides durable child conversations and invocation-owned tasks for subagents, but the Team agent has no delegation tool installed yet. Its adapter still needs original-user authority, source-access checks, cancellation and recovery wiring.

Scheduling controls when a new run starts, including recurring runs. Steering changes instructions in an active run; queued follow-ups wait behind it. Those are Pi inbox behaviors, separate from the Scheduler. Team submission uses native `whenBusy: "followUp"`, `followUpMode: "one-at-a-time"` and `afterFailedRun: "continue"`. Steering is not exposed. Follow-ups retain their saved message ID, original-user authority and independent delivery receipt; accepting a later instruction does not revoke the active turn.

## Configuration and rollout

Preview and production select GPT-6.1 Sol (`openai/gpt-6.1-sol`) through Vercel AI Gateway. Each stage uses its own existing `AI_GATEWAY_API_KEY` Proton reference; the preview reference is shared with the earlier agent preview. The deployment runner resolves the stage-owned key and Alchemy binds it only to that stage's API Worker. Development retains explicit, optional [model configuration](/reference/cli#native-team-runtime-regression). Without a model, setup reports `model-required` and model starts remain unavailable. The Executor adapter requires a trusted HTTPS host, a scoped browser-approval grant and current authorization for the initiating user, organization and space. The shared Team grant belongs to its space; organization-wide PATs or model-supplied credentials are not a substitute.

Infrastructure is declared once through Alchemy, with durable instances addressed lazily by immutable space identity. New spaces use the predeployed shared evidence bucket with automatic readiness verification; the reviewed enrollment manifest preserves legacy dedicated buckets. Agent initialization does not provision a bucket or activate Executor. Changes to deployed Workers, model configuration and storage enrollment require their normal rollout checks.

## People tools

`firm_operator_add` uses the existing firm membership operation and its permission checks. It adds an existing Workbench account as a Firm Operator, with normal firm-wide role access. Existing members retain their current roles. Admin and Lead appointments are outside this tool. A missing account returns `account-required`.

`client_conversation_create` creates an empty space-level Client conversation with no recipients, allowing a new client audience without exposing an existing room. `client_conversations` lists only Client conversations in the current space whose recipients the initiating user can manage. It returns targets and recipients, without Client message history. `client_add` resolves an email only within the space's bound client business and reuses the existing recipient-grant service. Adding a person grants read/write access to that exact Client conversation, including its existing shared history. Team/private history, task access and other conversations keep their existing permissions. An exact retry returns the existing grant. Losing task update/share authority blocks further roster access and model use of its saved receipt.

Client participation requires current membership in the bound client business. Missing membership returns `membership-required`, without disclosing whether the email exists elsewhere. `member_invite` creates a membership invitation through the same server-only Better Auth policy adapter used for delegated [People invitations](/architecture/authentication#people-settings). Its target is either the initiating user's firm or the space's bound client business; a model cannot choose an arbitrary organization. Current role and relationship permissions apply. Firm staff can invite client admins; a chat-access request alone does not authorize granting that role. Existing members keep their roles. An unexpired pending invitation for the same email, role and firm scope is returned rather than duplicated.

The result contains an expiring absolute acceptance URL using this deployment's configured Workbench origin, `delivery: copy-link` with `emailSent: false`, or `delivery: email-queued` with `emailSent: null` and `chatAccessGranted: false`. Wes must include the link and explain the returned delivery status in its final answer. Queued email does not confirm inbox delivery; manual sharing remains available. Returning an existing pending link sends no further email. See [invitation email](/architecture/authentication#invitation-email). Acceptance requires the named verified email and rechecks the original inviter's live authority. It does not grant Client conversation, task or space access. After acceptance, an explicitly requested `client_add` can grant the selected conversation's read/write access, including its existing history. There is no automatic agent wake or chat enrollment on acceptance. Background onboarding cannot invite people. Adding people to Executor app audiences is a separate identity/connection integration.

`firm_operator_add` and `client_add` have no role argument; `member_invite` requires an explicit membership role. People mutations use native unsafe replay policy so interrupted calls with unknown outcomes are not automatically repeated. There is no new Space Operator role or separate space-membership table; Firm Operator and exact Client conversation access use their existing authorization models.

The [Linear connection preview](/architecture/space-connections#clickable-linear-preview) configures the native `executor` MCP tool with a space-specific, read-only OAuth grant. Provider OAuth consent is completed separately. The trusted Worker verifies the active assignment before releasing that space's seed; the Team DO retains token rotation privately. Each MCP result binds a connection receipt that is rechecked before later model requests and delivery. Disconnect blocks new reads and retained unpublished context; it does not erase canonical Team messages already published. Client-bound Finance creation queues native app and read-only scoped-grant provisioning after the space transaction commits. The encrypted grant is released only for an active provider assignment in the same space; users still approve provider OAuth themselves.

The `connections_open` tool returns the current business’s Client Settings → Connections link anchored to this space. It accepts no client or space selector and does not approve provider OAuth or grant app administration. The person uses the browser to connect; the picker currently offers Linear, Notion and Sentry. The person selects a provider and approves its OAuth flow.
