GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — app-server-protocol: mark permission profiles experimental by bolinfest · Pull Request #19899 · openai/codex

Conversation

@bolinfest

@bolinfest bolinfest commented Apr 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Collaborator

Why

PermissionProfile is now the canonical internal permissions representation, but the app-server wire shape is still intentionally unstable while the migration continues. Stable app-server clients should not see or generate code for these fields until the wire format settles.

What changed

  • Marks every app-server v2 field that sends PermissionProfile as experimental, including command/exec, thread/start, thread/resume, thread/fork, and turn/start request/response payloads.
  • Enables per-field experimental inspection for command/exec, so permissionProfile is gated without making the entire method experimental.
  • Fixes the generated TypeScript schema filter to be comment-aware. The previous scanner treated apostrophes inside doc comments as string delimiters, so some experimental fields leaked into stable TypeScript even though stable JSON was filtered correctly.

Verification

  • cargo test -p codex-app-server-protocol

Stack created with Sapling. Best reviewed with ReviewStack.

  • permissions: add built-in default profiles #19900
  • -> app-server-protocol: mark permission profiles experimental #19899

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

chatgpt-codex-connector[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@bolinfest
bolinfest requested a review from a team as a code owner April 28, 2026 00:46
@bolinfest
bolinfest changed the base branch from main to pr19776 April 28, 2026 00:46
This was referenced Apr 28, 2026
permissions: derive snapshot sandbox projections #19775
Merged
permissions: add built-in default profiles #19900
Merged
permissions: store thread sessions as profiles #19776
Merged
permissions: require profiles in TUI thread state #19773
Merged
permissions: make SessionConfigured profile-only #19774
Merged
@bolinfest
bolinfest force-pushed the pr19899 branch from 5fca8f2 to d1871b8 Compare April 28, 2026 03:18
bolinfest added a commit that referenced this pull request Apr 28, 2026
@bolinfest
permissions: require profiles in TUI thread state (#19773)
af95662
## Why

`ThreadSessionState` is the TUI's cached view of an app-server session.
To make `PermissionProfile` the canonical runtime permissions model,
cached thread sessions need to always have a profile instead of treating
the profile as an optional supplement to a legacy `sandbox` response
field.

The main compatibility concern is older app-server v2 lifecycle
responses that only include `sandbox` and omit `permissionProfile`:

- `thread/start` -> `ThreadStartResponse.sandbox`
- `thread/resume` -> `ThreadResumeResponse.sandbox`
- `thread/fork` -> `ThreadForkResponse.sandbox`

Those responses must still hydrate correctly when the TUI is pointed at
an older app-server. This PR converts the legacy `sandbox` value into a
`PermissionProfile` immediately at response ingestion time, using the
response `cwd`, so cached sessions do not carry an optional profile that
can later reinterpret cwd-bound grants against a different thread cwd.

This fallback is intentionally boundary compatibility. The follow-up PRs
in this stack continue the cleanup by making `SessionConfiguredEvent`
profile-only, deriving sandbox projections from snapshots only when an
API still needs them, and then removing `sandbox_policy` from
`ThreadSessionState`.

## What Changed

- Makes `ThreadSessionState.permission_profile` required.
- Converts legacy app-server response `sandbox` values into a
`PermissionProfile` at ingestion time using the response cwd.
- Ensures `thread/read` hydration does not reuse a primary session
profile that may be anchored to a different cwd; it uses the active
widget permission settings for the read thread fallback instead of
reusing cached primary-session permissions.
- Keeps the app-server request path unchanged: embedded sessions send
profiles, while remote sessions continue using legacy sandbox overrides
for compatibility.

## Verification

- `cargo test -p codex-tui thread_read --lib`
- `cargo test -p codex-tui
permission_settings_sync_preserves_active_profile_only_rules --lib`
- `cargo test -p codex-tui
resume_response_restores_turns_from_thread_items --lib`
- `cargo test -p codex-tui thread_session_state::tests --lib`




























---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/19773).
* #19900
* #19899
* #19776
* #19775
* #19774
* __->__ #19773
@bolinfest
bolinfest force-pushed the pr19776 branch from 08e200f to 7edd6bd Compare April 28, 2026 03:41
@bolinfest
bolinfest force-pushed the pr19899 branch from d1871b8 to 737f95d Compare April 28, 2026 03:41
@bolinfest
bolinfest force-pushed the pr19776 branch from 7edd6bd to 2d32dad Compare April 28, 2026 04:12
@bolinfest
bolinfest force-pushed the pr19899 branch from 737f95d to ba5cc6d Compare April 28, 2026 04:12
@bolinfest
bolinfest requested a review from viyatb-oai April 28, 2026 04:15
@bolinfest
bolinfest force-pushed the pr19776 branch from 2d32dad to 46a856e Compare April 28, 2026 04:17
@bolinfest
bolinfest force-pushed the pr19899 branch from ba5cc6d to 0fc75cc Compare April 28, 2026 04:17
@bolinfest
bolinfest force-pushed the pr19776 branch from 46a856e to 9133437 Compare April 28, 2026 04:29
@bolinfest
bolinfest force-pushed the pr19899 branch 2 times, most recently from 28113b6 to 669323a Compare April 28, 2026 04:40
@bolinfest
bolinfest force-pushed the pr19776 branch from 9133437 to 61fac4e Compare April 28, 2026 04:40
@viyatb-oai

viyatb-oai commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

@codex review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

viyatb-oai
viyatb-oai reviewed Apr 28, 2026
View reviewed changes
Comment thread codex-rs/app-server-protocol/schema/typescript/v2/CommandExecutionRequestApprovalParams.ts Resolved

Uh oh!

There was an error while loading. Please reload this page.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. 🎉

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bolinfest added a commit that referenced this pull request Apr 28, 2026
@bolinfest
permissions: make SessionConfigured profile-only (#19774)
bf38def
## Why

`SessionConfiguredEvent` is the internal event that tells clients what
permissions are active for a session. Emitting both `sandbox_policy` and
`permission_profile` leaves two possible authorities and forces every
consumer to decide which one to honor. At this point in the migration,
the profile is expressive enough to represent managed, disabled, and
external sandbox enforcement, so the internal event can be profile-only.

The wire compatibility concern is older serialized events or rollout
data that only contain `sandbox_policy`; those still need to
deserialize.

## What Changed

- Removes `sandbox_policy` from `SessionConfiguredEvent` and makes
`permission_profile` required.
- Adds custom deserialization so old payloads with only `sandbox_policy`
are upgraded to a cwd-anchored `PermissionProfile`.
- Updates core event emission and TUI session handling to sync
permissions from the profile directly.
- Updates app-server response construction to derive the legacy
`sandbox` response field from the active thread snapshot instead of from
`SessionConfiguredEvent`.
- Updates yolo-mode display logic to treat both
`PermissionProfile::Disabled` and managed unrestricted filesystem plus
enabled network as full-access, while still preserving the distinction
between no sandbox and external sandboxing.

## Verification

- `cargo test -p codex-protocol session_configured_event --lib`
- `cargo test -p codex-protocol serialize_event --lib`
- `cargo test -p codex-exec session_configured --lib`
- `cargo test -p codex-app-server
thread_response_permission_profile_preserves_enforcement --lib`
- `cargo test -p codex-core
session_configured_reports_permission_profile_for_external_sandbox
--lib`
- `cargo test -p codex-tui session_configured --lib`
- `cargo test -p codex-tui
yolo_mode_includes_managed_full_access_profiles --lib`


































---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/19774).
* #19900
* #19899
* #19776
* #19775
* __->__ #19774
@bolinfest
bolinfest force-pushed the pr19776 branch from 61fac4e to 6c6150c Compare April 28, 2026 05:07
@bolinfest
bolinfest force-pushed the pr19899 branch from 669323a to 4f36ff2 Compare April 28, 2026 05:07
viyatb-oai
viyatb-oai approved these changes Apr 28, 2026
View reviewed changes
bolinfest added a commit that referenced this pull request Apr 28, 2026
@bolinfest
permissions: derive snapshot sandbox projections (#19775)
fc2a691
## Why

`ThreadConfigSnapshot` is used by app-server and thread metadata code as
a stable view of active runtime settings. Keeping both `sandbox_policy`
and `permission_profile` in the snapshot duplicates permission state and
makes it possible for the legacy projection to drift from the canonical
profile.

The legacy `sandbox` value is still needed at app-server compatibility
boundaries, so this PR derives it on demand from the snapshot profile
and cwd instead of storing it.

## What Changed

- Removes `ThreadConfigSnapshot.sandbox_policy`.
- Adds `ThreadConfigSnapshot::sandbox_policy()` as a compatibility
projection from `permission_profile` plus `cwd`.
- Updates app-server response/metadata code and tests to call the
projection only where legacy fields still exist.
- Keeps snapshot construction profile-only so split filesystem rules,
disabled enforcement, and external enforcement remain represented by the
canonical profile.

## Verification

- `cargo test -p codex-app-server
thread_response_permission_profile_preserves_enforcement --lib`
- `cargo test -p codex-core
dispatch_reclaims_stale_global_lock_and_starts_consolidation --lib`



































---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/19775).
* #19900
* #19899
* #19776
* __->__ #19775
@bolinfest
bolinfest force-pushed the pr19776 branch from 6c6150c to 360da3f Compare April 28, 2026 05:31
@bolinfest
bolinfest force-pushed the pr19899 branch from 4f36ff2 to 3c01c31 Compare April 28, 2026 05:31
Base automatically changed from pr19776 to main April 28, 2026 05:50
bolinfest added a commit that referenced this pull request Apr 28, 2026
@bolinfest
permissions: store thread sessions as profiles (#19776)
341550c
## Why

After thread sessions have a required `PermissionProfile`, the TUI no
longer needs to cache a separate legacy `SandboxPolicy` in
`ThreadSessionState`. Keeping the legacy field would reintroduce two
permission authorities in the session cache and make later
replay/switching logic easier to get wrong.

This PR keeps legacy app-server compatibility at the ingestion boundary:
old `sandbox` response values are still accepted, but they are
immediately converted to a cwd-anchored profile.

## What Changed

- Removes `ThreadSessionState.sandbox_policy`.
- Updates active-session permission syncing to write only the current
`PermissionProfile`.
- Updates thread-read/replay/test fixtures to use profiles as the cached
session permission source.
- Leaves legacy `sandbox` fields in app-server request/response protocol
paths unchanged; those are compatibility boundaries and are converted
before entering cached TUI state.

## Verification

- `cargo test -p codex-tui thread_session_state::tests --lib`
- `cargo test -p codex-tui
inactive_thread_started_notification_initializes_replay_session --lib`
- `cargo test -p codex-tui thread_events --lib`
- `just fix -p codex-tui`




































---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/19776).
* #19900
* #19899
* __->__ #19776
@bolinfest
app-server-protocol: mark permission profiles experimental
3afcb5a
@bolinfest
bolinfest force-pushed the pr19899 branch from 3c01c31 to 3afcb5a Compare April 28, 2026 05:52
@bolinfest
bolinfest enabled auto-merge (squash) April 28, 2026 05:52
@bolinfest
bolinfest merged commit 0a32c8b into main Apr 28, 2026
39 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bolinfest
bolinfest deleted the pr19899 branch April 28, 2026 06:08
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

1 more reviewer
@viyatb-oai viyatb-oai viyatb-oai approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@bolinfest @viyatb-oai
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.