Skip to content

Add MCP tool handler support to the hooks engine - #38705

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/295b845471fe92bd7ad7cd272fbcd2c3713912e0
Aug 15, 2026
Merged

Add MCP tool handler support to the hooks engine#38705
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/295b845471fe92bd7ad7cd272fbcd2c3713912e0

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 15, 2026

Copy link
Copy Markdown

Add MCP tool handler support to the hooks engine

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.

## 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
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/295b845471fe92bd7ad7cd272fbcd2c3713912e0 branch from 1959100 to 85fc4de Compare August 15, 2026 05:54
@copyberry
copyberry Bot merged commit 85fc4de into main Aug 15, 2026
28 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/295b845471fe92bd7ad7cd272fbcd2c3713912e0 branch August 15, 2026 05:55
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 15, 2026
@noor13a
noor13a deployed to issue-triage August 15, 2026 06:01 — with GitHub Actions Active
@noor13a
noor13a deployed to issue-triage August 15, 2026 06:01 — with GitHub Actions Active
@noor13a
noor13a deployed to issue-triage August 15, 2026 06:01 — with GitHub Actions Active
@awhitford
awhitford deployed to issue-triage August 15, 2026 06:07 — with GitHub Actions Active
@awhitford
awhitford deployed to issue-triage August 15, 2026 06:07 — with GitHub Actions Active
@awhitford
awhitford deployed to issue-triage August 15, 2026 06:07 — with GitHub Actions Active
@awhitford
awhitford deployed to issue-triage August 15, 2026 06:08 — with GitHub Actions Active
@nos1609
nos1609 deployed to issue-triage August 15, 2026 06:12 — with GitHub Actions Active
@nos1609
nos1609 deployed to issue-triage August 15, 2026 06:12 — with GitHub Actions Active
@nos1609
nos1609 deployed to issue-triage August 15, 2026 06:12 — with GitHub Actions Active
@andrii-z4i
andrii-z4i deployed to issue-triage August 15, 2026 06:20 — with GitHub Actions Active
@andrii-z4i
andrii-z4i deployed to issue-triage August 15, 2026 06:20 — with GitHub Actions Active
@andrii-z4i
andrii-z4i deployed to issue-triage August 15, 2026 06:20 — with GitHub Actions Active
@xullul
xullul deployed to issue-triage August 15, 2026 06:20 — with GitHub Actions Active
@xullul
xullul deployed to issue-triage August 15, 2026 06:20 — with GitHub Actions Active
@xullul
xullul deployed to issue-triage August 15, 2026 06:20 — with GitHub Actions Active
@Isajunsei
Isajunsei deployed to issue-triage August 15, 2026 06:48 — with GitHub Actions Active
@Isajunsei
Isajunsei deployed to issue-triage August 15, 2026 06:48 — with GitHub Actions Active
@Isajunsei
Isajunsei deployed to issue-triage August 15, 2026 06:48 — with GitHub Actions Active
@charonwang
charonwang deployed to issue-triage August 15, 2026 07:27 — with GitHub Actions Active
@charonwang
charonwang deployed to issue-triage August 15, 2026 07:27 — with GitHub Actions Active
@charonwang
charonwang deployed to issue-triage August 15, 2026 07:27 — with GitHub Actions Active
@Kitsunetic
Kitsunetic deployed to issue-triage August 15, 2026 07:42 — with GitHub Actions Active
@Kitsunetic
Kitsunetic deployed to issue-triage August 15, 2026 07:43 — with GitHub Actions Active
@cpprust
cpprust deployed to issue-triage August 15, 2026 07:51 — with GitHub Actions Active
@cpprust
cpprust deployed to issue-triage August 15, 2026 07:51 — with GitHub Actions Active
@cpprust
cpprust deployed to issue-triage August 15, 2026 07:51 — with GitHub Actions Active
@cpprust
cpprust deployed to issue-triage August 15, 2026 07:52 — with GitHub Actions Active
@DrahcirHere
DrahcirHere deployed to issue-triage August 15, 2026 08:08 — with GitHub Actions Active
@DrahcirHere
DrahcirHere deployed to issue-triage August 15, 2026 08:08 — with GitHub Actions Active
@DrahcirHere
DrahcirHere deployed to issue-triage August 15, 2026 08:08 — with GitHub Actions Active
@chenjunyan1
chenjunyan1 deployed to issue-triage August 15, 2026 08:20 — with GitHub Actions Active
@chenjunyan1
chenjunyan1 deployed to issue-triage August 15, 2026 08:20 — with GitHub Actions Active
@chenjunyan1
chenjunyan1 deployed to issue-triage August 15, 2026 08:20 — with GitHub Actions Active
@thinker0
thinker0 deployed to issue-triage August 15, 2026 08:25 — with GitHub Actions Active
@thinker0
thinker0 deployed to issue-triage August 15, 2026 08:25 — with GitHub Actions Active
@thinker0
thinker0 deployed to issue-triage August 15, 2026 08:25 — with GitHub Actions Active
@thinker0
thinker0 deployed to issue-triage August 15, 2026 08:26 — with GitHub Actions Active
@pjasicek
pjasicek deployed to issue-triage August 15, 2026 08:30 — with GitHub Actions Active
@pjasicek
pjasicek deployed to issue-triage August 15, 2026 08:30 — with GitHub Actions Active
@pjasicek
pjasicek deployed to issue-triage August 15, 2026 08:30 — with GitHub Actions Active
@Faicalom
Faicalom deployed to issue-triage August 15, 2026 08:32 — with GitHub Actions Active
@Faicalom
Faicalom deployed to issue-triage August 15, 2026 08:32 — with GitHub Actions Active
@Faicalom
Faicalom deployed to issue-triage August 15, 2026 08:32 — with GitHub Actions Active
@saaassin13
saaassin13 deployed to issue-triage August 15, 2026 08:52 — with GitHub Actions Active
@saaassin13
saaassin13 deployed to issue-triage August 15, 2026 08:52 — with GitHub Actions Active
@saaassin13
saaassin13 deployed to issue-triage August 15, 2026 08:52 — with GitHub Actions Active
@chenaptx
chenaptx deployed to issue-triage August 15, 2026 09:17 — with GitHub Actions Active
@chenaptx
chenaptx deployed to issue-triage August 15, 2026 09:17 — with GitHub Actions Active
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.