mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-23 00:21:14 +01:00
gstack's Codex hooks keep working with unusual folder paths and after uninstall (GST-3197) (#4528)
gstack's Codex hooks no longer block every prompt when your Codex folder's path has a `(` or `&`, and uninstall keeps your own Codex hooks trusted. Why: both broke Codex sessions; setup also now matches Codex's hook rules, and the /review checklist on Codex reads shell commands more carefully. Nothing to do: plain paths keep the exact hook command they had, so Codex asks for no new trust. Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/specialist-batched#1 reader=red-team Review-Finding: lib/codex-rollout.ts:217:functional-contract reader=qa
This commit is contained in:
1 parent
bd449234aa
commit
9610ba43db
11 files changed
+557
-50
No files matched your search
+17
-4
@@ -132,10 +132,23 @@ the skill-routing UserPromptSubmit hook and the destructive-command PreToolUse h
|
||||
on every matching event once the install directory is gone.
|
||||
|
||||
On Codex, manual removal also leaves gstack's hooks in
|
||||
`${CODEX_HOME:-~/.codex}/hooks.json`. Delete each matcher group whose command
|
||||
path points into `skills/gstack/hosts/codex/hooks/` (the skill-routing
|
||||
`UserPromptSubmit` hook and the destructive-command `PreToolUse` hook), and keep
|
||||
the rest of the file as it is.
|
||||
`${CODEX_HOME:-~/.codex}/hooks.json`: the skill-routing `UserPromptSubmit`
|
||||
hook, the destructive-command `PreToolUse` hook and the skill-contract `Stop`
|
||||
hook. Delete only gstack's handlers, the entries in a group's `hooks` list
|
||||
whose `command` points into `skills/gstack/hosts/codex/hooks/`, and keep your
|
||||
own handlers and the rest of the file as they are. Codex remembers which hooks
|
||||
you trusted by their position, so:
|
||||
|
||||
- If gstack's handler is the only one in its group and your own groups come
|
||||
after it in the same event, leave the group in place as `{ "hooks": [] }`.
|
||||
Your hooks keep their positions and stay trusted. (The uninstall script does
|
||||
this for you.)
|
||||
- If gstack's group is the last one in that event and holds only gstack's
|
||||
handlers, delete the whole group. If it also holds one of yours, delete only
|
||||
gstack's handler.
|
||||
- If one of your handlers comes after gstack's inside the same group, deleting
|
||||
gstack's handler moves yours up one place, so trust it again in Codex with
|
||||
`/hooks`.
|
||||
|
||||
If the OpenClaw or Hermes [start hook](hosts.md#start-hook) is on (the default for a new registration),
|
||||
manual removal also leaves its `gstack-start` plugin turned on. Turn it off
|
||||
|
||||
Reference in new issue
Block a user