Repository navigation
fix(plugins): detect Codex Plan mode from the transcript - #399
Merged
Merged
Conversation
Codex fills the Stop payload's permission_mode from the approval policy
("default" or "bypassPermissions"), never "plan", so the revdiff-planning
Stop hook skipped every Codex plan. The hook now also accepts a turn whose
transcript task_started event, matched by turn_id, carries
collaboration_mode_kind "plan". The transcript is located with the same
session checks as the message fallback; when it is missing, mismatched or
names another mode, the turn is skipped silently.
Fixed #398
golangci-lint 2.15.0 reports the bare syscall.Errno return under wrapcheck.
A transcript-confirmed Plan turn now reaches the message fallback, so an undecodable byte past the first read buffer raised UnicodeDecodeError out of the hook instead of warning. README and the site still said missing or mismatched event data warns; for Codex such a turn is now skipped silently.
… hook the #398 fix keeps a `permission_mode == "plan"` branch that Codex never satisfies. Recorded so the cleanup can be decided later.
Deploying revdiff with
|
| Latest commit: |
a925862
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://51ad2a5e.revdiff.pages.dev |
| Branch Preview URL: | https://codex-plan-mode-transcript.revdiff.pages.dev |
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.
Codex fills the Stop hook payload's
permission_modefrom the approval policy (defaultorbypassPermissions), neverplan, so the revdiff-planning Codex hook skipped every plan and automatic review never ran. Codex records the mode only in the transcript, on the turn'stask_startedevent ascollaboration_mode_kind.task_startedrecord for the event'sturn_idcarriescollaboration_mode_kind: plan. Thepermission_mode == "plan"check stays<proposed_plan>stay ignored and normal turns never warnapp/ptybridge, flagged by golangci-lint 2.15.0 wrapcheckpermission_modecheckFixed #398