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
session: convert legacy sandbox updates before settings apply - #20426
converts legacy SandboxPolicy turn overrides into PermissionProfile before building SessionSettingsUpdate
removes sandbox_policy from SessionSettingsUpdate, keeping the session update/apply path profile-based
preserves legacy behavior by clearing the active named profile when a legacy sandbox override was the source of the profile
Review Notes
Protocol Op payloads and app-server request handling still accept legacy sandboxPolicy; this PR only moves the conversion boundary earlier.
The conversion uses the same cwd normalization as session updates and preserves existing deny-read restrictions when rebuilding the runtime filesystem policy.
Verification
cd codex-rs && just fmt
cd codex-rs && cargo test -p codex-core session_configuration_apply_permission_profile_preserves_existing_deny_read_entries
cd codex-rs && cargo test -p codex-core override_turn_context
// Current app-server responses include `permissionProfile`. If it is absent,
// keep the TUI on its configured profile rather than rebuilding a lossy
// profile from the legacy `sandbox` compatibility field.
config.permissions.permission_profile()
Fall back to response sandbox when permissionProfile missing
When permissionProfile is omitted in thread/start|resume|fork responses (which is still accepted for backward compatibility), this code now uses the local config profile instead of the server-provided legacy sandbox field. In remote mode that can desynchronize the TUI from the thread’s actual permissions, so subsequent turns may send the wrong sandbox overrides and surface incorrect permission state. Please preserve the previous remote fallback behavior by deriving permissions from the response sandbox when permissionProfile is absent.
Closing this pull request because it has had no updates for more than 14 days. If you plan to continue working on it, feel free to reopen or open a new PR.
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.
Summary
SandboxPolicyturn overrides intoPermissionProfilebefore buildingSessionSettingsUpdatesandbox_policyfromSessionSettingsUpdate, keeping the session update/apply path profile-basedReview Notes
Oppayloads and app-server request handling still accept legacysandboxPolicy; this PR only moves the conversion boundary earlier.Verification
cd codex-rs && just fmtcd codex-rs && cargo test -p codex-core session_configuration_apply_permission_profile_preserves_existing_deny_read_entriescd codex-rs && cargo test -p codex-core override_turn_contextcd codex-rs && just fix -p codex-coreStack created with Sapling. Best reviewed with ReviewStack.