Skip to content

Conversation

@Sing303
Copy link
Contributor

@Sing303 Sing303 commented Aug 31, 2025

What?
Auto-approve patches when SandboxPolicy::DangerFullAccess is enabled on platforms without sandbox support.
Changes in codex-rs/core/src/safety.rs: return SafetyCheck::AutoApprove { sandbox_type: SandboxType::None } when no sandbox is available and DangerFullAccess is set.

Why?
On platforms lacking sandbox support, requiring explicit user approval despite DangerFullAccess being explicitly enabled adds friction without additional safety. This aligns behavior with the stated policy intent.

How?
Extend assess_patch_safety match:

  • If get_platform_sandbox() returns Some, keep AutoApprove { sandbox_type }.
  • If None and SandboxPolicy::DangerFullAccess, return AutoApprove { SandboxType::None }.
  • Otherwise, fall back to AskUser.

Tests

  • Local checks:
    cargo test && cargo clippy --tests && cargo fmt -- --config imports_granularity=Item
    (Additionally: just fmt, just fix -p codex-core, cargo check -p codex-core.)

Docs
No user-facing CLI changes. No README/help updates needed.

Risk/Impact
Reduces prompts on non-sandboxed platforms when DangerFullAccess is explicitly chosen; consistent with policy semantics.

@github-actions
Copy link

github-actions bot commented Aug 31, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@Sing303
Copy link
Contributor Author

Sing303 commented Aug 31, 2025

I have read the CLA Document and I hereby sign the CLA

@Sing303
Copy link
Contributor Author

Sing303 commented Aug 31, 2025

recheck

@aliceTheFarmer
Copy link

same problem, not fixed yet

@angeloprado
Copy link

can someone approve this? It's making windows usage overly challenging

@Sing303
Copy link
Contributor Author

Sing303 commented Sep 2, 2025

Hi @bolinfest @nornagon-openai @pakrym-oai — friendly ping for a review/decision on this PR.
Users are blocked and asking for this fix (refs: #2860, #2969, #2828, #2710).

Workflows are pending maintainer approval (so CI hasn’t run yet). The branch is up to date with main.

If you’re not the right reviewers, could you please tag the right owner? Thanks!

@febrianmosii
Copy link

yes please, this issue quite challenging, the rest is great..

Prefer `if` in match guard instead of matches!().
@bolinfest bolinfest self-requested a review September 3, 2025 17:43
@bolinfest
Copy link
Collaborator

Thanks for this!

@bolinfest bolinfest merged commit 0e827b6 into openai:main Sep 3, 2025
18 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 3, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants