Skip to content

Conversation

provencher
Copy link

@provencher provencher commented Oct 9, 2025

Summary

Adds a new --disable-builtin-tools CLI flag to codex exec that allows users to disable all built-in tools (shell, file operations, plan, apply_patch) while keeping MCP tools and web search available.

This is useful for running codex exec in headless mode with only custom MCP tools, enabling better control over the agent's capabilities.

Changes

  • Add --disable-builtin-tools CLI flag to exec
  • Thread flag through ConfigOverrides and Config
  • Update ToolsConfig to conditionally register built-in tools based on flag
  • Keep MCP tools, web_search, and view_image available when flag is set

Testing

Verified the flag works correctly:

  • With flag: Agent uses only MCP tools (no built-in shell/file tools)
  • Without flag: Agent has access to all built-in tools as normal

Built and tested successfully with both configurations.

This adds a new CLI flag that allows users to disable all built-in tools
(shell, file operations, plan, apply_patch) while keeping MCP tools and
web search available. This is useful for running codex exec in headless
mode with only custom MCP tools.

Changes:
- Add --disable-builtin-tools CLI flag to exec
- Thread flag through ConfigOverrides and Config
- Update ToolsConfig to conditionally register built-in tools
- Keep MCP tools, web_search, and view_image available

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Copy link

github-actions bot commented Oct 9, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@provencher
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@provencher
Copy link
Author

recheck

github-actions bot added a commit that referenced this pull request Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants