Repository navigation
fix(agent): authorize structured subagent results - #1317
Merged
Merged
Conversation
Co-Authored-By: mecatl <[email protected]>
Co-Authored-By: mecatl <[email protected]>
jbeda
added a commit
that referenced
this pull request
Sep 11, 2026
* commit 'cc6b16afbf7feec3e16451fdc590a3265fbf0c0b': docs: amend Shell diagnostic ownership (#1330) fix(mecatui): refresh status context on session continuation (#1328) fix(jsonlstore): preserve session saves with legacy lineage (#1327) test(sessiondebug): eliminate handle tampering flake (#1323) fix(agent): authorize structured subagent results (#1317) feat(mcp): support attachment-backed broker queries for CallMcpWithQuery (#1309) docs(agents): document full-gate timeout guidance (#1316) fix(server): let the stale-session sweep re-acquire a lost lease (#1302) feat(clientauth): headless Linux credential storage (#1291) chore(mcpbroker): trace protected call latency (#1314) # Conflicts: # docs/acceptance/canonical-shell-command-tool.md
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.
Problem
A subagent can be asked to return data in a specific JSON shape with
output_schema. For that kind of task, mecatl gives the subagent a temporarySubmitResulttool. The subagent calls that tool to hand back its final validated result.When the parent session uses delegated authority, the child inherits a limited list of allowed tools.
SubmitResultis intentionally not on that list: it is not a capability that grants access to files, commands, network services, or MCP tools. It is only an in-process result handoff for this one subagent run.The bug was that the authority check treated
SubmitResultlike an ordinary delegated tool. As a result, the child was told to call it, but the call was denied because the tool name was absent from its allowed-tool list. The child could therefore never complete the requested structured result.Fix
Register the temporary tool with private runtime metadata saying that it does not need delegated authority. All run-scoped tools remain authority-restricted by default; only the structured-output result handoff opts out. Normal catalog tools and external capabilities remain subject to delegated-authority checks.
Verification
task lintcd engine && go test ./agent/task test(fails in existing unrelatedinternal/apptests:TestReconcileStaleFireAfterSessionSettlesandTestSessionDebuggerCrossBoundaryAcceptance)