[Feat] Let tasks ask the Session owner before running an Ask first tool - #3076
Merged
Merged
Conversation
Contributor
8 tasks
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.
Part of the experimental per-tool approvals (
integrationToolApprovals). Until now an Ask first tool was simply unavailable to a task. With this change a task's agent pauses on the call, the owner of the task's Session gets the same approval card a Session shows, and the call runs once they allow it.How it works
mcpConnections.getTaskToolApprovals, run token only). They are compiled on the server from the deployment policies, the acting member's personal policies, and the Session's overrides, and written into the task's OpenCodepermissionconfig on top of the allow-all defaults.permission.asked(from the main session or a subagent's), reads the paused call's arguments, and records the ask throughtoolApprovals.request. It pollstoolApprovals.statusand answers the native ask withonceorreject. A pending ask defers the stall watchdog, like a pending question.task_idcolumn), is decided by the Session owner through the existing route, and honors "Allow for this session". The task page shows the Session's card narrowed to that task's asks. A task with no human Session owner (for example one an automation started) cannot be approved, and the ask is rejected with that reason.Notes
0112is additive (one nullable column and an index).Testing
consumed. A full sandboxed task run was not exercised locally.