Repository navigation
Add startup tool allowlists for threads - #45711
Merged
copyberry[bot] merged 1 commit intoSep 15, 2026
Merged
copyberry[bot] merged 1 commit into
copyberry[bot] merged 1 commit into
Conversation
## What changed - Add `AllowedTools` to the extension API, captured once at thread startup to restrict which tools can be advertised or executed. An empty list disables all tools; an absent value preserves ordinary tool setup. Callers must supply the list again when resuming a thread. - Filter tool registration and hosted tool specifications before Code Mode and discovery. Match names with their namespaces and require generated tools such as `exec` and `wait` to be explicitly allowed. - Move Guardian reviewer tool selection into the allowlist while retaining feature and sandbox restrictions, with a fallback for older reviewer sessions. ## Testing Add coverage for selected, empty, and absent allowlists across tool sources and Code Mode. Add managed-thread tests verifying advertised tools, rejection of excluded calls, and that replacing extension state after startup cannot change the captured allowlist. GitOrigin-RevId: 33c1722c4241f368963d8385fa0415112e16a72d
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/33c1722c4241f368963d8385fa0415112e16a72d
branch
from
September 15, 2026 14:45
8e9ff96 to
2fdcdea
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/33c1722c4241f368963d8385fa0415112e16a72d
branch
September 15, 2026 14:45
EvenZ2001
temporarily deployed
to
issue-triage
September 15, 2026 14:55 — with
GitHub Actions
Inactive
EvenZ2001
temporarily deployed
to
issue-triage
September 15, 2026 14:55 — with
GitHub Actions
Inactive
EvenZ2001
temporarily deployed
to
issue-triage
September 15, 2026 14:55 — with
GitHub Actions
Inactive
franciscovizu
temporarily deployed
to
issue-triage
September 15, 2026 14:56 — with
GitHub Actions
Inactive
franciscovizu
temporarily deployed
to
issue-triage
September 15, 2026 14:56 — with
GitHub Actions
Inactive
franciscovizu
temporarily deployed
to
issue-triage
September 15, 2026 14:56 — with
GitHub Actions
Inactive
franciscovizu
temporarily deployed
to
issue-triage
September 15, 2026 14:57 — with
GitHub Actions
Inactive
munntjlx
temporarily deployed
to
issue-triage
September 15, 2026 14:58 — with
GitHub Actions
Inactive
munntjlx
temporarily deployed
to
issue-triage
September 15, 2026 14:58 — with
GitHub Actions
Inactive
munntjlx
temporarily deployed
to
issue-triage
September 15, 2026 14:58 — with
GitHub Actions
Inactive
jeffersonlocke
temporarily deployed
to
issue-triage
September 15, 2026 14:59 — with
GitHub Actions
Inactive
jeffersonlocke
temporarily deployed
to
issue-triage
September 15, 2026 14:59 — with
GitHub Actions
Inactive
jeffersonlocke
temporarily deployed
to
issue-triage
September 15, 2026 14:59 — 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.
Add startup tool allowlists for threads
What changed
AllowedToolsto the extension API, captured once at thread startup to restrict which tools can be advertised or executed. An empty list disables all tools; an absent value preserves ordinary tool setup. Callers must supply the list again when resuming a thread.execandwaitto be explicitly allowed.Testing
Add coverage for selected, empty, and absent allowlists across tool sources and Code Mode. Add managed-thread tests verifying advertised tools, rejection of excluded calls, and that replacing extension state after startup cannot change the captured allowlist.