viyatb-oai
89feadf3cc
Preserve saved sandbox permissions when resuming codex exec ( #62194 )
...
## Why
`codex exec resume` sends the current process's sandbox defaults as
overrides. A session started with `:read-only` can therefore resume with
workspace write access when the configured default is `:workspace`.
## What changed
- Restore the saved permission selection, working directory, and workspace
roots by default. Honor explicit overrides and append directories requested
with `--add-dir` to the resumed workspace roots.
- Recover built-in read-only permissions from older history without widening
current read access. Require an explicit permission selection when a saved
named profile cannot be loaded or saved read-only access cannot be restored.
- Report sandbox permissions and writable roots from the running thread.
## Testing
Add regression coverage for a denied write on the first resumed shell call,
legacy read-only history, explicit permission overrides, and workspace root
preservation with and without `--add-dir`.
GitOrigin-RevId: ed2cf3132f9ce34570661f801c9534a55696e3a5
2026-11-18 05:13:56 +00:00
..
2026-11-17 19:46:24 +00:00
2026-11-16 04:54:23 +00:00
2026-11-18 00:46:17 +00:00
2026-11-06 22:27:47 +00:00
2026-09-23 00:49:19 +00:00
2026-10-26 20:54:35 +00:00
2026-11-18 00:46:17 +00:00
2026-11-18 00:46:17 +00:00
2026-09-21 13:27:39 +00:00
2026-11-03 02:26:29 +00:00
2026-10-19 21:43:19 +00:00
2026-11-18 02:17:25 +00:00
2026-11-05 22:03:29 +00:00
2026-09-23 00:47:07 +00:00
2026-11-10 11:17:06 +00:00
2026-10-29 11:23:51 +00:00
2026-11-17 23:45:23 +00:00
2026-10-01 02:06:05 +00:00
2026-11-17 20:04:36 +00:00
2026-11-02 18:42:19 +00:00
2026-11-17 16:15:55 +00:00
2026-10-06 17:10:19 +00:00
2026-11-18 03:59:37 +00:00
2026-10-26 18:13:00 +00:00
2026-11-13 23:04:26 +00:00
2026-10-29 22:36:06 +00:00
2026-10-06 03:35:55 +00:00
2026-10-21 19:06:57 +00:00
2026-10-26 18:13:00 +00:00
2026-10-06 03:35:55 +00:00
2026-11-06 22:27:47 +00:00
2026-11-17 21:10:09 +00:00
2026-11-17 19:23:05 +00:00
2026-11-11 05:38:52 +00:00
2026-10-17 23:34:04 +00:00
2026-10-09 23:16:46 +00:00
2026-11-17 23:46:48 +00:00
2026-11-03 23:49:01 +00:00
2026-11-13 04:51:06 +00:00
2026-11-13 21:51:53 +00:00
2026-09-30 19:21:02 +00:00
2026-11-11 05:38:52 +00:00
2026-11-13 04:51:06 +00:00
2026-11-11 06:41:15 +00:00
2026-10-19 22:55:42 +00:00
2026-10-08 19:13:52 +00:00
2026-10-08 19:13:52 +00:00
2026-11-13 04:51:06 +00:00
2026-11-13 04:51:06 +00:00
2026-10-29 11:23:51 +00:00
2026-11-11 07:39:04 +00:00
2026-11-14 02:23:37 +00:00
2026-10-26 18:13:00 +00:00
2026-10-23 12:23:10 +00:00
2026-10-28 20:21:30 +00:00
2026-10-20 17:01:52 +00:00
2026-11-10 01:28:45 +00:00
2026-11-14 00:30:18 +00:00
2026-11-07 02:09:31 +00:00
2026-11-17 19:23:05 +00:00
2026-10-27 11:05:48 +00:00
2026-10-23 18:48:10 +00:00
2026-10-23 18:48:10 +00:00
2026-11-16 12:03:11 +00:00
2026-09-27 20:15:23 +00:00
2026-10-23 18:48:10 +00:00
2026-11-17 23:15:04 +00:00
2026-10-14 02:01:49 +00:00
2026-11-17 21:40:36 +00:00
2026-10-29 18:09:55 +00:00
2026-11-03 06:24:24 +00:00
2026-10-29 11:23:51 +00:00
2026-10-07 23:19:26 +00:00
2026-11-12 14:07:50 +00:00
2026-11-13 04:51:06 +00:00
2026-11-13 04:51:06 +00:00
2026-11-13 04:51:06 +00:00
2026-11-13 04:51:06 +00:00
2026-11-13 04:51:06 +00:00
2026-11-16 03:40:21 +00:00
2026-11-14 01:54:53 +00:00
2026-10-23 12:35:58 +00:00
2026-11-10 04:56:49 +00:00
2026-10-06 01:26:11 +00:00
2026-11-17 23:46:48 +00:00
2026-11-06 12:04:44 +00:00
2026-11-13 23:04:26 +00:00
2026-11-10 05:08:19 +00:00
2026-10-02 22:55:08 +00:00
2026-11-07 23:51:58 +00:00
2026-11-06 05:10:44 +00:00
2026-11-02 08:31:14 +00:00
2026-10-20 11:56:17 +00:00
2026-10-28 06:22:58 +00:00
2026-11-12 21:40:33 +00:00
2026-11-13 04:51:06 +00:00
2026-11-16 19:28:36 +00:00
2026-09-28 23:32:45 +00:00
2026-10-08 18:42:58 +00:00
2026-11-05 03:49:13 +00:00
2026-11-16 19:28:36 +00:00
2026-11-17 19:23:05 +00:00
2026-11-14 02:23:37 +00:00
2026-11-07 08:11:37 +00:00
2026-11-07 08:11:37 +00:00
2026-11-14 06:14:36 +00:00
2026-10-30 02:43:02 +00:00
2026-11-11 05:38:52 +00:00
2026-11-07 06:32:12 +00:00
2026-10-08 22:42:12 +00:00
2026-11-14 02:23:37 +00:00
2026-10-01 05:33:36 +00:00
2026-10-28 07:12:32 +00:00
2026-10-14 15:22:02 +00:00
2026-10-09 01:22:30 +00:00
2026-10-26 18:13:00 +00:00
2026-09-29 15:10:17 +00:00
2026-10-06 21:29:35 +00:00
2026-11-13 21:51:53 +00:00
2026-11-14 02:23:37 +00:00
2026-10-28 04:05:31 +00:00
2026-10-01 20:47:05 +00:00
2026-11-16 12:03:11 +00:00
2026-11-14 02:23:37 +00:00
2026-10-23 18:39:28 +00:00
2026-11-18 00:45:07 +00:00
2026-11-17 23:46:48 +00:00
2026-11-14 02:23:37 +00:00
2026-10-01 00:57:29 +00:00
2026-11-13 18:53:48 +00:00
2026-11-16 18:20:25 +00:00
2026-11-16 16:21:42 +00:00
2026-11-02 13:51:49 +00:00
2026-10-30 14:40:32 +00:00
2026-11-18 05:13:56 +00:00
2026-11-05 08:10:44 +00:00
2026-11-14 00:32:02 +00:00
2026-11-17 23:46:48 +00:00
2026-10-30 16:09:46 +00:00
2026-11-10 20:35:28 +00:00
2026-10-26 18:13:00 +00:00
2026-11-17 20:04:36 +00:00
2026-10-29 11:23:51 +00:00
2026-11-14 07:09:26 +00:00
2026-11-11 08:16:52 +00:00
2026-10-27 04:52:09 +00:00
2026-10-28 01:29:34 +00:00
2026-09-23 00:49:19 +00:00
2026-11-16 16:38:13 +00:00
2026-11-10 20:35:28 +00:00
2026-11-14 02:23:37 +00:00
2026-11-10 01:30:08 +00:00
2026-11-13 04:51:06 +00:00
2026-10-26 18:13:00 +00:00
2026-10-29 18:41:17 +00:00
2026-11-18 02:31:46 +00:00
2026-09-24 19:29:53 +00:00
2026-11-18 00:46:17 +00:00