Repository navigation
Description
Where things stand
Chat replies, and task runs that a person starts on the organization's standard agent, run on one engine: executeTurn → runTurn, with the same retrieval tools, the same work tools, the same tier ladder (none → light → full), the same file sink, skills, budgets, usage ledger and light-sandbox pool. That was delivered in #4817 (chat), #4844 (task runs) and hardened in #4849. The goal behind it: chats and tasks should work the same way under the hood, and a task should not boot a full environment for work a light one can do.
Not everything is shared yet. This epic tracks what is still separate. Each child issue lays out the evidence and the options for one part and proposes no design.
The three ways an agent works today
Checked in code at main a83e645e27.
| Chat reply | Task run on the shared engine | Task run in a worker (harness) | |
|---|---|---|---|
| Starts when | a person sends a message | a person starts the managed standard agent on an automatic runtime and its model is served directly (backend/domains/tasks/agent-runs.ts:418) |
anything else: schedules and webhooks, automations, other agents, agents a person created, a pinned runtime, a subscription-only model, and the hand-over from the shared engine |
| Turn loop | executeTurn → runTurn |
the same | the agent's own CLI (Claude Code, Codex, …) in a full sandbox |
| Knowledge and web | rag_search, rag_fetch, web_fetch (createChatToolExecutor, backend/core/chat/turn_action.ts:1456) |
the same executor | rag_search, rag_fetch through the MCP bridge: a separate implementation |
| Files, skills, code | create_file, load_skill, read_skill_file, run_code (backend/domains/agent_tools/) |
the same executors | the agent's shell and staged skills; no such tools |
| Images | agent_tools/image.ts |
the same | generate_image through the bridge: a separate implementation |
Task, document, contact, product, website and knowledge-entry tools; ask_human |
not offered | not offered | through the bridge (17 grantable names; ask_human on the automation lane) |
| Full workspace | not offered; the person is told how to create a task | use_workspace, when the run has a harness to hand over to |
is the full workspace |
| Policy that switches tools | Chat tools (Files, Skills, Code), Image generation | Image generation only | Image generation, per-agent tool grants |
| Acts for | the person chatting | the person who started the run | the session's binding, or the starter |
What is left
- Improvement: knowledge search and image generation exist twice, once for chat and shared-engine task runs and once for the harness bridge #4875 knowledge search and image generation exist twice, once for the engine and once for the harness bridge
- Decision: which task runs should start on the shared engine, beyond a person starting the standard agent? #4876 which task runs should start on the shared engine, beyond a person starting the standard agent
- Decision: should chat start a full workspace itself, or keep handing long and repository work over to a task? #4877 whether chat should start a full workspace itself, or keep handing long and repository work to a task
- Decision: which policy switches should govern files and code in task runs on the shared engine? (Chat tools governs chat only) #4878 which policy switches should govern files and code in task runs on the shared engine
Observations on how they relate (not a plan):
- Decision: which task runs should start on the shared engine, beyond a person starting the standard agent? #4876 depends in part on tool parity: agents with connectors, platform tool grants or secrets need what the harness gets through the bridge (Improvement: knowledge search and image generation exist twice, once for chat and shared-engine task runs and once for the harness bridge #4875); the engine has none of it.
- Decision: which policy switches should govern files and code in task runs on the shared engine? (Chat tools governs chat only) #4878 is independent and changes what an admin sees.
- Decision: should chat start a full workspace itself, or keep handing long and repository work over to a task? #4877 is first a product-boundary question: feat(platform)!: chat = ask/retrieve — the Chat·Task·Automation boundary model #2877 set "chat asks and retrieves; deliverables live on tasks"; feat(platform): chat makes files and uses skills, sandbox only as needed #4817 widened it to making files and running code while keeping long work in tasks.
Constraints that shape all of them
- A task run on the shared engine is one job (
task.agent_native): no retry, expiry 3,600 s, heartbeat 60 s, at most 4 per organization (backend/jobs/tasks.ts). Longer work moves to the harness. - A chat turn is bounded too: at most 12 tool rounds when work tools are offered (
MAX_WORK_TOOL_ROUNDS,lib/chat/turn.ts:121), 16 distinct tool calls and 5 minutes per round (lib/chat/tool-batch.ts), and a liveness heartbeat the watchdog sweeps after 10 minutes (backend/domains/chat/watchdogs.ts). - Authority differs by surface: a chat acts for the person chatting, a task run on the engine for its starter, a harness call by the session's binding (
resolveSessionActionContext), and a member's harness run is confined to its task. - Tool names are data: the grantable names live in agents' equipment and in managed configuration (
packages/shared/src/schemas/managed-configuration.ts:44), so renaming or removing one is a migration. - The platform and the sandbox runtime roll separately.
Done so far
- feat(platform): chat makes files and uses skills, sandbox only as needed #4817: chat makes files, uses skills and runs code; tier chosen by tool; the Chat tools policy; light sandboxes (
maxLightSessionsPerOrg). - feat(platform): run standard agent tasks on the shared chat engine #4844: person-started standard-agent runs on the shared engine;
use_workspacehands a run to the harness with a brief; one transcript, one settle path. - fix(platform): harden chat tools and light sandboxes after review #4849: bounds on a step's tools (count, time, Stop), image admission under parallel calls, strict policy reads, idle-sweep fix, no shared package caches for the
defaultprofile.
Related issues filed from the same work: #4870 (what code in a sandbox can reach), #4871 (no disk bound per workspace), #4872 (explicit-use-only skills).
Activity
yannickmonney commentedon Nov 14, 2026
Decision
This epic stays open as the tracker. It closes when #4875, #4876, #4877 and #4878 are closed.
The rule
Answers by child
chat_toolskept) also governs files, skills and code in standard-agent task runs on the shared engine. It does not govern the hand-over to the full workspace; the Standard agent policy and pins govern that and any worker shell, and the copy says so plainly. The setting stays under Policies & Limits, and the Sandboxes page links to it.rag_searchschema (the bridge still accepts{query, limit}), and one result type. Kept on purpose: the idempotency window, the one-in-flight rule and separate ledgers. The harness keeps its shell and staged skills.Why
The two tool layers have already drifted on limits, admission, policy reads and result shape. That drift is how a check ends up enforced on one path and missed on the other. Reusing the model-access rule avoids a second definition of who acts. Keeping trigger spend in the automation bucket means switching engines never moves cost onto a person's own budget. Extending Chat tools matches what an admin who switches Code off expects, and the copy is honest that the full workspace is a separate lever. Confirmed hand-over keeps a person in control before work and spend start.
Implementation units
fix(sandbox): correct the stalegenerate_imagecomment and pin the duplicated image ceiling with a test. Base: train. Size S.feat(governance): Chat tools governs files, skills and code in standard-agent native runs; copy in every locale, docs, spec and a manual box. Base: feature-train. Size M.refactor(agent-tools): one image-generation contract with a conformance suite through both transports. Base: feature-train. Size M. Needs 1.refactor(knowledge): the bridge'srag_search/rag_fetchrun the engine executor; old arguments still accepted. Base: feature-train. Size M. Needs 3.refactor(agent-tools): bridge-only domain tools move into shared executors, one PR per family. Base: feature-train. Size L. Needs 4.feat(tasks): record each run's origin and time to first output. Base: feature-train. Size S.feat(tasks): trigger-started standard-agent runs go native for the resolved person, with spend in the automation bucket and refusals unchanged. Base: feature-train. Size M. Needs 6.feat(tasks): person-created agents route native when their equipment allows. Base: feature-train. Size M. Needs 5 and 7.feat(chat): hand work over to a task from the thread with one confirmation, plus a status card. Base: feature-train. Size L. Needs 6.Cross-issue amendments (decisions taken together with #4878, #4876, #4877, #5365, #4875):