Skip to content

Support disabling tool suggest for specific tools.#20072

Merged
mzeng-openai merged 5 commits into
mainfrom
dev/mzeng/tool_suggest_dont_show_again
Apr 29, 2026
Merged

Support disabling tool suggest for specific tools.#20072
mzeng-openai merged 5 commits into
mainfrom
dev/mzeng/tool_suggest_dont_show_again

Conversation

@mzeng-openai

Copy link
Copy Markdown
Collaborator

Summary

  • Add disable_tool_suggest to app and plugin config, schema, and TypeScript output
  • Exclude disabled connectors and plugins from tool suggestion discovery
  • Persist "never show again" tool-suggestion choices back into config.toml
  • Update config docs and add coverage for connector and plugin suppression

Testing

  • Added and updated unit tests for config persistence and tool-suggest filtering
  • Not run (not requested)

@mzeng-openai mzeng-openai changed the title Add disable_tool_suggest config for app and plugin suggestions Support disabling tool suggest for specific tools. Apr 28, 2026
@mzeng-openai mzeng-openai marked this pull request as ready for review April 28, 2026 19:59
@mzeng-openai mzeng-openai requested a review from a team as a code owner April 28, 2026 19:59
@mzeng-openai mzeng-openai requested a review from xl-openai April 28, 2026 19:59

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 712d4ce659

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread codex-rs/core/src/tools/handlers/tool_suggest.rs Outdated
@mzeng-openai mzeng-openai requested a review from sayan-oai April 28, 2026 20:14
Comment on lines +133 to +135
if let Some(response) = response.as_ref() {
maybe_persist_tool_suggest_disable(&session, &turn, &tool, response).await;
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if the elicitation action is Accept and persist = "always"? should we gate on action Decline?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, we don't need to persist accept.
I've also refactored the config shape since codex found out that creating ghost entries for apps and plugins can cause more side effects than I thought. Right now consolidating the disabled tool list under [tool_suggest]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha. is the list only created in user-level config, or does it map back to the config layer the tool comes from?

codex says: if the list always writes to user config, a list defined in a higher-precedence layer (like project-level) would clobber the user config list because they don't merge.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense! I think it's more of a "how to merge" issue rather than config location thing, added logic to support merging the disabled tool list from higher precedence.

@mzeng-openai mzeng-openai enabled auto-merge (squash) April 28, 2026 22:37
@mzeng-openai mzeng-openai disabled auto-merge April 28, 2026 22:37
@mzeng-openai

Copy link
Copy Markdown
Collaborator Author

Made some small edits so that we can hot-reload any disabled_tools changes after the tool suggest elicitation.

@mzeng-openai mzeng-openai enabled auto-merge (squash) April 28, 2026 22:51
@mzeng-openai mzeng-openai merged commit ebdf3a8 into main Apr 29, 2026
35 of 36 checks passed
@mzeng-openai mzeng-openai deleted the dev/mzeng/tool_suggest_dont_show_again branch April 29, 2026 00:19
@github-actions github-actions Bot locked and limited conversation to collaborators Apr 29, 2026
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.

4 participants