feat(agent): add exact approvals and run modes - #5819
Draft
RaresKeY wants to merge 9 commits into
Draft
Conversation
This was referenced Jul 28, 2026
RaresKeY
marked this pull request as ready for review
July 28, 2026 16:41
RaresKeY
marked this pull request as draft
July 28, 2026 16:56
This was referenced Jul 29, 2026
This was referenced Aug 8, 2026
This was referenced Aug 11, 2026
Closed
RaresKeY
force-pushed
the
feature/agent-run-security-modes
branch
3 times, most recently
from
August 17, 2026 00:21
ed5bcad to
f8eff96
Compare
|
Changed-file classification: UI-sensitive. Author-reported runtime / visual state
Checkboxes are author attestations. GitHub Actions results remain the execution evidence for CI; this check does not prove that a local command ran. This comment updates automatically when the description or changed files change. |
This was referenced Aug 17, 2026
RaresKeY
force-pushed
the
feature/agent-run-security-modes
branch
from
August 17, 2026 16:30
f8eff96 to
a8da2a8
Compare
This was referenced Aug 17, 2026
RaresKeY
force-pushed
the
feature/agent-run-security-modes
branch
4 times, most recently
from
August 19, 2026 02:10
648f7f5 to
8f2be84
Compare
27 tasks
This was referenced Aug 19, 2026
RaresKeY
force-pushed
the
feature/agent-run-security-modes
branch
from
August 19, 2026 10:40
07f50db to
d15dcb2
Compare
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
Add thread-level Ask, Sandbox, and Full Access authority modes plus opaque exact-action approvals. The server binds each approval to the owner, session, originating run, exact tool name and input, workspace, selected mode, capability effects, and current provenance, then consumes it once so a model cannot widen, replay, or transfer the grant.
Sandbox is the safe default. Ask requires confirmation for each risky action, while Full Access is an explicit admin/single-user choice that permits direct host execution with the user's ordinary OS permissions. Mode state persists with the session and is enforced again at dispatch rather than relying on prompt compliance or frontend state.
Stack
This is the authority-mode slice in #5815 directly on the #6120 process-core foundation. The low-level #6119 and #6118 substrates are transitive through #6120; #6121 is deployment/runtime integration rather than a direct authority-code dependency. The #6084 gate change is a related sibling whose behavior was reconciled into this branch, not a required parent. #5821 remains the direct later provenance slice.
Target branch
dev, notmain. All PRs land indev;mainis curated by the maintainer at each release.Linked Issue
Part of #6092
Part of #5815
Part of #4754
Depends on PR #6120
Related: #6084
Related: #3709 and #553
Type of Change
Checklist
dev.How to Test
Run:
Current secretless validation on the rebased public head passes 176 focused tests; the listed JavaScript syntax checks remain applicable.
Create a thread in Sandbox mode and verify Bash/Python use the workspace sandbox while public reads and ordinary interaction tools remain available.
Switch to Ask mode, request a risky tool, approve the exact action, and verify the grant is consumed once. Change the command, tool, workspace, session, mode, owner, or originating run and verify the approval is rejected.
As an admin/single-user, explicitly select Full Access, accept the warning, and verify host process execution uses normal OS permissions. Verify non-admin users cannot retain or request Full Access.
Reload and switch sessions. Verify each thread restores its persisted mode and pending approvals do not cross session or run boundaries.
Current restacked-head validation passes 176 focused tests, Python compilation, and
git diff --check.Not yet validated: live Docker/native execution, running-app approval interaction, session reload/resume, desktop/mobile layout, or multi-worker one-use consumption.
The authority-control placement and running-app evidence remain unresolved, so this PR is opening as a draft.
Visual / UI changes — REQUIRED if you touched anything that renders
This changes agent-mode controls and approval rendering. Running-app visual evidence is required before marking the PR ready for review.
Screenshots / clips
Pending running-app desktop/mobile capture after the authority-control placement is finalized.