Emit valid JSON objects for Codex hook reports - #49
Merged
Merged
Conversation
Codex rejects a bare list on stdout for a PostToolUse hook and reported invalid JSON output. Serialize the cleanup report as a hookSpecificOutput object for PostToolUse and as a systemMessage for the other events, and leave the CLI and Claude output unchanged. The deletion policy is not touched. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mkvy5MtGG89cNLuQSU8xLe Signed-off-by: cdeust <cdeust@icloud.com>
cdeust
force-pushed
the
fix/codex-hook-output
branch
from
September 26, 2026 20:41
2f816f5 to
93754a8
Compare
This was referenced Sep 26, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
hookSpecificOutputobject for PostToolUse and asystemMessagefor the other Codex events. CLI and Claude output are unchanged, and the deletion policy is not touched.feat/disk-hygiene-plugin. Merge Add the disk-hygiene plugin for session-owned cleanup #48 first, then retarget this PR tomain.Test plan
tests/test_hook_output_protocol.py: 7 tests pass locally, four of them failing before the change.🤖 Generated with Claude Code
https://claude.ai/code/session_01Mkvy5MtGG89cNLuQSU8xLe