You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add opt-in Full Access policy for automations and bot launches - #47534
Allow an owner to opt all automations and selected bots on a host into Full Access without changing unrelated manual-chat defaults.
What Changed
Add a default-off automationFullAccess host policy and a settings-write RPC with a durable compare-and-set update. Apply the policy before creating automation chats or terminals, including bot launches. Update reused chat permissions before delivery, including recovered group messages. Start a fresh terminal when the policy is enabled so an existing restricted process cannot be reused.
Add an independently selected fullAccessBotIds list for ordinary bot conversations and local descendant workers. Reuse the durable dispatch-creator walk to propagate the choice to workers and their handoffs. Reused structured workers receive the permission before delivery; closed-worker follow-ups start fresh with prior-work context. Existing PTY reuse refuses. Selected-bot remote worker starts refuse before forwarding because the federation protocol does not yet carry this policy. That limitation is explicit rather than claiming remote parity.
The policy covers existing and future automations without rewriting their schedules, prompts, enabled states, business authorization or agent arguments. Unsupported agents refuse the launch. Add a policy activation script, read-only Codex transcript audit, inert probe-plan generator and deployment/rollback instructions in config/scripts/automations/README.md.
Why
Automation bot launches previously inherited the bot's manual-chat permission choice. A final saved Full Access label also cannot prove that the original provider thread started with those permissions. Apply the choice before creation and require provider transcript evidence for deployment verification.
N/A — no rendered UI or interaction controls change; this adds a host policy and launch behavior.
Testing
Manually exercised read-only policy inspection against an older installed host (unsupported, no writes), positive and negative transcript audits, and the inert probe generator on Windows.
Added real policy projection and persistent session-store regression coverage.
Tests assert automation/manual isolation and saved permission survival after reopening the store; the persistence expectation fails without the change.
Targeted persistence test passes. ORCA_BACKGROUND_LAUNCH=1 timeout 900 pnpm check:changed --base=HEAD passed all 31 checks in 383.7 seconds on Windows before commit 50d4e3a984d.
Windows release JavaScript/assets and NSIS packaging passed at 50d4e3a984d, producing local unsigned version 1.4.267-automation.1. Read-only ASAR inspection confirms both policy keys and the update RPC are packaged. Installer SHA-256: f07f5abca021ce027dbd5759d3404752d41c47bb97cbe4928425d6da579b3887. No installer has been executed.
No production automation has been run and no installed application has been restarted. Actual fresh-provider-thread verification remains a post-deployment step.
Performance
The policy adds a settings read per automation launch and a session permission write when a reused chat needs changing. It adds no polling or startup scan. Full Access opts reused terminal automations into fresh processes, trading process startup cost for an effective launch permission guarantee.
Risk
Level: High when explicitly enabled; default-off for existing installations.
Full Access selects the provider's unrestricted mode for the opted-in work. Provider-managed constraints and project deny rules remain authoritative; Claude's bypass mode does not remove deny rules. Shared-chat changes persist and therefore also affect later manual turns in those particular chats. They do not change global manual-chat defaults. Disabling automation elevation and clearing the bot list stops future elevations but does not restore individual chat choices; capture them before activation and restore only unchanged choices through supported APIs during rollback. Downgrading the binary alone is insufficient. Remote automation owners need the corrected build and their own opt-in; forwarding selected-bot workers remotely is currently refused. No schema migration or direct database modification is used.
AI Disclosure
Prepared and self-reviewed with OpenAI Codex. Human deployment coordination is still required.
Review
Reviewed launch choice precedence, opt-in/manual isolation, shared-chat persistence, recovered delivery, unsupported providers, durable update concurrency, terminal reuse, and older-host refusal. Codex's existing turn admission applies the stored choice on the next turn; a record label is not used as runtime verification evidence.
Agent skill upstream boundary
Not applicable: no upstream skill-installer material copied.
Checklist
Focused on automation permissions.
Explained behavior and mechanism.
Stated persistent-data and permission risks and rollback limits.
N/A visual proof with reason.
Self-reviewed correctness, security and performance.
Cross-platform and remote-host behavior considered; only Windows executed locally.
Changed-file gate and local Windows package build pass.
Upstream CI is not green: the five fork-PR workflows returned action_required before creating jobs. The contributor has READ access to upstream; workflow approval is outside that permission. No review approval is claimed.
Before claiming complete descendant coverage, follow-up work must transport a typed, capability-gated policy through both federation protocols, persist authenticated policy provenance on receiving dispatches, and record durable parent/child provenance for handoff chains outside worker lineage. Old receivers must keep refusing rather than dropping the policy. Contract round-trips, restart persistence and unrelated-chat isolation need coverage before rebuilding and attempting provider-thread verification.
The change adds host-level automation full-access settings and an optional bot allowlist, with an RPC and CLI for policy updates. Automation and bot-chat flows apply full-access permissions to launches and sessions. Worker placement propagates the policy to new or reused sessions, while selected remote starts reject unpropagated bot access. New scripts and documentation cover probe preparation, transcript audits, deployment, and rollback.
Merge Risk: Moderate · up to 50d4e · assessed changes only
Path filters excluded changed files. This rating applies only to the assessed changes.
The opt-in Full Access policy does not take effect in several paths, including structured workers, terminal automations whose args set a permission, and agent.launchReplay launches. The documented rollback can also leave selected bots elevated. The feature is off by default, but these gaps should be fixed before merge.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "Add opt-in Full Access policy for automations and bot launches" matches the main change. The changeset adds a default-off automationFullAccess host policy and a fullAccessBotIds selection, …
Linked Issues check
[#11043] The issue asks that an automation can run in yolo mode, without that mode becoming the default for the agent or project. The PR meets this request through the coding changes in the reviewed s…
Out of Scope Changes check
The changes support the Full Access opt-in and its verification. They are not unrelated to #11043: - Policy, settings, RPC, and launch changes implement the requested behavior. - The shared `botOnAgen…
Description check
The PR description is thorough and covers nearly every template section. The ELI5, What Changed, Why, Linked Issue (Fixes #11043), Visual Proof (N/A with reason), Testing, Performance, Risk (Level: Hi…
Full details: Title check
Explanation
The title "Add opt-in Full Access policy for automations and bot launches" matches the main change. The changeset adds a default-off automationFullAccess host policy and a fullAccessBotIds selection, and applies them to automation and bot launches. The title is specific and concise, and it does not cover the audit scripts, the rollback docs, or the worker changes.
Full details: Linked Issues check
Explanation
[#11043] The issue asks that an automation can run in yolo mode, without that mode becoming the default for the agent or project. The PR meets this request through the coding changes in the reviewed summary:
automationFullAccess defaults to off. RuntimeClientSettingsController.get() resolves it as true only when the stored value is exactly true.
automationChatPermissionMode in src/shared/automations/launch/automation-permission-policy.ts selects full access only for automation runs when the host policy is on, or when the bot ID is in fullAccessBotIds. Manual chats keep their fallback mode.
launchAutomationChatAgent, launchAutomationTerminalAgent, reuseAutomationChat, bot-group-delivery.ts, and the worker placement path apply the choice before chat or terminal creation or delivery. Reused terminals start fresh when full access is enabled.
The automation.setPermissionPolicy RPC performs a compare-and-set update of the policy, and it rereads the stored value.
Automated tests cover the projection and the persistence of the saved permission. The summary records a Windows run of pnpm check:changed.
The PR does not add a general ability to set arbitrary agent parameters. The PR text states this scope limit. The issue body asks only for yolo-mode automation without a default change, so the narrower scope satisfies the directly linked requirement. The remote-worker refusal is an explicit limitation, not a coding requirement of the issue. The ignored generated RPC catalog file was not inspected. This does not change the verdict, because the issue does not depend on it.
Full details: Out of Scope Changes check
Explanation
The changes support the Full Access opt-in and its verification. They are not unrelated to #11043:
Policy, settings, RPC, and launch changes implement the requested behavior.
The shared botOnAgent move and the export of startedForBot support reuse of the bot-agent setup and worker-keep-open logic. They do not add new behavior.
The PowerShell audit scripts, the inert probe-plan generator, and the policy activation script in config/scripts/automations/ verify and deploy the policy. The PR description states that verification of a fresh provider thread is required before the policy is trusted. These scripts do not run production actions. The probe generator marks executes as false.
The README documents deployment, rollback, and the limits of saved state.
The tooling is larger than the code change strictly requires. It remains connected to the same policy and is explicitly described in the PR. No change was found that is unrelated to automation or bot Full Access permissions.
Full details: Description check
Explanation
The PR description is thorough and covers nearly every template section. The ELI5, What Changed, Why, Linked Issue (Fixes #11043), Visual Proof (N/A with reason), Testing, Performance, Risk (Level: High, with rollback limits), AI Disclosure, Review, upstream boundary and Checklist are all filled in with specific content. The description is detailed about behavior, scope, and the limits of rollback. Its gaps are minor: the Testing checklist items are checked, but the Testing section's manual steps are listed as results rather than reproducible steps for a reviewer. The Testing section also reports that the final Windows rebuild is pending, which is a status note rather than a missing section. The Notes section of the template is absent, and the description adds an unusual claim that upstream CI is not green, which is informational rather than a blocker. Overall the description is mostly complete.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Check session identity before filtering out frames without a mode.
An init frame for session A with bypassPermissions, followed by a status frame for session B without permissionMode, passes this audit. Line 8 discards B before the mixed-session check. Status frames can omit permissionMode. (code.claude.com)
Validate session_id on all captured init and status frames. Apply the mode check only when a mode is present. This preserves valid A-only status frames and enforces the README's mixed-session rejection.
The reason will be displayed to describe this comment to others. Learn more.
Major · Security & Privacy · Quick win
Clear the selected-bot policy during rollback.
If activation set fullAccessBotIds, disable without the third argument preserves that list. Selected bots therefore remain eligible for Full Access even after automationFullAccess becomes false. Restoring their chat permissions does not stop a later qualifying delivery from elevating them again. (raw.githubusercontent.com)
Document disable <new-backup-path> none when undoing the bot selection. Verify both settings before restoring chat choices or downgrading. If some bot selections predate activation, state how to restore that recorded list instead.
The reason will be displayed to describe this comment to others. Learn more.
Major · Functional Correctness · Heavy lift
Make a failed live permission update fail automation delivery.
prepareAutomationFullAccess resolves once setOption writes the stored permission. Refusals throw, but the live update does not. applyStructuredAgentSessionPermissionPick is not awaited. It returns silently when the child is not ready, the fence differs, or the adapter lacks applyPermissionMode. Its rejection is only logged. A running provider can therefore receive the automation turn while still restricted, and the caller receives no error.
For automation runs, delivery must not proceed until the running provider has accepted Full Access, or it must fail before the turn is sent. That failure must reach the caller. The change must keep manual permission picks unchanged, and the required behavior for a child that is not running must stay as the stored-mode launch path defines it.
The reason will be displayed to describe this comment to others. Learn more.
Major · Data Integrity & Integration · Heavy lift
Keep policy-derived Full Access options out of the launch fingerprint.
botHandoffPermissionPolicy adds permissionMode: 'full-access' to sessionOptions and chatOptions before computeAgentLaunchFingerprint runs. The policy depends on the mutable bot selection. An unchanged retry of an admitted bot launch therefore gets a different digest once its bot is selected, or once it arrives through agent.launchReplay, which does not apply the policy. The launch is refused with agent_session_operation_conflict instead of replaying its recorded answer.
The fingerprint contract excludes mutable host settings so that an honest retry does not conflict. The policy-derived permission options violate that contract. Compute the fingerprint from the caller's request before the policy applies, and use the same basis on the agent.launch and agent.launchReplay paths.
Major · Functional Correctness · Heavy lift
Apply the bot Full Access policy to fresh agent.launchReplay admissions.
The agent.launchReplay handler calls runReplaySafeAgentLaunch without botHandoffPermissionPolicy. agent.launch applies that policy in launchAgentOnHost. A selected bot's CLI launch with an operationId therefore runs without the Full Access session and chat options. It also accepts reuseTerminal, which the policy otherwise refuses.
Enforce the policy on fresh admissions in this endpoint, so both RPC entry points apply it. Replays of already-admitted operations must still return the stored result. The policy must not change the fingerprint of a replayed operation or refuse such a replay.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Deleted bots stay in the Full Access list and block policy changes.
Deleting a bot does not remove its ID from fullAccessBotIds. The automation.setPermissionPolicy handler then rejects every request that includes that ID, even when enabled is false. The repository's set-automation-access.ts script sends the stored list by default, so disable fails with "Full Access policy names an unknown bot." The rollback path that the PR describes, clearing the policy, is blocked until the operator passes a bot list that excludes the deleted ID.
The required behavior is that a deleted bot cannot block a policy change. Choose the fix: remove the ID when the bot is deleted, or ignore unknown IDs when the policy is cleared. Either way, the policy must still reject unknown IDs in an enable request.
The reason will be displayed to describe this comment to others. Learn more.
Major · Functional Correctness · Quick win
Structured workers drop the Full Access selection before creation.
narrowStructuredLaunchSeedOptions copies only model, effort, fastMode, and serviceTier. The permissionMode: 'full-access' value added for fullAccess is discarded there. fullAccess is not forwarded to createStructuredWorkerSession. A selected structured worker therefore starts without Full Access, whether its launch preferences are empty or hold a saved restricted mode.
When fullAccess is true, the created structured worker must hold Full Access before its first delivery. The fix must carry that permission through to session creation without changing how the narrowing function treats other saved values.
The reason will be displayed to describe this comment to others. Learn more.
Major · Functional Correctness · Heavy lift
A Full Access terminal automation can launch without Full Access when its args set a permission.
For a terminal automation, automationWithFullAccess sets launchPreferences.permissionMode to full-access. It leaves launchSetup.agentArgs unchanged. When those args already set a permission, the launch builder adds no Full Access flag. Examples are Codex -a on-request -s read-only and Claude --permission-mode default. The final command keeps the restrictive flags. The automation runs in the restricted mode, and no error is reported.
Unattended runs with restricted modes can stall on approval prompts or fail on writes. The automation then does not run as the enabled Full Access setting requires.
The agentArgs value must stay unchanged, as the PR states. The launch must either start in Full Access or refuse to launch when the args conflict with it. Choose the mechanism. Refusal matches how unsupported agents already refuse launch.
This branch has not been deployed
No deployments
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
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.
ELI5
Allow an owner to opt all automations and selected bots on a host into Full Access without changing unrelated manual-chat defaults.
What Changed
Add a default-off
automationFullAccesshost policy and a settings-write RPC with a durable compare-and-set update. Apply the policy before creating automation chats or terminals, including bot launches. Update reused chat permissions before delivery, including recovered group messages. Start a fresh terminal when the policy is enabled so an existing restricted process cannot be reused.Add an independently selected
fullAccessBotIdslist for ordinary bot conversations and local descendant workers. Reuse the durable dispatch-creator walk to propagate the choice to workers and their handoffs. Reused structured workers receive the permission before delivery; closed-worker follow-ups start fresh with prior-work context. Existing PTY reuse refuses. Selected-bot remote worker starts refuse before forwarding because the federation protocol does not yet carry this policy. That limitation is explicit rather than claiming remote parity.The policy covers existing and future automations without rewriting their schedules, prompts, enabled states, business authorization or agent arguments. Unsupported agents refuse the launch. Add a policy activation script, read-only Codex transcript audit, inert probe-plan generator and deployment/rollback instructions in
config/scripts/automations/README.md.Why
Automation bot launches previously inherited the bot's manual-chat permission choice. A final saved Full Access label also cannot prove that the original provider thread started with those permissions. Apply the choice before creation and require provider transcript evidence for deployment verification.
Linked Issue
Fixes #11043
Visual Proof
N/A — no rendered UI or interaction controls change; this adds a host policy and launch behavior.
Testing
ORCA_BACKGROUND_LAUNCH=1 timeout 900 pnpm check:changed --base=HEADpassed all 31 checks in 383.7 seconds on Windows before commit50d4e3a984d.50d4e3a984d, producing local unsigned version1.4.267-automation.1. Read-only ASAR inspection confirms both policy keys and the update RPC are packaged. Installer SHA-256:f07f5abca021ce027dbd5759d3404752d41c47bb97cbe4928425d6da579b3887. No installer has been executed.Performance
The policy adds a settings read per automation launch and a session permission write when a reused chat needs changing. It adds no polling or startup scan. Full Access opts reused terminal automations into fresh processes, trading process startup cost for an effective launch permission guarantee.
Risk
Level: High when explicitly enabled; default-off for existing installations.
Full Access selects the provider's unrestricted mode for the opted-in work. Provider-managed constraints and project deny rules remain authoritative; Claude's bypass mode does not remove deny rules. Shared-chat changes persist and therefore also affect later manual turns in those particular chats. They do not change global manual-chat defaults. Disabling automation elevation and clearing the bot list stops future elevations but does not restore individual chat choices; capture them before activation and restore only unchanged choices through supported APIs during rollback. Downgrading the binary alone is insufficient. Remote automation owners need the corrected build and their own opt-in; forwarding selected-bot workers remotely is currently refused. No schema migration or direct database modification is used.
AI Disclosure
Prepared and self-reviewed with OpenAI Codex. Human deployment coordination is still required.
Review
Reviewed launch choice precedence, opt-in/manual isolation, shared-chat persistence, recovered delivery, unsupported providers, durable update concurrency, terminal reuse, and older-host refusal. Codex's existing turn admission applies the stored choice on the next turn; a record label is not used as runtime verification evidence.
Agent skill upstream boundary
Checklist
Upstream CI is not green: the five fork-PR workflows returned
action_requiredbefore creating jobs. The contributor has READ access to upstream; workflow approval is outside that permission. No review approval is claimed.Before claiming complete descendant coverage, follow-up work must transport a typed, capability-gated policy through both federation protocols, persist authenticated policy provenance on receiving dispatches, and record durable parent/child provenance for handoff chains outside worker lineage. Old receivers must keep refusing rather than dropping the policy. Contract round-trips, restart persistence and unrelated-chat isolation need coverage before rebuilding and attempting provider-thread verification.