You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/install-for-codex.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,12 +26,12 @@ This will:
26
26
- Sync `humanize`, `humanize-gen-plan`, `humanize-refine-plan`, and `humanize-rlcr` into `${CODEX_HOME:-~/.codex}/skills`
27
27
- Copy runtime dependencies into `${CODEX_HOME:-~/.codex}/skills/humanize`
28
28
- Install/update native Humanize Stop hooks in `${CODEX_HOME:-~/.codex}/hooks.json`
29
-
- Enable the experimental `codex_hooks` feature in `${CODEX_HOME:-~/.codex}/config.toml` when `codex` is available
29
+
- Enable the native `hooks` feature in `${CODEX_HOME:-~/.codex}/config.toml` when `codex` is available
30
30
- Seed `~/.config/humanize/config.json` with a Codex/OpenAI `bitlesson_model` when that key is not already set
31
31
- Mark the install as `provider_mode: "codex-only"` when using `--target codex`
32
32
- Use RLCR defaults: `codex exec` with `gpt-5.5:high`, `codex review` with `gpt-5.5:high`
33
33
34
-
Requires Codex CLI `0.114.0` or newer for native hooks. Older Codex builds are not supported by the Codex install path.
34
+
Requires Codex CLI `0.114.0` or newer for native hooks. The hooks feature was renamed to `hooks`; older Codex builds that still expose `codex_hooks` are not supported by the Codex install path.
35
35
36
36
## Verify
37
37
@@ -70,12 +70,12 @@ Installed files/directories:
70
70
Verify native hooks:
71
71
72
72
```bash
73
-
codex features list | rg codex_hooks
73
+
codex features list | rg '^hooks\s'
74
74
sed -n '1,220p'"${CODEX_HOME:-$HOME/.codex}/hooks.json"
75
75
```
76
76
77
77
Expected:
78
-
-`codex_hooks` is `true`
78
+
-`hooks` is present in `codex features list`
79
79
-`hooks.json` contains `loop-codex-stop-hook.sh`
80
80
-`${XDG_CONFIG_HOME:-~/.config}/humanize/config.json` contains `bitlesson_model` set to a Codex/OpenAI model such as `gpt-5.5`
81
81
- for `--target codex`, `${XDG_CONFIG_HOME:-~/.config}/humanize/config.json` also contains `provider_mode: "codex-only"`
@@ -110,6 +110,8 @@ ls -la "${CODEX_HOME:-$HOME/.codex}/skills/humanize/scripts"
110
110
If native exit gating does not trigger:
111
111
112
112
```bash
113
-
codex features enablecodex_hooks
113
+
codex features enablehooks
114
114
sed -n '1,220p'"${CODEX_HOME:-$HOME/.codex}/hooks.json"
115
115
```
116
+
117
+
If the installer reports that your config or installed Codex still uses `codex_hooks`, upgrade Codex first or change `${CODEX_HOME:-~/.codex}/config.toml` to `[features]\nhooks = true`.
die "Codex CLI with native hooks support is required. Install Codex 0.114.0+ first."
78
87
fi
79
88
80
-
if! codex features list 2>/dev/null | grep -qE '^codex_hooks[[:space:]]';then
81
-
die "Installed Codex CLI does not expose the codex_hooks feature. Humanize Codex install requires Codex 0.114.0+."
89
+
if config_uses_legacy_codex_hooks;then
90
+
die "Codex config uses the legacy feature key 'codex_hooks'. Current Codex uses 'hooks'. Update $CODEX_CONFIG_DIR/config.toml to use 'hooks = true' under [features], or upgrade Codex if 'codex features list' does not show 'hooks'."
91
+
fi
92
+
93
+
local features
94
+
local line
95
+
features="$(CODEX_HOME="$CODEX_CONFIG_DIR" codex features list 2>/dev/null)"|| {
96
+
die "failed to inspect Codex features. Humanize Codex install requires the native 'hooks' feature."
ifprintf'%s\n'"$features"| awk '$1 == "codex_hooks" { found = 1 } END { exit found ? 0 : 1 }';then
106
+
die "Installed Codex exposes only the legacy 'codex_hooks' feature. Humanize now requires the renamed 'hooks' feature. Upgrade Codex, then rerun the installer."
82
107
fi
108
+
109
+
die "Installed Codex CLI does not expose the native 'hooks' feature. Upgrade Codex, then rerun the installer."
83
110
}
84
111
85
112
merge_hooks_json() {
@@ -177,23 +204,28 @@ enable_feature() {
177
204
178
205
[[ "$ENABLE_FEATURE"=="true" ]] ||return 0
179
206
180
-
if CODEX_HOME="$config_dir" codex features enable codex_hooks >/dev/null 2>&1;then
181
-
log "enabled codex_hooks feature in $config_dir/config.toml"
207
+
if [[ "$HOOK_FEATURE_ENABLED"=="true" ]];then
208
+
log "native hooks feature already enabled in $config_dir/config.toml"
209
+
return 0
210
+
fi
211
+
212
+
if CODEX_HOME="$config_dir" codex features enable hooks >/dev/null 2>&1;then
213
+
log "enabled hooks feature in $config_dir/config.toml"
182
214
else
183
-
die "failed to enable codex_hooks feature automatically in $config_dir/config.toml"
215
+
die "failed to enable hooks feature automatically in $config_dir/config.toml"
0 commit comments