Repository navigation
Description
Overview
Make the managed PyAuto agent safety-hook surface genuinely portable between Claude and Codex. Extend the manifest-driven generator to produce tracked Codex project hook registration, reuse the existing safety implementations, and document the one intentional asymmetry: Claude's remote-only SessionStart bootstrap is not registered unchanged for Codex.
Plan
- Generate and drift-check .codex/hooks.json from the same repository manifest that owns Claude hook registration.
- Register the shared end-at-deliverable guard, the shared Mind commit guard where applicable, and each assistant's existing PyAuto API gate without duplicating hook logic.
- Add Codex-shaped allow, deny, malformed-input, generator, drift, and propagation coverage.
- Update assistant and generated project documentation to describe Codex project trust and the remaining SessionStart asymmetry accurately.
- Validate all six repositories independently, then route each through the workspace ship gate; stop at Heart RED until a fresh live-human development override is recorded.
Detailed implementation plan
Affected Repositories
- PyAutoMind (primary)
- PyAutoBrain
- autofit_assistant
- autogalaxy_assistant
- autolens_assistant
- autocti_assistant
Work Classification
Workspace
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| PyAutoMind | main | clean after stale-claim reconciliation |
| PyAutoBrain | main | clean |
| autofit_assistant | main | user-owned untracked scripts/compose_model_gaussians_exponentials.py; preserve |
| autogalaxy_assistant | main | clean |
| autolens_assistant | main | user-owned untracked scripts/cluster_model_composition.py; preserve |
| autocti_assistant | main | clean |
Suggested branch: feature/codex-hook-parity
Worktree root: ~/Code/PyAutoLabs-wt/codex-hook-parity/
Implementation Steps
- Extend PyAutoMind/scripts/repos_sync.py so expected Codex project hook configuration is derived from the managed repository manifest and can be written or checked for drift.
- Generate .codex/hooks.json registrations for the existing end-at-deliverable guard; include the shared Mind guard in PyAutoBrain's Codex surface and each assistant's existing API-gate script.
- Resolve repository-local hook commands through git rev-parse --show-toplevel; preserve the existing hook implementations rather than copying their logic.
- Leave the Claude-remote SessionStart hook off the Codex surface and document why, including Codex's trusted-project requirement.
- Extend synchronization and hook tests with representative Codex PreToolUse payloads covering allow, deny, malformed input, generated configuration, drift, and propagation.
- Update assistant setup/AGENTS documentation that currently says Codex has no hook mechanism.
- Run targeted tests and generator/drift checks in the isolated worktree, request independent review, and stop at the Heart gate if RED remains.
Key Files
- PyAutoMind/scripts/repos_sync.py — manifest-driven Codex hook generation and drift checks
- PyAutoMind/tests/test_session_hook_sync.py — generator, drift, and propagation coverage
- PyAutoBrain/.codex/hooks.json — Brain Codex hook registration
- *_assistant/.codex/hooks.json — assistant Codex hook registration
- *_assistant/docs/setup/codex_cli.md and *_assistant/AGENTS.md — trust and hook-asymmetry documentation
- autoassistant/tests/test_api_gate.py — Codex-shaped hook protocol coverage
Original Prompt
Click to expand starting prompt
Register safety hooks for Claude and Codex
Type: maintenance
Target: organs
Repos:
- @PyAutoMind
- @PyAutoBrain
- @autofit_assistant
- @autogalaxy_assistant
- @autolens_assistant
- @autocti_assistant
Difficulty: large
Autonomy: supervised
Priority: high
Status: draft
Filed: 2026-09-17
Parent: draft/maintenance/organs/agent_harness_agnostic_setup.md
Request
Can you check that all Agent setup (skills, md files, etc) is agnostic to whether its claude or codex, been using claude for a while but gonna codex for the forseeable so worth an agnostic sweep
Scope
Extend the manifest-driven hook generator and drift tests to create tracked
Codex project-hook registration alongside Claude registration. Use generated
.codex/hooks.json as the Codex adapter. Reuse the compatible
end-at-deliverable, shared-Mind commit and assistant API-gate implementations;
test them with representative Codex hook payloads. Do not register the current
Claude-remote session bootstrap unchanged: either give it an explicitly
harness-aware entry point or document it as a separate follow-up.
Acceptance
- Expected Claude and Codex safety-hook registrations are generated and
drift-checked from one manifest/source. - Allow, deny and malformed-input fixtures cover Codex PreToolUse payloads.
- Project trust and any remaining session-bootstrap asymmetry are stated
accurately in setup documentation.
Activity
prompt: file issue for codex-hook-parity (#407)
prompt: register codex-hook-parity workspace repos (#407)
Jammy2211 commentedon Sep 17, 2026
Human Heart RED development override — 2026-09-17
Task: PyAutoMind#407 /
codex-hook-parity.The agent asked the live human to authorize “PyAutoMind issue #407 / codex-hook-parity to pass the Heart RED development gate so I may push the six branches and open their PRs; this does not authorize release or merge.”
The live human authorized this contemporaneously, verbatim:
Exact current Heart RED reasons
install verification FAILED (testpypi; checks F)release validation FAILED (stage integrate)Additional current yellow reason:
manifest drift: remote-session blocks (generated) — 2 mismatch(es) vs PyAutoMind/repos.yamlPassed branch gates
review-minutes-actualwarning.git diff --check: clean in all six repos.This live-human development override permits commit, push, and opening the six pending-release PRs. It does not authorize release, release rehearsal, merge, force merge, branch-protection bypass, or bypassing failed CI. It does not claim this task repairs Heart; Heart remains RED for release purposes. Merge requires a separate explicit human command and green required GitHub checks.
Jammy2211 commentedon Sep 17, 2026
PRs open — awaiting merge
All six
feature/codex-hook-paritybranches were pushed normally and the PRs carrypending-release:Mind state is now
awaiting-merge. One-shot check snapshot at PR-open (no polling or waiting):The failed checks are not bypassed. Nothing was merged or released. A later merge requires a fresh explicit human
/prminvocation and all required checks green.Jammy2211 commentedon Sep 17, 2026
Phase 2 CI corrections are pushed:
941bbd1b— regenerateddashboard.mdanddashboard.htmlwith../PyAutoBrain/bin/pyauto-brain intake --apply dashboard;../PyAutoBrain/bin/pyauto-brain intake dashboard --checkreports current andgit diff --checkpassed. The Heart RED override and active task state were preserved.5bb3946— classifies.codex/hooks.jsonas generic clone infrastructure inREFERENCE_PROFILES.033dd6f— documents.codex/hooks.jsonin the matching generic Assistant-as-template boundary.python agents/conductors/clone/check_boundary.py ../autolens_assistantreported boundary complete (generic 64, domain 327, mixed 89);python -m pytest tests/test_clone_conductor.py tests/test_clone_sync.py -qpassed 44 tests; diff checks passed.Brain-ref: feature/codex-hook-parityso the boundary job uses the paired Brain profile.No workflows were manually rerun or polled, and no merge was attempted.
Jammy2211 commentedon Sep 17, 2026
Progress Update — 2026-09-18
Summary
Implementation, focused tests, generated-hook drift validation, and independent review are complete across all six repositories. Six pending-release PRs remain open:
The last
/prmjudgment found Brain#385, autofit#47, autogalaxy#26, and autocti#29 green. Its Mind#408 observation was CONFLICTING/DIRTY with no current-head runs; concurrent self-heal subsequently mergedorigin/maininto the feature branch as34d481a. The one-shot snapshot on that head was MERGEABLE/UNSTABLE: Dashboard Refresh and Lifecycle Drift passed, while Spawn Driftprivacyand Tenant Firewallfirewallfailed. The durable resume note and regenerated dashboard are now pushed as80f35b0f; checks were not polled after that push.AutoLens#128 remains UNSTABLE because its clone-boundary run preceded the effective paired-Brain declaration. The PR body now contains the exact line
Brain-ref: feature/codex-hook-parity; wiki-currency passed.Resume
/home/jammy/Code/PyAutoLabs-wt/codex-hook-parityfeature/codex-hook-parityautofit_assistant/scripts/compose_model_gaussians_exponentials.pyandautolens_assistant/scripts/cluster_model_composition.py.Tomorrow:
origin/mainis already satisfied by34d481a; if main advances again, merge it normally—never rebase—then regenerate the dashboard, run its drift check and lifecycle check, and push.Brain-ref:pairing and rerun the AutoLens clone-boundary check./prmagain. The prior merge authorization expired because all required checks were not green before the turn ended.codex-hook-parityandmass-field-workspace-sweepclaims clear.No workflow was manually rerun, no PR was merged, and no phase-3 registration was altered.
prompt: route arxiv-digest-api-retry (#410) → start_library
Jammy2211 commentedon Sep 18, 2026
codex-hook-parity
prompt: timing-noise-audit-p5-round-bootstrap (#362) shipped to PR #407…