Repository navigation
Bind permission grants to the originating turn - #49880
Merged
copyberry[bot] merged 1 commit intoOct 1, 2026
Merged
copyberry[bot] merged 1 commit into
copyberry[bot] merged 1 commit into
Conversation
## Why Background code-mode cells can continue running after a new turn starts. Looking up grants and strict review requirements through the active turn can make those cells lose their approved access or use another turn's permissions. ## What changed - Keep turn-scoped grants and strict review state in `TurnContext`, retained by captured steps and background cells. - Record permission responses against the requesting turn, including requests made after a later turn starts. - Share live session-scoped grants across turns while keeping turn-scoped grants isolated. - Use the originating turn's permissions and review requirements for tool execution, patches, MCP calls, file uploads, and terminal input. ## Testing Add regression coverage for background cells retaining grants across turn changes, turn versus session scope, permission requests after the next turn starts, and strict review enabled while `write_stdin` is queued. GitOrigin-RevId: 641502fbfd43553c2c42424d4aaa53ae8020c850
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/641502fbfd43553c2c42424d4aaa53ae8020c850
branch
from
October 1, 2026 05:33
e0325fc to
1f52d40
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/641502fbfd43553c2c42424d4aaa53ae8020c850
branch
October 1, 2026 05:33
papercupai
temporarily deployed
to
issue-triage
October 1, 2026 05:35 — with
GitHub Actions
Inactive
papercupai
temporarily deployed
to
issue-triage
October 1, 2026 05:35 — with
GitHub Actions
Inactive
papercupai
temporarily deployed
to
issue-triage
October 1, 2026 05:35 — with
GitHub Actions
Inactive
papercupai
temporarily deployed
to
issue-triage
October 1, 2026 05:35 — with
GitHub Actions
Inactive
JavierPiedra
temporarily deployed
to
issue-triage
October 1, 2026 05:42 — with
GitHub Actions
Inactive
JavierPiedra
temporarily deployed
to
issue-triage
October 1, 2026 05:42 — with
GitHub Actions
Inactive
JavierPiedra
temporarily deployed
to
issue-triage
October 1, 2026 05:42 — with
GitHub Actions
Inactive
easyvibecoding
temporarily deployed
to
issue-triage
October 1, 2026 05:45 — with
GitHub Actions
Inactive
easyvibecoding
temporarily deployed
to
issue-triage
October 1, 2026 05:45 — with
GitHub Actions
Inactive
easyvibecoding
temporarily deployed
to
issue-triage
October 1, 2026 05:45 — with
GitHub Actions
Inactive
CHANGJianshuo
temporarily deployed
to
issue-triage
October 1, 2026 05:47 — with
GitHub Actions
Inactive
CHANGJianshuo
temporarily deployed
to
issue-triage
October 1, 2026 05:47 — with
GitHub Actions
Inactive
CHANGJianshuo
temporarily deployed
to
issue-triage
October 1, 2026 05:47 — with
GitHub Actions
Inactive
vincent-yao27
temporarily deployed
to
issue-triage
October 1, 2026 05:48 — with
GitHub Actions
Inactive
vincent-yao27
temporarily deployed
to
issue-triage
October 1, 2026 05:48 — with
GitHub Actions
Inactive
vincent-yao27
temporarily deployed
to
issue-triage
October 1, 2026 05:48 — with
GitHub Actions
Inactive
CHANGJianshuo
temporarily deployed
to
issue-triage
October 1, 2026 05:48 — with
GitHub Actions
Inactive
vincent-yao27
temporarily deployed
to
issue-triage
October 1, 2026 05:49 — with
GitHub Actions
Inactive
zeyuhou222-ship-it
temporarily deployed
to
issue-triage
October 1, 2026 05:54 — with
GitHub Actions
Inactive
zeyuhou222-ship-it
temporarily deployed
to
issue-triage
October 1, 2026 05:54 — with
GitHub Actions
Inactive
zeyuhou222-ship-it
temporarily deployed
to
issue-triage
October 1, 2026 05:54 — with
GitHub Actions
Inactive
apexethdev
temporarily deployed
to
issue-triage
October 1, 2026 05:56 — with
GitHub Actions
Inactive
apexethdev
temporarily deployed
to
issue-triage
October 1, 2026 05:56 — with
GitHub Actions
Inactive
apexethdev
temporarily deployed
to
issue-triage
October 1, 2026 05:56 — with
GitHub Actions
Inactive
1208996881-maker
temporarily deployed
to
issue-triage
October 1, 2026 06:05 — with
GitHub Actions
Inactive
1208996881-maker
temporarily deployed
to
issue-triage
October 1, 2026 06:05 — with
GitHub Actions
Inactive
1208996881-maker
temporarily deployed
to
issue-triage
October 1, 2026 06:05 — with
GitHub Actions
Inactive
abcjhby2871
temporarily deployed
to
issue-triage
October 1, 2026 06:07 — with
GitHub Actions
Inactive
abcjhby2871
temporarily deployed
to
issue-triage
October 1, 2026 06:07 — with
GitHub Actions
Inactive
abcjhby2871
temporarily deployed
to
issue-triage
October 1, 2026 06:07 — with
GitHub Actions
Inactive
1208996881-maker
temporarily deployed
to
issue-triage
October 1, 2026 06:07 — with
GitHub Actions
Inactive
bennyaph1211
temporarily deployed
to
issue-triage
October 1, 2026 06:08 — with
GitHub Actions
Inactive
bennyaph1211
temporarily deployed
to
issue-triage
October 1, 2026 06:08 — with
GitHub Actions
Inactive
bennyaph1211
temporarily deployed
to
issue-triage
October 1, 2026 06:08 — with
GitHub Actions
Inactive
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Bind permission grants to the originating turn
Why
Background code-mode cells can continue running after a new turn starts. Looking up grants and strict review requirements through the active turn can make those cells lose their approved access or use another turn's permissions.
What changed
TurnContext, retained by captured steps and background cells.Testing
Add regression coverage for background cells retaining grants across turn changes, turn versus session scope, permission requests after the next turn starts, and strict review enabled while
write_stdinis queued.