Repository navigation
feat(identitybroker): give def-less helpers the session's gateway tools - #2914
Merged
rdimitrov merged 14 commits intoNov 20, 2026
Merged
Conversation
5 of 13 tasks
rdimitrov
force-pushed
the
feat/helper-broker-tools
branch
2 times, most recently
from
November 20, 2026 11:43
8a433de to
5f6a7e2
Compare
rdimitrov
force-pushed
the
feat/helper-registration
branch
from
November 20, 2026 11:43
21a3ad6 to
4bfb270
Compare
rdimitrov
force-pushed
the
feat/helper-broker-tools
branch
from
November 20, 2026 12:09
5f6a7e2 to
6d6c93d
Compare
Add port.ChildSessionCreator, an optional SessionStore capability. When the engine first publishes a subagent, parallel-branch, or team-member session, it calls CreateChild instead of Create, passing the definition the child runs. An error stops the child before its first turn, like a failed Create. Stores without the capability behave as before. mecak8s uses this to register each helper agent with the identity broker before it runs (#2555). Co-Authored-By: Claude Opus 5.5 <[email protected]>
A member's factory falls back to a generic member when the roster's agent type is unknown, so the agent type is not always what runs. MemberBuild.DefinitionName reports the definition the factory adopted, and the supervisor passes it to CreateChild instead of the agent type. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A resumed subagent was never published again, so a host could not admit it: a child whose admission was refused, or whose admission was lost, could be resumed and run. port.ChildSessionResumer gives the host ResumeChild before a resumed subagent runs again; an error stops the resume. The child-store decorator rule is narrowed to what the engine uses on child stores, and the background refusal test now waits for the child to end before checking that its model was not called. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Subagents, parallel branches, and team members now get their own agent identity when the engine first publishes their session, before they run. Each registers in its root session's broker session with the agent that created it as parent, and a refused registration stops the helper. - D5: a child reports its parent's host session, and the broker refuses one that is not the parent's recorded host session. - Built-ins system/branch and system/member join system/explorer for helpers that run no named definition. - The credential holder moves a helper into its root's new broker session, after its parent, keeping its identity. - A helper whose root has no registered main agent, such as a member of a team with no source session, runs unregistered; its gateway calls fail closed. Part of #2555. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- A team member registers with the definition its factory built it from, so an unknown agent type falls back to a generic member as before instead of being refused. - An API team keeps the class of a member's registration failure, so an unavailable broker stays retryable rather than an invalid argument. - A failed lookup of a helper's parent maps like a registration failure instead of always as retryable. - A helper lookup made after its root moved no longer joins an in-place renewal started before the move. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…reopens When a root's main agent registers into a reopened broker session at run entry, the tree's held helpers now register there too, parents first, keeping their identities, as the design's session end requires. Before, a helper moved only at its next gateway call. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- A resumed subagent is admitted again before it runs: a held credential is kept, and a helper with none registers as a new one does, so a helper whose registration failed or was lost is not resumed. - The child-store wrapper documents that it forwards only what the engine uses on a child store. - Parallel branches and Team-tool members are tested through the real wiring, not only subagents. - MoveHelpers visits helpers in a fixed order, so its test exercises the parent-first move every run. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- A resumed subagent runs the default explorer today, so the design no longer says it keeps its original definition; #2548 does that. - Members of a team created over the API register with the root's main agent as a stand-in creation parent; the design now says so. - system/member covers any member that runs no named definition. - The failure table, the walkthrough, and the test list cover the definition in check 7 and the parent host session (D5). - Shortcut notes for registration lineage records (#2541) and resuming a named subagent (#2548). Co-Authored-By: Claude Opus 5.5 <[email protected]>
The default and writable explorers, parallel branches, and generic team members now get the session's MCP gateway tools, so their gateway calls carry their own agent identity. They get only gateway routes, which present the acting agent's credential; any other broker route acts as the session, so a helper gets none. Each helper gets the bare route, without the protected wrapper's authorization methods: a gateway call never needs the MCP broker's authorization, and a helper's run cannot present one. A team created over the API gives its generic members the root's resident gateway tools that the root's authority allows, and adds them to the members' authority. Helpers that run a named definition get none until #2842. Closes #2555. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- A gateway tool whose name a helper catalog already holds, such as a server-global MCP tool in a no-FS catalog, is skipped with a warning instead of panicking the process. - A team created over the API gives its members no gateway tools when its root has no bound authority, rather than every resident one. Co-Authored-By: Claude Opus 5.5 <[email protected]>
- The API team tests reuse the package's identity broker fixture. - The RunTeam member factory is one closure, with and without a root's gateway tools. - withHelperToolNames uses slices.Clone and slices.Sort. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Helpers that run a named definition get no gateway tools until #2842; the code now says so where the helper tools are threaded. Co-Authored-By: Claude Opus 5.5 <[email protected]>
rdimitrov
force-pushed
the
feat/helper-registration
branch
from
November 20, 2026 13:38
f37c302 to
fbe979f
Compare
rdimitrov
force-pushed
the
feat/helper-broker-tools
branch
from
November 20, 2026 13:38
6d6c93d to
7990e8d
Compare
ChrisJBurns
reviewed
Nov 20, 2026
ChrisJBurns
left a comment
Contributor
There was a problem hiding this comment.
See the inline comments.
teamHelperTools treated a failed load of the team's root session like a team with no gateway tools, so a transient store failure started the members without them and logged nothing. It now logs the root and the error and returns it, and buildTeamForOperation fails the start so it can be retried: a missing root is not found, any other failure internal. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Base automatically changed from
feat/helper-registration
to
feat/per-agent-registration
November 20, 2026 14:30
#2912 and #2913 were squash-merged into the base. Their trees match the commits this branch was built on, so every conflict resolves to this branch's side and the merged tree is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merged
5 of 12 tasks
ChrisJBurns
approved these changes
Nov 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#2913 gives each helper agent its own registered identity. This PR gives helpers the session's MCP gateway tools, so a helper's gateway call carries that identity in
act.subinstead of being impossible. With it, #2555 is done.The three choices proposed on #2555 and approved before implementation:
CallMcpWithQueryis also left out.--agents-dirsubagent, the definition's ceiling already removes them, and a definition cannot opt in. Per-agent tool limit, checked by the broker #2842, the per-agent tool limit, is where that belongs. Team members built from a named definition get none either.Who gets them: the default and writable explorers, parallel branches (including routed ones), generic team members (from the Team tool or the API), and the no-FS variants of these.
protectedSessionTool.RequestAuthorizationreturns early). The engine refuses any authorization-capable tool in a run that cannot present an authorization, which every helper run is, so the wrapper would make the tool unusable.sessionTool.HelperGatewayToolreturns the bare route.Issue relationship
Closes #2555. Part of #2554.
Type of change
Test plan
Baseline checks
task lint)internal/adapter/mcpbroker/...,internal/adapter/server,internal/app,cmd/mecak8s); the full race suite ran on feat(identitybroker): register each helper agent under its parent #2913task docs)task site:build)Tests
cmd/mecak8s, offline, real broker, AS-1 and AS-2 stand-ins, embedded vMCP):act.subagent IDs.HelperGatewayToolskeeps only gateway routes.Real use
The local harness from #2913 has no gateway configured. The
cmd/mecak8send-to-end test above is the real mecak8s startup with a gateway, run offline.Changes
internal/adapter/mcpbroker/runtime.gosessionTool.HelperGatewayToolinternal/adapter/server/identity_broker_helpers.go,team.go,service.goHelperGatewayTools; API team members' tools and authority;MemberEngineWithHelperToolsinternal/app/catalog.go,build.go,helper_registrar.gointernal/adapter/mcpbroker/gateway_outcomes.gouser-docs/operating/mecak8s/identity-and-client-access.mdidentityBroker.enabledrow*_test.goAPI compatibility
--enable-identity-brokerand gateway servers configured, def-less helpers now see and can call the session's gateway tools under their own identity, and gateway records name helper identities. Main agents are unchanged. Additive.Special notes for reviewers
🤖 Generated with Claude Code