Skip to content

Epic: one agent engine for chat and tasks — what is still separate #4879

Open
0 of 4 issues completed
Open

Description

@yannickmonney

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

Observations on how they relate (not a plan):

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

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

Sub-issues

Sub-issues

0 of 4 Issues completed
Loading 4 sub-issues

Activity

  1. added
    improvement
    service: platform
    epic
    on Oct 12, 2026
  2. yannickmonney commented on Nov 14, 2026

    @yannickmonney
    ContributorAuthor

    Decision

    This epic stays open as the tracker. It closes when #4875, #4876, #4877 and #4878 are closed.

    The rule

    Answers by child

    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

    1. fix(sandbox): correct the stale generate_image comment and pin the duplicated image ceiling with a test. Base: train. Size S.
    2. 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.
    3. refactor(agent-tools): one image-generation contract with a conformance suite through both transports. Base: feature-train. Size M. Needs 1.
    4. refactor(knowledge): the bridge's rag_search/rag_fetch run the engine executor; old arguments still accepted. Base: feature-train. Size M. Needs 3.
    5. refactor(agent-tools): bridge-only domain tools move into shared executors, one PR per family. Base: feature-train. Size L. Needs 4.
    6. feat(tasks): record each run's origin and time to first output. Base: feature-train. Size S.
    7. 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.
    8. feat(tasks): person-created agents route native when their equipment allows. Base: feature-train. Size M. Needs 5 and 7.
    9. 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):

  3. added
    agent-ready
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyepicimprovementservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions