Repository navigation
fix(server): apply runtime-mode changes to live ACP sessions - #49629
Draft
karank2512 wants to merge 1 commit into
Draft
karank2512 wants to merge 1 commit into
karank2512 wants to merge 1 commit into
Conversation
Push thread.runtime-mode.set updates to live provider sessions that support in-session mode switching (such as Antigravity) via a process-bound outbox effect and optional runtime updateRuntimePolicy hook, while keeping detach/reopen for providers without live switching. Re-evaluate pending live approval requests on in-place switches (accepting command/file/permission in full-access and file approvals in auto-accept-edits, leaving auto, user_input, and fullAccessOverride prompts untouched) and report failed live switches on the session banner with next-turn restart recovery. The live switch reuses configureSession's runtime-mode ceiling and session-mode lock, records the modes it sets so they are not reported as the agent's own changes, and tracks the applied runtime mode in the adapter's configuredRuntimeMode, reset on every session reset.
Contributor
|
This PR changes the test suite by +4 test cases (browser 0, unit 0, server +4; +418 test lines). Proof of a fix is not automatically a permanent CI test—keep new tests only when they clear the keep bar in Testing. |
This branch has not been deployed
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
Changing a thread's runtime mode (e.g. plan to full-access) in Settings while its ACP session is running has no effect on that session: it keeps the mode captured at session start until restart. The UI reflects the new mode, the agent does not have it.
Fix
Thread runtime-mode updates through Orchestrator and ProviderSessionManager into live ACP sessions; ProviderTurnStartService applies the current mode on the next turn, and the ACP adapter exposes the mode update on the session.
Tests
Added ProviderSessionManager coverage for live mode updates (76 lines); existing turn-control tests updated. Verified manually on 0.1.14-nightly.20261205.5766: switching a running Antigravity thread from plan to full-access applies without restart.
Notes
No behavior change for sessions whose runtime mode is unchanged.