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
fix: eliminate 3 security hook trigger patterns in /codex and /autoplan (issue #1329)
Pattern 1 — source with tilde path:
Replace `source ~/.claude/skills/gstack/bin/gstack-codex-probe` + function calls
with direct `~/.claude/skills/gstack/bin/gstack-codex-*` binary invocations in
both codex/SKILL.md.tmpl and autoplan/SKILL.md.tmpl.
Pattern 3 — bare cd "$_REPO_ROOT":
Replace bare `cd "$_REPO_ROOT"` lines with `-C "$_REPO_ROOT"` flag on codex commands
(review bare path, exec custom path) and drop the cd entirely for exec resume
(session context preserves directory; -C is not a supported flag for resume).
Pattern 4 — inline python3 -u -c with #-comments:
Replace all three inline JSONL parser blocks (Challenge, Consult new-session,
Consult resume) with pipe to `~/.claude/skills/gstack/bin/gstack-codex-jsonl-parser`.
Also regenerates .kiro/.cursor/.openclaw etc host-specific SKILL.md files via
`bun run scripts/gen-skill-docs.ts --host all`.
Tests: 38 new tests in codex-hardening.test.ts guarding all three patterns and
verifying standalone binary behaviour. Updated skill-validation.test.ts to check
for the jsonl-parser binary instead of the old $PYTHON_CMD inline pattern.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,20 @@
1
1
# Changelog
2
2
3
+
## [1.48.2.0] - 2026-05-28
4
+
5
+
**`/codex` and `/autoplan` replace inline python streaming parsers with a standalone binary, eliminating security hook triggers.**
6
+
7
+
The `gstack-codex-jsonl-parser` binary handles JSONL streaming from `codex exec --json` in both challenge (`--mode challenge`) and consult (`--mode consult`) modes. Three shell invocation patterns that consistently triggered pre-tool-use security hooks in `/codex` and `/autoplan` are removed or replaced.
8
+
9
+
### Itemized changes
10
+
11
+
#### Changed
12
+
- `codex/SKILL.md.tmpl` + `codex/SKILL.md`: three inline python blocks replaced with `gstack-codex-jsonl-parser` binary invocations; python availability check updated to `if ! command -v python3`
13
+
- `autoplan/SKILL.md.tmpl` + `autoplan/SKILL.md`: same pattern fixes
14
+
15
+
#### Added
16
+
- `bin/gstack-codex-jsonl-parser`: standalone python3 binary handling JSONL streaming in challenge and consult modes
17
+
3
18
## [1.48.0.0] - 2026-05-26
4
19
5
20
## **Agents stop dropping AskUserQuestion options when there are 5+.** A new canonical preamble rule + runtime gate makes Conductor's 4-option cap a split-or-batch decision, not a silent trim.
echo"[codex-unavailable: auth missing] — proceeding with Claude subagent only. Run \`codex login\` or set \$CODEX_API_KEY to enable dual-voice review."
1058
1054
_CODEX_AVAILABLE=false
1059
1055
else
1060
-
_gstack_codex_version_check# non-blocking warn if known-bad
1056
+
~/.claude/skills/gstack/bin/gstack-codex-version-check# non-blocking warn if known-bad
1061
1057
_CODEX_AVAILABLE=true
1062
1058
fi
1063
1059
```
@@ -1091,7 +1087,7 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
1091
1087
**Codex CEO voice** (via Bash):
1092
1088
```bash
1093
1089
_REPO_ROOT=$(git rev-parse --show-toplevel)|| { echo"ERROR: not in a git repo">&2;exit 1; }
1094
-
_gstack_codex_timeout_wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
1090
+
~/.claude/skills/gstack/bin/gstack-codex-timeout-wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
1095
1091
1096
1092
You are a CEO/founder advisor reviewing a development plan.
1097
1093
Challenge the strategic foundations: Are the premises valid or assumed? Is this the
@@ -1102,8 +1098,8 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
echo"[codex stalled past 10 minutes — tagging as [codex-unavailable] for this phase and proceeding with Claude subagent only]"
1108
1104
fi
1109
1105
```
@@ -1208,7 +1204,7 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
1208
1204
**Codex design voice** (via Bash):
1209
1205
```bash
1210
1206
_REPO_ROOT=$(git rev-parse --show-toplevel)|| { echo"ERROR: not in a git repo">&2;exit 1; }
1211
-
_gstack_codex_timeout_wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
1207
+
~/.claude/skills/gstack/bin/gstack-codex-timeout-wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
1212
1208
1213
1209
Read the plan file at <plan_path>. Evaluate this plan's
1214
1210
UI/UX design decisions.
@@ -1225,8 +1221,8 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
1225
1221
Be opinionated. No hedging." -C "$_REPO_ROOT" -s read-only --enable web_search_cached < /dev/null
echo"[codex stalled past 10 minutes — tagging as [codex-unavailable] for this phase and proceeding with Claude subagent only]"
1231
1227
fi
1232
1228
```
@@ -1289,7 +1285,7 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
1289
1285
**Codex eng voice** (via Bash):
1290
1286
```bash
1291
1287
_REPO_ROOT=$(git rev-parse --show-toplevel)|| { echo"ERROR: not in a git repo">&2;exit 1; }
1292
-
_gstack_codex_timeout_wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
1288
+
~/.claude/skills/gstack/bin/gstack-codex-timeout-wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
1293
1289
1294
1290
Review this plan for architectural issues, missing edge cases,
1295
1291
and hidden complexity. Be adversarial.
@@ -1301,8 +1297,8 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
_REPO_ROOT=$(git rev-parse --show-toplevel)|| { echo"ERROR: not in a git repo">&2;exit 1; }
1413
-
_gstack_codex_timeout_wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
1409
+
~/.claude/skills/gstack/bin/gstack-codex-timeout-wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
1414
1410
1415
1411
Read the plan file at <plan_path>. Evaluate this plan's developer experience.
Be adversarial. Think like a developer who is evaluating this against 3 competitors." -C "$_REPO_ROOT" -s read-only --enable web_search_cached < /dev/null
echo "[codex-unavailable: auth missing] — proceeding with Claude subagent only. Run \`codex login\` or set \$CODEX_API_KEY to enable dual-voice review."
257
253
_CODEX_AVAILABLE=false
258
254
else
259
-
_gstack_codex_version_check # non-blocking warn if known-bad
255
+
~/.claude/skills/gstack/bin/gstack-codex-version-check # non-blocking warn if known-bad
260
256
_CODEX_AVAILABLE=true
261
257
fi
262
258
```
@@ -290,7 +286,7 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
290
286
**Codex CEO voice** (via Bash):
291
287
```bash
292
288
_REPO_ROOT=$(git rev-parse --show-toplevel) || { echo "ERROR: not in a git repo" >&2; exit 1; }
293
-
_gstack_codex_timeout_wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
289
+
~/.claude/skills/gstack/bin/gstack-codex-timeout-wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
294
290
295
291
You are a CEO/founder advisor reviewing a development plan.
296
292
Challenge the strategic foundations: Are the premises valid or assumed? Is this the
@@ -301,8 +297,8 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
echo "[codex stalled past 10 minutes — tagging as [codex-unavailable] for this phase and proceeding with Claude subagent only]"
307
303
fi
308
304
```
@@ -407,7 +403,7 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
407
403
**Codex design voice** (via Bash):
408
404
```bash
409
405
_REPO_ROOT=$(git rev-parse --show-toplevel) || { echo "ERROR: not in a git repo" >&2; exit 1; }
410
-
_gstack_codex_timeout_wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
406
+
~/.claude/skills/gstack/bin/gstack-codex-timeout-wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
411
407
412
408
Read the plan file at <plan_path>. Evaluate this plan's
413
409
UI/UX design decisions.
@@ -424,8 +420,8 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
424
420
Be opinionated. No hedging." -C "$_REPO_ROOT" -s read-only --enable web_search_cached < /dev/null
echo "[codex stalled past 10 minutes — tagging as [codex-unavailable] for this phase and proceeding with Claude subagent only]"
430
426
fi
431
427
```
@@ -488,7 +484,7 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
488
484
**Codex eng voice** (via Bash):
489
485
```bash
490
486
_REPO_ROOT=$(git rev-parse --show-toplevel) || { echo "ERROR: not in a git repo" >&2; exit 1; }
491
-
_gstack_codex_timeout_wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
487
+
~/.claude/skills/gstack/bin/gstack-codex-timeout-wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
492
488
493
489
Review this plan for architectural issues, missing edge cases,
494
490
and hidden complexity. Be adversarial.
@@ -500,8 +496,8 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
_REPO_ROOT=$(git rev-parse --show-toplevel) || { echo "ERROR: not in a git repo" >&2; exit 1; }
612
-
_gstack_codex_timeout_wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
608
+
~/.claude/skills/gstack/bin/gstack-codex-timeout-wrapper 600 codex exec"IMPORTANT: Do NOT read or execute any SKILL.md files or files in skill definition directories (paths containing skills/gstack). These are AI assistant skill definitions meant for a different system. Stay focused on repository code only.
613
609
614
610
Read the plan file at <plan_path>. Evaluate this plan's developer experience.
Be adversarial. Think like a developer who is evaluating this against 3 competitors." -C "$_REPO_ROOT" -s read-only --enable web_search_cached < /dev/null
0 commit comments