File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ use crate::state_db;
1414use crate :: thread_manager:: ThreadManagerState ;
1515use codex_protocol:: ThreadId ;
1616use codex_protocol:: models:: FunctionCallOutputPayload ;
17- use codex_protocol:: models:: MessageRole ;
1817use codex_protocol:: models:: ResponseItem ;
1918use codex_protocol:: protocol:: InitialHistory ;
2019use codex_protocol:: protocol:: Op ;
@@ -504,6 +503,7 @@ mod tests {
504503 use assert_matches:: assert_matches;
505504 use codex_protocol:: config_types:: ModeKind ;
506505 use codex_protocol:: models:: ContentItem ;
506+ use codex_protocol:: models:: MessageRole ;
507507 use codex_protocol:: models:: ResponseItem ;
508508 use codex_protocol:: protocol:: ErrorEvent ;
509509 use codex_protocol:: protocol:: EventMsg ;
Original file line number Diff line number Diff line change @@ -379,7 +379,6 @@ impl Codex {
379379 let ( tx_sub, rx_sub) = async_channel:: bounded ( SUBMISSION_CHANNEL_CAPACITY ) ;
380380 let ( tx_event, rx_event) = async_channel:: unbounded ( ) ;
381381
382- let loaded_plugins = plugins_manager. plugins_for_config ( & config) ;
383382 let loaded_skills = skills_manager. skills_for_config ( & config) ;
384383
385384 for err in & loaded_skills. errors {
Original file line number Diff line number Diff line change @@ -3558,7 +3558,7 @@ async fn abort_review_task_emits_exited_then_aborted_and_records_history() {
35583558 let ContentItem :: InputText { text } = content_item else {
35593559 return false ;
35603560 } ;
3561- text. contains( crate :: contextual_user_message :: TURN_ABORTED_OPEN_TAG )
3561+ text. contains( crate :: model_visible_context :: TURN_ABORTED_OPEN_TAG )
35623562 } )
35633563 } ) ,
35643564 "expected a model-visible turn aborted marker in history after interrupt"
Original file line number Diff line number Diff line change @@ -540,7 +540,7 @@ pub fn render_decision_for_unmatched_command(
540540 // In restricted sandboxes (ReadOnly/WorkspaceWrite), do not prompt for
541541 // non‑escalated, non‑dangerous commands — let the sandbox enforce
542542 // restrictions (e.g., block network/write) without a user prompt.
543- if sandbox_permissions. requests_sandbox_override ( ) {
543+ if sandbox_permissions. requires_escalated_permissions ( ) {
544544 Decision :: Prompt
545545 } else {
546546 Decision :: Allow
@@ -555,7 +555,7 @@ pub fn render_decision_for_unmatched_command(
555555 Decision :: Allow
556556 }
557557 SandboxPolicy :: ReadOnly { .. } | SandboxPolicy :: WorkspaceWrite { .. } => {
558- if sandbox_permissions. requests_sandbox_override ( ) {
558+ if sandbox_permissions. requires_escalated_permissions ( ) {
559559 Decision :: Prompt
560560 } else {
561561 Decision :: Allow
Original file line number Diff line number Diff line change @@ -187,12 +187,13 @@ pub(super) async fn apply_granted_turn_permissions(
187187 _ => false ,
188188 } ;
189189
190- let sandbox_permissions =
191- if effective_permissions. is_some ( ) && !sandbox_permissions. uses_additional_permissions ( ) {
192- SandboxPermissions :: WithAdditionalPermissions
193- } else {
194- sandbox_permissions
195- } ;
190+ let sandbox_permissions = if effective_permissions. is_some ( )
191+ && !sandbox_permissions. requires_additional_permissions ( )
192+ {
193+ SandboxPermissions :: WithAdditionalPermissions
194+ } else {
195+ sandbox_permissions
196+ } ;
196197
197198 EffectiveAdditionalPermissions {
198199 sandbox_permissions,
Original file line number Diff line number Diff line change @@ -354,7 +354,7 @@ impl ShellHandler {
354354 // continue through the normal exec approval flow for the command.
355355 if effective_additional_permissions
356356 . sandbox_permissions
357- . requests_sandbox_override ( )
357+ . requires_escalated_permissions ( )
358358 && !effective_additional_permissions. permissions_preapproved
359359 && !matches ! (
360360 turn. approval_policy. value( ) ,
Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ impl ToolHandler for UnifiedExecHandler {
182182 // continue through the normal exec approval flow for the command.
183183 if effective_additional_permissions
184184 . sandbox_permissions
185- . requests_sandbox_override ( )
185+ . requires_escalated_permissions ( )
186186 && !effective_additional_permissions. permissions_preapproved
187187 && !matches ! (
188188 context. turn. approval_policy. value( ) ,
Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ fn shell_event_with_prefix_rule(
239239 "command" : command,
240240 "timeout_ms" : timeout_ms,
241241 } ) ;
242- if sandbox_permissions. requests_sandbox_override ( ) {
242+ if sandbox_permissions. requires_escalated_permissions ( ) {
243243 args[ "sandbox_permissions" ] = json ! ( sandbox_permissions) ;
244244 }
245245 if let Some ( prefix_rule) = prefix_rule {
@@ -262,7 +262,7 @@ fn exec_command_event(
262262 if let Some ( yield_time_ms) = yield_time_ms {
263263 args[ "yield_time_ms" ] = json ! ( yield_time_ms) ;
264264 }
265- if sandbox_permissions. requests_sandbox_override ( ) {
265+ if sandbox_permissions. requires_escalated_permissions ( ) {
266266 args[ "sandbox_permissions" ] = json ! ( sandbox_permissions) ;
267267 let reason = justification. unwrap_or ( DEFAULT_UNIFIED_EXEC_JUSTIFICATION ) ;
268268 args[ "justification" ] = json ! ( reason) ;
Original file line number Diff line number Diff line change @@ -490,6 +490,7 @@ async fn permissions_message_includes_writable_roots() -> Result<()> {
490490 let expected = developer_permissions_text (
491491 & sandbox_policy,
492492 AskForApproval :: OnRequest ,
493+ false ,
493494 & Policy :: empty ( ) ,
494495 test. config . cwd . as_path ( ) ,
495496 false ,
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ use core_test_support::stdio_server_bin;
2121use core_test_support:: test_codex:: test_codex;
2222use core_test_support:: wait_for_event;
2323use core_test_support:: wait_for_event_with_timeout;
24+ use dunce:: canonicalize as normalize_path;
2425use tempfile:: TempDir ;
2526use wiremock:: MockServer ;
2627
You can’t perform that action at this time.
0 commit comments