Add MCP tool handler support to the hooks engine - #38705
Merged
copyberry[bot] merged 1 commit intoAug 15, 2026
Merged
Conversation
## What changed - Discover synchronous `mcp_tool` hook handlers and invoke their configured MCP server and tool through a supplied executor. - Expand nested hook-event placeholders in MCP tool inputs while preserving JSON types, and process tool output through the existing hook output contract. - Represent hook details as handler-specific metadata in `hooks/list`, including MCP server and tool fields, and show those details in the TUI hooks browser. - Skip unsupported `SessionEnd` MCP hooks and runtimes without MCP invocation support with startup warnings. ## Testing - Cover argument expansion, missing placeholders, MCP invocation and hook decisions, discovery warnings, `hooks/list` metadata, and TUI rendering. GitOrigin-RevId: 295b845471fe92bd7ad7cd272fbcd2c3713912e0
copyberry
Bot
force-pushed
the
copyberry/codex-internal-to-codex-oss/295b845471fe92bd7ad7cd272fbcd2c3713912e0
branch
from
August 15, 2026 05:54
1959100 to
85fc4de
Compare
copyberry
Bot
deleted the
copyberry/codex-internal-to-codex-oss/295b845471fe92bd7ad7cd272fbcd2c3713912e0
branch
August 15, 2026 05:55
2batsloverandomartifactromps-dotcom
deployed
to
issue-triage
August 15, 2026 06:24 — with
GitHub Actions
Active
2batsloverandomartifactromps-dotcom
deployed
to
issue-triage
August 15, 2026 06:24 — with
GitHub Actions
Active
2batsloverandomartifactromps-dotcom
deployed
to
issue-triage
August 15, 2026 06:24 — with
GitHub Actions
Active
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 MCP tool handler support to the hooks engine
What changed
mcp_toolhook handlers and invoke their configured MCP server and tool through a supplied executor.hooks/list, including MCP server and tool fields, and show those details in the TUI hooks browser.SessionEndMCP hooks and runtimes without MCP invocation support with startup warnings.Testing
hooks/listmetadata, and TUI rendering.