Skip to content

Review terminal input against retained permissions - #41328

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

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/e2d71daf9358474c885998786c4928069100711c

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Review terminal input against retained permissions

Why

An existing terminal keeps the sandbox, network settings, and grants it had at launch. Later write_stdin calls must account for that retained authority, including when permissions change between turns.

What changed

  • Capture each terminal's effective launch permissions and compare them with the current environment before accepting non-empty input.
  • Request approval when the terminal bypassed the sandbox, retains additional grants, strict auto-review is active, or its sandbox or network settings differ from the current policy.
  • Reject input when current denied-read or environment-owned network restrictions cannot be enforced by the existing terminal, while keeping empty polls and non-TTY interrupts available without review.
  • Include the effective sandbox mode and user-visible additional grants in write_stdin approval actions without exposing host-owned grant paths.

Testing

Added unit and end-to-end coverage for retained cross-turn grants, strict auto-review, sandbox and network policy changes, denied reads, Windows sandbox backends, and private grant redaction.

## Why

An existing terminal keeps the sandbox, network settings, and grants it had at launch. Later `write_stdin` calls must account for that retained authority, including when permissions change between turns.

## What changed

- Capture each terminal's effective launch permissions and compare them with the current environment before accepting non-empty input.
- Request approval when the terminal bypassed the sandbox, retains additional grants, strict auto-review is active, or its sandbox or network settings differ from the current policy.
- Reject input when current denied-read or environment-owned network restrictions cannot be enforced by the existing terminal, while keeping empty polls and non-TTY interrupts available without review.
- Include the effective sandbox mode and user-visible additional grants in `write_stdin` approval actions without exposing host-owned grant paths.

## Testing

Added unit and end-to-end coverage for retained cross-turn grants, strict auto-review, sandbox and network policy changes, denied reads, Windows sandbox backends, and private grant redaction.

GitOrigin-RevId: e2d71daf9358474c885998786c4928069100711c
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/e2d71daf9358474c885998786c4928069100711c branch from a503de3 to 5eea8d0 Compare August 28, 2026 11:38
@copyberry
copyberry Bot merged commit 5eea8d0 into main Aug 28, 2026
27 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/e2d71daf9358474c885998786c4928069100711c branch August 28, 2026 11:39
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 28, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 5eea8d0d Deployed Aug 28, 2026 by motion-bot-byte via Identify potential duplicates (all issues) #40598
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.

3 participants