feat: install codex self-serve hooks#320
Conversation
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
8bb272c to
8814da9
Compare
3ebd4b5 to
6fd0a97
Compare
8814da9 to
e573160
Compare
6fd0a97 to
9455fff
Compare
e573160 to
67914ca
Compare
9455fff to
0e340bd
Compare
67914ca to
9bd0124
Compare
0e340bd to
e4d2624
Compare
Greptile SummaryThis PR adds Codex hook management to self-serve setup. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (3): Last reviewed commit: "feat: install codex self-serve hooks" | Re-trigger Greptile |
9bd0124 to
7b65108
Compare
e4d2624 to
78328dc
Compare
78328dc to
1090bca
Compare
|
@greptile check again |
hasandemirkiran
left a comment
There was a problem hiding this comment.
Most of my comments land here; the headline is the Codex event set, flagged inline on SupportedEvents.
| return fmt.Errorf("install Codex hooks: %w\n\nFix or move ~/.codex/hooks.json, then rerun setup.", err) | ||
| } | ||
| fmt.Fprintf(opts.Stdout, " ✓ Codex hooks installed (%s)\n", codexHooksPath) | ||
| fmt.Fprintln(opts.Stderr, "note: Codex hooks require review before they run; open `/hooks` in Codex to trust the Kontext hooks.") |
There was a problem hiding this comment.
Good call pointing them at /hooks to trust the hooks. The gap: Codex hooks are still experimental and off by default — they only run with [features] codex_hooks = true in ~/.codex/config.toml. As written, we install them and tell the user to trust them, but if that flag is not set, nothing fires and we silently do not observe Codex at all. Could we detect the flag and warn, or at least name it in this note?
There was a problem hiding this comment.
Resolved in #320 PR notes: current Codex hooks are enabled by default, and codex_hooks is now a deprecated alias for disabling/enabling hooks behavior. The setup note remains focused on the action users still need after install: open /hooks and trust the Kontext hooks.
There was a problem hiding this comment.
Thanks for digging in on this! One thing still nags me on the default — the OpenAI hook docs read as opt-in to me: codex_hooks is deprecated in favor of [features].hooks, but hooks seem to be off by default and silent until that key is set (https://developers.openai.com/codex/hooks). If that holds, someone who runs setup and trusts the hooks via /hooks but never sets [features].hooks = true would silently go unobserved. Are you seeing them on by default in the Codex version we target? If it's still opt-in, might be worth naming [features].hooks in the note so folks aren't left uncovered without realizing it.
7b65108 to
9c59eee
Compare
1090bca to
0de8a0f
Compare
|
@greptile review given all changes and updates and review |

Summary
~/.codex/hooks.json.Stopas turn-scoped telemetry.Review notes
async: true; current Codex behavior skips async handlers rather than running them in the background./hookstrust review remains the user action setup needs to call out.Verification
go test ./...