Skip to content

fix(codex): $PLUGIN_ROOT SessionStart hook + multi-host audit remediation (0.21.0)#65

Merged
cofin merged 4 commits into
mainfrom
fix/codex-again
Jun 6, 2026
Merged

fix(codex): $PLUGIN_ROOT SessionStart hook + multi-host audit remediation (0.21.0)#65
cofin merged 4 commits into
mainfrom
fix/codex-again

Conversation

@cofin

@cofin cofin commented Jun 6, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes the Codex SessionStart hook (#64) and the useBeads gating gap (#53), and lands a full multi-host audit remediation verified against the June 2026 state of every host. Releases 0.21.0.

Fixes #64
Fixes #53

What changed

Codex SessionStart hook (#64)

  • hooks/hooks-codex.json + .codex/hooks.json anchor the command to ${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-.}} with the bun || node || bash ladder and a FLOW_HOST=codex signal — no more Gemini ${extensionPath}${/} tokens (bad substitution). Works for both installed-plugin and in-repo project layers.
  • sync-codex-package.py emits the Codex-native manifest over the package's auto-discovered hooks/hooks.json. New validate_codex_hook_commands guard + tests.

Beads gating (#53)

  • The "Beads mode" gate is now on every command/skill/agent prompt that invokes bd (18 previously-ungated sites). Disabling Beads via useBeads=false is honored everywhere, not just in detect-env.
  • tests/test_beads_gating.py guards against regressions.

Flow is a skill, not a CLI

  • SessionStart context + every instruction surface (CLAUDE/AGENTS/GEMINI.md, flow SKILLs) state there is no flow binary; never run flow sync/flow prd as shell commands — use the skill or /flow:*.

/flow:sync semantics

  • /flow:sync ALWAYS writes the reconciled markdown to disk (mandatory) for every markdown file under .agents/specs/<flow_id>/, not just spec.md. "Sync"/"export" means markdown ↔ Beads identical reality — never bd dolt.

Grill-style planning (adopted from mattpocock/skills, not copied)

  • flow-planning gains an "Interrogate Before Finalizing (Grill)" discipline (one question at a time, recommended answers, explore-the-repo-first, challenge against domain language, handoff-ready output). Pointers in flow-refine/plan/prd.

Package drift + modernization + CI

  • Regenerate plugins/flow/ (tool skills 62 → 17). opencode agents → permission: object. Antigravity target (docs/antigravity.md) + docs/host-conformance-matrix.md. Force UTF-8 in validate-claude-manifest.py for Windows runners.

Validation

  • make check green on the full matrix (ubuntu + windows × py3.11/3.12).
  • 54 tests pass. Both Codex hook scenarios empirically simulated.

Issue status

cofin added 3 commits June 6, 2026 19:06
…tion (0.21.0)

Codex SessionStart hook was broken for installed plugins: the manifest used a
session-cwd-relative path that can't resolve once installed, and the auto-
discovered package hooks/hooks.json carried Gemini ${extensionPath}${/} tokens
that bash can't expand (GH #64, flow-9qx). Also resolves package skill drift and
modernizes host configs against the June 2026 platform state.

Codex hooks
- New hooks/hooks-codex.json + updated .codex/hooks.json anchor to
  ${PLUGIN_ROOT:-${CLAUDE_PLUGIN_ROOT:-.}} with the bun||node||bash ladder and a
  FLOW_HOST=codex signal so both installed and in-repo project layers emit the
  correct hookSpecificOutput payload.
- sync-codex-package.py emits the Codex-native manifest over the package's
  auto-discovered hooks/hooks.json (Gemini still installs from the repo root).
- session-start.{sh,ps1} detect Codex (PLUGIN_ROOT/CODEX_PLUGIN_ROOT) before
  Claude and honor an explicit FLOW_HOST override.
- New validate_codex_hook_commands guard: rejects Gemini tokens, requires
  $PLUGIN_ROOT in every Codex-consumed manifest.

Package drift
- Regenerate plugins/flow/ from source: tool skills removed (62 -> 17) to match
  the prior relocation commit.

Modernization
- opencode agents migrate boolean tools map -> permission object; validate-skills
  accepts the new schema.
- Add Antigravity CLI target (docs/antigravity.md) reusing the Gemini assets.
- Add docs/host-conformance-matrix.md; refresh multi-host-plugin-patterns.md.

Version: minor bump 0.20.5 -> 0.21.0 via make release; 8 manifests in sync.
Tests: 53 passing; make check green.
claude plugin validate emits Unicode (✔/❯/⚠) that Windows' default cp1252
codec cannot decode, crashing the subprocess reader thread (and the stdout
write-back). Force UTF-8 with errors=replace on both the capture and the
script's own stdout/stderr streams.
@cofin cofin changed the title feat: skill and plugin updates fix(codex): $PLUGIN_ROOT SessionStart hook + multi-host audit remediation (0.21.0) Jun 6, 2026
…s a skill" guards, grill planning

Beads gating (#53)
- Add the "Beads mode" gate to every command/skill/agent prompt that invokes
  bd (18 previously-ungated sites: flow-revert/validate, revert/task/revise
  TOMLs, flow/SKILL.md, flow-execution/flow-setup/flow-sync-status SKILLs, and
  the flow reference docs). Disabling Beads via useBeads=false is now honored
  everywhere, not just in detect-env.
- New tests/test_beads_gating.py guards against regressions (per-file grep).

Flow is a skill, not a CLI
- The SessionStart context (detect-env.{sh,ps1}) and every instruction surface
  (CLAUDE.md, AGENTS.md, GEMINI.md, flow + lifecycle SKILLs) now state plainly
  that there is no `flow` binary; never run `flow sync`/`flow prd` as shell
  commands — invoke the skill or use /flow:* slash commands.

/flow:sync semantics
- Make explicit that /flow:sync ALWAYS writes the reconciled markdown to disk
  (mandatory) for EVERY markdown file under .agents/specs/<flow_id>/ (spec.md,
  learnings.md, ...), not just spec.md, and that "sync"/"export" means
  reconciling markdown <-> Beads to identical reality — never `bd dolt`.

Grill-style planning (adopted from mattpocock/skills, not copied)
- flow-planning gains an "Interrogate Before Finalizing (Grill)" discipline:
  one question at a time with recommended answers, explore the repo instead of
  asking, challenge against patterns.md/knowledge domain language, and treat the
  finished worksheet as a handoff. Pointers added to flow-refine/plan/prd.

make check green; 54 tests pass.
@cofin cofin merged commit 65c2f99 into main Jun 6, 2026
4 checks passed
@cofin cofin deleted the fix/codex-again branch June 6, 2026 20:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant