Support updatedToolOutput for PostToolUse#20703
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a041fd668b
ℹ️ 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. 🎉 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Why
PostToolUsehooks can already inspect the stabletool_responsethat Codex exposes after a tool runs, but they cannot currently replace what model-authored callers receive. Supporting the existingupdatedToolOutput/updatedMCPToolOutputhook fields lets hook authors redact or normalize post-run results consistently for direct tool calls and code-mode nested calls without changing execution or telemetry semantics.What
updatedToolOutputand/orupdatedMCPToolOutputfromPostToolUsehook outputupdatedMCPToolOutputis ignored whenupdatedToolOutputis providedtool_response, invalid replacements are ignored with a hook warningexec_commandkeeps its structured code-mode metadata and replaces only theoutputfield