Skip to content

Apply current permissions before goal continuations - #30604

Draft
ssetty-oai wants to merge 2 commits into
mainfrom
codex/fix-goal-permission-context
Draft

ssetty-oai wants to merge 2 commits into
mainfrom
codex/fix-goal-permission-context

Conversation

@ssetty-oai

@ssetty-oai ssetty-oai commented Jun 29, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • extend thread/goal/set with the current approval policy, approvals reviewer, sandbox policy, and named permissions profile context
  • resolve and apply that context to a live thread before goal state becomes visible to idle lifecycle hooks or apply_runtime_effects
  • make the TUI send the visible thread's current permission context for goal create/status updates, while snapshotting it before async work and skipping stale cross-thread sends
  • reject permissions plus sandboxPolicy together, including for unloaded materialized threads
  • update app-server docs/schema and add continuation-boundary regressions for named profiles, explicit sandbox overrides, and the conflict case
  • add a manual POSIX live app-server smoke command that starts from stale untrusted/read-only/auto-review settings, exercises explicit sandbox and named-profile continuations, verifies marker writes with zero approval callbacks, and confirms retained approval/reviewer/sandbox/profile state via thread/resume

Fixes #29693

Testing

  • CARGO_TARGET_DIR=/tmp/codex-target just write-app-server-schema --experimental
  • CARGO_TARGET_DIR=/tmp/codex-target just write-app-server-schema
  • CARGO_TARGET_DIR=/tmp/codex-target just test -p codex-app-server-protocol (251 passed)
  • CARGO_TARGET_DIR=/tmp/codex-target just test -p codex-app-server thread_goal_permissions --status-level fail --final-status-level fail (3 passed)
  • CARGO_TARGET_DIR=/tmp/codex-target just test -p codex-tui thread_goal --status-level fail --final-status-level fail (7 passed)
  • CARGO_TARGET_DIR=/tmp/codex-target just test -p codex-core thread_settings_update_without_user_turn --status-level fail --final-status-level fail (3 passed)
  • CARGO_TARGET_DIR=/tmp/codex-target just test -p codex-app-server-test-client --status-level fail --final-status-level fail (5 passed)
  • CODEX_API_KEY=<redacted> timeout 300s /tmp/codex-target/debug/codex-app-server-test-client --codex-bin /tmp/codex-target/debug/codex goal-permissions-smoke (explicit sandbox and named profile passed against live gpt-5.6-sol-oai)
  • CARGO_TARGET_DIR=/tmp/codex-target just fix -p codex-app-server-protocol -p codex-app-server -p codex-core -p codex-tui
  • CARGO_TARGET_DIR=/tmp/codex-target just fix -p codex-app-server -p codex-tui
  • CARGO_TARGET_DIR=/tmp/codex-target just fix -p codex-app-server-test-client
  • CARGO_TARGET_DIR=/tmp/codex-target just fmt

Broader suite notes

  • just test -p codex-app-server: 929/932 passed initially; the remaining 3 helper-binary failures passed after building codex and test_stdio_server.
  • just test -p codex-tui: 2948/2950 passed; the two failing guardian feature-flag tests reproduce in isolation and are outside the touched files.
  • just test -p codex-core: 2820/2891 passed; the 71 failures clustered in host /tmp/git-config, helper-binary, and timing-sensitive suites, with no failure in the changed goal path.
  • Full workspace just test was not run because the repository instructions require user approval for that sweep.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

/goal continuation can reuse stale permission context after Full Access/custom permissions

1 participant