feat: configure Codex Graphify approval profile#1
Merged
Conversation
added 23 commits
July 9, 2026 14:56
This was referenced Jul 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
Configure Codex approval-profile and graphify hook for firstmate
What Changed
fm-spawn.shto launch Codex tasks through the repo-local approval profile.PreToolUsehooks with an optional Graphify hook check while preserving the existing firstmate guard hooks and ignoring missinggraphifyinstalls..codex/andgraphify-out/, and expands shell/tests around Codex hooks, dispatch-profile spawning, session start behavior, Pi turn-end handling, and related lint fixes.Risk Assessment
✅ Low: Captain, the changes are well-scoped to Codex profile activation, Graphify hook wiring, documentation, and matching fixture updates, and I did not find a material merge-blocking risk.
Testing
The prior full baseline was already green; I reran the targeted spawn and session-start behavior suites, then captured end-to-end CLI evidence for Codex profile launch flags and the optional Graphify PreToolUse hook, with all checks passing and no working-tree residue left behind.
Evidence: Codex spawn profile evidence
Evidence: Graphify PreToolUse hook evidence
Pipeline
Updates from git push no-mistakes
✅ **intent** - passed
✅ No issues found.
✅ **Rebase** - passed
✅ No issues found.
🔧 **Review** - 1 issue found → auto-fixed (2) ✅
.codex/hooks.json:47- Captain,.codex/hooks.jsonnow definesPreToolUsetwice; standard JSON parsers keep only the later key, so Codex sees only the Graphify hook and silently drops the existingfm-arm-pretool-check.shandfm-cd-pretool-check.shguards. Merge the Graphify command into the originalPreToolUse[0].hooksarray and remove the second key.🔧 Fix: Captain, fix duplicate Codex PreToolUse hook
1 error still open:
.codex/config.toml:3- Captain, the committed.codex/config.tomldoes not appear to be loaded by Codex as a repo-local profile: localcodex --helpsays config is loaded from$CODEX_HOME/config.tomlor a named$CODEX_HOME/<profile>.config.toml, andcodex doctorin this worktree reported/home/crew/.codex/config.tomlas the active config path. As committed, these sandbox/approval settings are likely inert for a fresh checkout, so the approval-profile part of the change needs an activation path or corrected documentation.🔧 Fix: Captain, activate Codex spawn profile
✅ Re-checked - no issues remain.
✅ **Test** - passed
✅ No issues found.
command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc"Baseline already ran successfully before this validation:command -v tmux >/dev/null || { echo "tmux is required for e2e tests" >&2; exit 1; }; tmux -V; rc=0; for t in tests/*.test.sh; do echo "== $t =="; bash "$t" || rc=1; done; exit "$rc".bash tests/fm-spawn-dispatch-profile.test.shbash tests/fm-session-start.test.shManual evidence check: ranbin/fm-spawn.sh codex-profile-e2e <fixture-project> --harness codex --model gpt-5 --effort high --backend tmuxagainst a fake tmux/treehouse terminal and captured the literal launch command sent to the task terminal.Manual evidence check: extracted the Graphify command from.codex/hooks.jsonand executed it with a fakegraphifyon PATH, then with Graphify absent from the login-shell PATH.Cleanup check: removed/tmp/fm-codex-profile-e2eand confirmedgit status --shortplus generated-artifact scan produced no working-tree residue.✅ **Document** - passed
✅ No issues found.
🔧 Fix: Captain, brace Codex config key expansion
1 warning still open:
🔧 Fix: Captain: silence unused afk launch counters
1 warning still open:
🔧 Fix: Captain, follow repo-local shell sources
1 warning still open:
✅ **Push** - passed
✅ No issues found.