fix(runtime): propagate session permissions to background agents and skills#3490
Open
Piyush0049 wants to merge 1 commit into
Open
fix(runtime): propagate session permissions to background agents and skills#3490Piyush0049 wants to merge 1 commit into
Piyush0049 wants to merge 1 commit into
Conversation
…skills This removes the hardcoded ToolsApproved bypass and ensures background tasks inherit the Allow/Deny/Ask permission configuration from their parent session. When tools fall back to 'Ask' in a background non-interactive context, the dispatcher correctly auto-denies them.
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.
Overview
This PR resolves an issue where background agents and
run_skillsub-sessions were bypassing session-level permission rules by relying on a hardcodedToolsApproved: trueflag.Changes
Permissions: params.ParentSession.Permissionsto theSubSessionConfiginagent_delegation.goandskill_runner.go.ToolsApproved: truefromRunAgent. Background tasks now correctly inherit both theToolsApprovedboolean and the granularPermissionsrules from their parent session.Security Impact
This is a strict security improvement. By passing the parent permissions down, the sub-sessions correctly integrate with the dispatcher's auto-deny logic:
Allowlists) run seamlessly.Ask) hit the dispatcher'sNonInteractivecheck and are safely auto-denied, preventing background agents from hanging or bypassing user consent.