Skip to content

Add startup tool allowlists for threads - #45711

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/33c1722c4241f368963d8385fa0415112e16a72d
Sep 15, 2026
Merged

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

Conversation

@copyberry

@copyberry copyberry Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

Add startup tool allowlists for threads

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.

## 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
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/33c1722c4241f368963d8385fa0415112e16a72d branch from 8e9ff96 to 2fdcdea Compare September 15, 2026 14:45
@copyberry
copyberry Bot merged commit 2fdcdea into main Sep 15, 2026
1 check passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/33c1722c4241f368963d8385fa0415112e16a72d branch September 15, 2026 14:45
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 15, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 2fdcdeaf Deployed Sep 15, 2026 by jeffersonlocke via Identify potential duplicates (all issues) #45754
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.

5 participants