core: allow excluding tool namespaces from code mode#26320
Merged
Conversation
9a073ee to
f5ada08
Compare
pakrym-oai
approved these changes
Jun 4, 2026
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.
Why
Research and training setups need to control which tool namespaces appear inside code mode's nested
toolssurface without disabling those tools entirely. This makes it possible to train against a deliberately reduced nested-tool setup while preserving the normal direct and deferred tool paths.What
Extend
features.code_modeto accept structured configuration while preserving the existing boolean syntax.Add an exact
excluded_tool_namespaceslist under[features.code_mode]:Filter matching canonical
ToolNamenamespaces when constructing code mode's nested router and code-mode-specific direct tool descriptions.Keep excluded tools registered, directly exposed in mixed code mode, and discoverable through top-level
tool_searchwhen otherwise eligible.Derive deferred nested-tool guidance after namespace filtering so the
execdescription does not advertise excluded-only deferred tools.Preserve the boolean/table representation when materializing config locks and update the generated config schema.
Testing
just test -p codex-featuresjust test -p codex-configjust test -p codex-core load_config_resolves_code_mode_configjust test -p codex-core lock_contains_prompts_and_materializes_featuresjust test -p codex-core excluded_deferred_namespaces_do_not_enable_nested_tool_guidancejust test -p codex-core code_mode_excludes_configured_nested_tool_namespacescargo check -p codex-thread-manager-sample