Repository navigation
Open
Labels
agent-readyMaintainer-approved for the Tale agent fleetimprovementImprovementservice: platformPlatform service
Description
Summary
A task run starts on the shared engine only when every one of the conditions below holds. Everything else starts a full workspace and its coding-agent harness, as before. This issue lists the conditions, the reason each has in the code, and what a wider rule would have to answer. It asks which conditions should change and proposes nothing.
Part of #4879.
The conditions today
In kickAgentRun (backend/domains/tasks/agent-runs.ts:418), a run is native only when serving.engine === 'native', args.handoff === undefined, args.startedVia === undefined and startedByPerson(args.startedBy).
| Condition | What it excludes | Where | Reason in the code |
|---|---|---|---|
| the agent is the managed standard agent | every agent a person created in a project, whatever it is equipped with | standardAgentServingForKick, backend/domains/projects/standard-agent.ts: if (agent === undefined | !agent.managed) return passthrough (engine: 'harness', :538) |
not stated. The engine offers retrieval and work tools only: no connector bridge, no platform tool grants, no secrets, which a configured agent may rely on |
| no runtime is pinned | an admin who pinned a runtime for the standard agent | standard-agent.ts:89 |
"An Admin who pins a runtime chose it for every run, so it is never native" |
| the chosen model is served directly | a model only a runtime can run (a provider subscription's) | standard-agent.ts:89 |
"has no direct path, so it is never native either" |
started by a person: user:, api-key: or a bare user id |
schedules, webhooks and event firings (trigger:<id>), and anything unparseable |
startedByPerson, agent-runs.ts:364; lib/shared/run-starter.ts |
"the native engine acts for a person, as a chat does" (agent-runs.ts:412-417) |
not started by an automation or another agent (startedVia) |
an automation step's start and a delegated start | agent-runs.ts:421 |
same comment |
not a retry after a hand-over (handoff) |
the retry of a run that already moved to the harness | agent-runs.ts:420 |
a native start would repeat the work already done |
What a 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 (NATIVE_RUNS_PER_ORG,backend/jobs/tasks.ts:842). It holds none of the harness fleet's worker slots. - Tools: the three retrieval tools, the five work tools and
use_workspace. No task tools, no connectors, no secrets (see Epic: one agent engine for chat and tasks — what is still separate #4879). - It acts for a person: model access, budget hold, usage ledger, files and sandbox ownership are the starter's.
- Cost, from a local rig on 2026-10-11 (released 0.5.86 images): creating a
default-profile session takes about 0.3 s, and an agent-profile session without Docker-in-Docker about 0.3 s and 18 MiB idle. Container creation is not what a harness run costs. What it adds is the coding agent's CLI start, a system prompt on every round, a gateway key, MCP and staging, and a worker slot; those were not measured.
What is not known
- The share of runs by origin in real deployments, and how many of the excluded runs would have fit the engine.
- Time to first output, native versus harness.
What a wider rule would have to answer
- Whose authority acts for a run that nobody started? A trigger-started run already answers to the agent's creator for model access (
standardAgentServingForKick: "a trigger's (trigger:<id>), which answers to the agent's creator"). Budget, file ownership and sandbox ownership have no such rule yet. - Where does the transcript go, and who sees it? Native transcripts are bare
task_runthreads owned by the starter. - Which tools do configured agents need? Connectors, platform tool grants and secrets come through the harness 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 them.
- Limits. The 1-hour expiry and the 4-per-organization cap were sized for person-started runs.
- Visibility. How a schedule-started run appears in the run card, notifications and retention.
Options (not exhaustive, no preference stated)
- Keep the rule: the standard agent, started by a person.
- Add trigger-started runs of the standard agent, acting for the agent's creator, as model access already does.
- Let a person-created agent opt in when its configuration needs nothing the engine lacks (no connectors, grants or secrets).
- Extend the engine's tools first (Improvement: knowledge search and image generation exist twice, once for chat and shared-engine task runs and once for the harness bridge #4875), then widen routing to the agents that need them.
- Let an automation step choose the engine per step.
Questions
- Which excluded classes matter in practice: schedules, member-created agents, automations?
- Is "acts for a person" the right invariant, or may an organization-level principal act?
- Should an admin control routing (a policy), or should it stay derived from the agent's configuration?
Related
#4844 (introduced the routing), #4878 (what an admin can switch for runs on the engine), #4877.
Observed at main a83e645e27.
Metadata
Metadata
Assignees
Labels
agent-readyMaintainer-approved for the Tale agent fleetimprovementImprovementservice: platformPlatform service
Activity
yannickmonney commentedon Nov 14, 2026
Decision
Rule. A task run is routed by the authority it acts under, decided by the resolver the harness already uses,
run-authority.ts. A run starts on the shared engine when all of these hold:user:,api-key:, bare id), an enabled schedule bound to the project (trigger:<id>), or the project's switched-on dispatch (dispatch:<projectId>).An automation step's start is routed by the starter it carries. Webhook and event firings stay on the harness.
Unattended native runs (schedule, dispatch):
task_runthread in nobody's chat list, read through the run card by project readers.Person-created agents: work this way only by an explicit per-agent opt-in, off by default, and only without connectors, grants or secrets and with a directly served model. No admin routing policy is added. What native runs may do is decided in #4878.
Answers:
Rationale. The rule widens only where the code already enforces who acts for a run, and reuses the harness's authority and read scope instead of a second copy. Model access stays where it is today, so nobody's model entitlement moves. Agent-to-agent starts stay on the harness because their prompts require task tools the engine does not have. Before-launch loss of authority follows TASK-R47 per kind. The opt-in keeps shell-written agents from silently switching engine.
Implementation units (all on
feature-train):Cross-issue amendments (decisions taken together with #4879):