Skip to content

Use executor path context for permission preapproval - #41928

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/aee54350a25430a0443f8319e2bb0bbdc4f44282
Aug 31, 2026
Merged

Use executor path context for permission preapproval#41928
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/aee54350a25430a0443f8319e2bb0bbdc4f44282

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 31, 2026

Copy link
Copy Markdown

Use executor path context for permission preapproval

Why

Permission grants can belong to an executor whose path convention differs from
the local host, such as a Windows remote environment. Matching those grants
against a host-native working directory can reject valid permissions.

What changed

  • Normalize, materialize, and compare additional filesystem permissions using
    the selected executor's URI-based sandbox context.
  • Apply the same context-aware preapproval flow to exec_command,
    apply_patch, and extension tools.
  • Fail closed when symbolic temporary-directory or project-root permissions
    cannot be resolved from executor metadata, while accepting opaque working
    directory URIs when requested paths use the executor's convention.

Testing

  • Added coverage for reusing a Windows permission grant from a non-Windows
    host, resolving symbolic temporary-directory grants, and normalizing paths
    with an opaque Windows working directory.

## Why

Permission grants can belong to an executor whose path convention differs from
the local host, such as a Windows remote environment. Matching those grants
against a host-native working directory can reject valid permissions.

## What changed

- Normalize, materialize, and compare additional filesystem permissions using
  the selected executor's URI-based sandbox context.
- Apply the same context-aware preapproval flow to `exec_command`,
  `apply_patch`, and extension tools.
- Fail closed when symbolic temporary-directory or project-root permissions
  cannot be resolved from executor metadata, while accepting opaque working
  directory URIs when requested paths use the executor's convention.

## Testing

- Added coverage for reusing a Windows permission grant from a non-Windows
  host, resolving symbolic temporary-directory grants, and normalizing paths
  with an opaque Windows working directory.

GitOrigin-RevId: aee54350a25430a0443f8319e2bb0bbdc4f44282
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/aee54350a25430a0443f8319e2bb0bbdc4f44282 branch from dcee940 to c4350b4 Compare August 31, 2026 22:59
@copyberry
copyberry Bot merged commit c4350b4 into main Aug 31, 2026
22 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/aee54350a25430a0443f8319e2bb0bbdc4f44282 branch August 31, 2026 23:00
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 31, 2026
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.

1 participant