Repository navigation
Closed
Labels
Description
Depends on: #2527 (per-agent registration and identities)
Removes shortcut: Main agents only; helper agents have no broker MCP tools (#2451)
Adds shortcut: helpers have no nesting limit, and definitions the broker did not load are refused. #2551 removes both.
Problem
Helper agents (subagents, parallel branches and team members) are created inside the engine. They are never registered and get no broker MCP tools, so they cannot make gateway calls. The design gives each helper its own identity, registered to the root's broker session with its creating agent as parent, and lets it call gateway tools under that identity.
Implements
- agent-definitions.md: Registering instances: child registration
- agent-definitions.md: Relationships and lifetimes: which sessions belong to a tree
- credentials-and-lifecycle.md: (4) Agent-instance JWT-SVID: checks 2–4 and 7 with a parent
- credentials-and-lifecycle.md: (3) Session open and the broker refresh token: "Session end", which re-registers live instances parents first
- credentials-and-lifecycle.md: (6) Per-operation authorization: a helper's call
- credentials-and-lifecycle.md: Lifetimes and renewal: the SVID row
- implementation.md: Run owner checks: the registration bullets
Scope
- mecak8s registers each helper before its first tool call, at the point where child sessions are created.
- Engine events are notifications and carry no security.
- An unavailable broker is retryable. An unregistered helper never starts.
- If the registration hook goes in the engine, it changes the published engine API and lands first, as its own PR.
- Helper credentials are held per session tree and renewed per helper. They are dropped as a unit wherever the root's credential is dropped today.
- Helpers get the broker's MCP tools, within the harness's existing delegation restrictions. If mecak8s holds no registration for a helper, that helper makes no gateway call and never presents its parent's credential.
- Members of a team rooted in a session register as helpers, with the root's main agent as parent.
- The per-agent tool limit is Per-agent tool limit, checked by the broker #2842. Runs and delegation reports are Runs, delegations, and the run owner #2557.
- API compatibility: the PR includes the wire API compatibility statement.
Decide before starting
- D5: how does the broker check a child's host session? Check 7 refuses a reused incarnation that comes with a different host session or parent. Nothing yet refuses a new child whose host session is outside the tree. Proposed on Per-agent registration and identities, switched on #2527: mecak8s reports the parent's host session, and the broker compares it with the parent's record.
- Which definition does a parallel branch or a team member register with? The design names
system/exploreronly for the default anonymous child (Loading definitions). - How does a team created without a source session get a broker session? It could get its own, opened for the team's owner when it runs, or every team could be required to belong to a session.
Done when
- Every helper, including each member of a team rooted in a session, is registered with the correct parent before its first tool call. A failed registration stops the helper from starting.
- A helper's gateway call is checked against the helper and attributed to it. An unregistered helper's call is refused with no exchange.
- After the broker session reopens, live helpers register again, parents first, and keep their
ag_identifiers. - The D5 rule is tested.
Earlier notes: #2556 (closed, merged here).
Activity
[-]Register helper agents as they are created[/-][+]Helper agents: their own registered identity and broker MCP tools[/+]ChrisJBurns commentedon Nov 18, 2026
Design decision for this ticket: Three registration rules: (1) D5, how the broker checks that a new child's host session belongs to the tree (proposed on #2527: mecak8s reports the parent's host session and the broker compares it); (2) which definition parallel branches and team members register with (the design names
system/exploreronly for the default anonymous child); (3) how a team created without a source session gets a broker session.Where it goes: agent-definitions.md: Registering instances.
Decide it when this ticket is picked up, and record the answer as a small design edit (reviewed by the design's author) before or with the ticket's first PR.
rdimitrov commentedon Nov 20, 2026
Decisions for #2555, proposed
#2555 lists three decisions to settle before it starts. Below is a proposal for each, based on the design and on how the harness creates helpers today.
1. How the broker checks a new child's host session (D5)
Today nothing links a child's host session to its tree. Check 4 covers only a registration with no parent, and check 7 covers only an incarnation registered before. A new child can therefore name any host session (
RegisterAgentRequest.HostSessionIDsays "checking that it belongs to the session's tree will be addressed later").Proposal, as on #2527:
PERMISSION_DENIED, like checks 3 and 4.This closes the gap by induction. Each child is tied to its parent's host session, the parent is registered to the same broker session (check 4), and the chain ends at the root host session that check 4 pins. A depth cap or root check is not needed for this.
It is still a mecak8s assertion, like the rest of registration. It catches a mecak8s bug that attaches a child to the wrong parent or tree, not a compromised mecak8s.
The related question on #2527 is now moot. It asked whether to refuse a reused incarnation under another SPIFFE ID. IDs are opaque since #2834, and the broker keys agents by incarnation, so one incarnation has one
ag_identifier. Check 7 already refuses a reused incarnation with another host session or parent.Where it goes: one sentence in step (4), check 4: "With a parent, the parent is registered to
A42, and the reported parent host session is the parent's recorded host session." Plus the same in "Registering instances".The field is on the in-process broker API, not a client-facing wire change.
2. Which definition each helper registers with
No child session records a definition today. What each helper runs:
AgentDefglobal/<name>if the broker loaded it, otherwise name only (refused until #2551), as for main sessions in #2527system/explorer, as the design already sayssystem/branchagent_typeAgentDefglobal/<name>if loaded, otherwise name onlyagent_typesystem/memberWhy new built-ins rather than reusing
system/exploreror the parent's definition:system/explorerwould make audit records claim a read-only explorer did the work. Once ceilings land, the explorer's ceiling would also be the wrong bound for them.Where it goes: the
system/explorersentence in Loading definitions gains the two new built-ins.3. A team with no source session
The design says a session with no owner gets no broker session. The question is what a team with no source session gets.
Today, in production, every team has a source session. HTTP and gRPC both create teams through
CreateTeamForSession, which requires one, and the in-run Team tool runs inside a session. The only path without one,CreateTeamOnDefaultPlacement, has no production caller.Proposal: every team that makes gateway calls belongs to a session's tree. A team with no source session gets no broker session, and its members' gateway calls fail closed. No team-owned broker session.
Implementation note for #2555: members of a team created through
CreateTeamForSessionhave noParentSessionID; the root exists only in the server's team state and the run context. Their parent is the root's main agent (as #2555 says), so mecak8s reports the root host session as the parent host session for D5. Team-tool teams already record the calling session asParentSessionID.Where it goes: one sentence in Relationships and lifetimes, after "A session with no owner gets no broker session".
If these look right, I'll record them as a small design PR and link it from #2555.
feat(identitybroker): give def-less helpers the session's gateway tools
feat(identitybroker): give def-less helpers the session's gateway tools
feat(identitybroker): give def-less helpers the session's gateway tools
feat(identitybroker): give def-less helpers the session's gateway tools
rdimitrov commentedon Nov 20, 2026
Outcome of the decisions and choices
system/branchandsystem/memberfor def-less helpers, and no broker session for a team with no source session. They still need the design author's review.port.ChildSessionCreator(first publication, with the definition the child runs) andport.ChildSessionResumer(resume). A team member reports the definition its factory actually built it from (MemberBuild.DefinitionName), so an unknown agent type still falls back to a generic member.