Restore saved thread permissions during configuration loading (#53419)

## Why

Restoring unnamed thread permissions after configuration loading leaves network proxy initialization and permission validation using the configured default. A saved read-only thread should also resume when that default is incompatible with current managed requirements.

## What changed

Apply eligible saved permission profiles during configuration loading, before network preparation and final validation. Keep explicit permission overrides and managed requirements authoritative, preserve managed deny-read restrictions, and reject saved external enforcement or materialized filesystem grants. Include the saved profile in the app-server's prepared resume configuration state.

## Testing

Add regression coverage for resuming saved read-only permissions with an incompatible full-access default and for retaining managed, remembered, and newly approved network domains in the restored profile's proxy allowlist.

GitOrigin-RevId: 73e32b0a31ac678fd3f60a8ccf8fa9df627f16c3
This commit is contained in:
jif
2026-10-12 16:09:41 +00:00
committed by copyberry
parent 16845bb8e8
commit bf4ca52b61
10 changed files with 147 additions and 52 deletions
-1
View File
@@ -124,7 +124,6 @@ pub(crate) async fn run_codex_thread_interactive(
history_initialization,
disabled_plugin_ids: (isolation == codex_extension_api::SessionIsolation::Inherit)
.then(|| parent_ctx.disabled_plugin_ids.clone()),
persisted_permission_profile: None,
requested_history_mode: None,
fork_persistence: ForkPersistence::Copied,
session_source,