Skip to content

Codex lead parity - #1

Closed
abdoharb wants to merge 3 commits into
MShokry:mainfrom
abdoharb:codex-lead-parity
Closed

abdoharb wants to merge 3 commits into
MShokry:mainfrom
abdoharb:codex-lead-parity

Conversation

@abdoharb

@abdoharb abdoharb commented Oct 5, 2026

Copy link
Copy Markdown

No description provided.

Make the generated Codex lead recover the correct team session, preserve
planner continuity and approvals, and detect runtime permission failures
before delegating work. Align the shared Claude/Codex pipeline contract
with Codex's protected configuration directories.

Runtime state and migration:
- Move generated task records, artifacts, provenance, server credentials,
  session pins and logs from .agents/ to .pipeline/. Keep discoverable
  skills under .agents/skills/ and Codex configuration under .codex/.
- Synchronize scripts, role instructions, flow references and ignore rules.
  Read legacy provenance for update triage, but refuse normal bootstrap
  while legacy task state remains to prevent parallel runtime directories.
- Document the breaking path change in migration 02 and the changelog.
  Existing projects require a task-boundary migration that preserves
  history, customizations and skills; no automatic migration is performed.

Exact lead and planner recovery:
- Replace latest-session fallback with a dedicated launcher and per-team
  session pin captured by SessionStart/UserPromptSubmit hooks. Run without
  the shared daemon so hooks receive the selected team's launch context.
- Validate hook inputs and project boundaries, ignore unrelated Codex
  chats, prevent pin replacement and concurrent leads, and stop on failed
  resume or missing session capture. Require explicit --fresh for a reset.
- Record the planner thread in task state; reuse it for same-task fixes,
  recover from task records and decision history, and release it on task
  completion. Preserve recorded workflow approvals across recovery.

Configuration and preflight:
- Add optional lead/planner model and reasoning flags, defaulting to
  inherit, with validation and provenance round-tripping.
- Install delegate, status-board and karpathy-guidelines supporting skills
  without overwriting local files. Expand update guards for permissions,
  hooks, agent tools, MCP and skills while allowing deliberate local drift.
- Check required CLIs, feature capabilities, generated files, actual
  .pipeline write access and authenticated OpenCode connectivity using the
  same endpoint/password precedence as oc.sh. Replace the raw flow curl
  check so custom endpoints work consistently.
- Keep workflow consent separate from runtime permissions. Preserve hook
  review/trust requirements and avoid automatic permission broadening.

Documentation and validation:
- Add the Codex setup/recovery guide, manual live-verification checklist,
  migration instructions and synchronized generator lessons/references.
- Add no-model behavioral coverage for launch/resume isolation, fresh and
  failure paths, hook validation, locks, preflight failures, settings,
  legacy migration guards and customization preservation; run it in CI.
- Add an opt-in real Codex OS sandbox check demonstrating writable
  .pipeline state and protected .agents/skills, .codex and .git paths.

Validation passed: smoke (25 checks), invariants (113 rule/file pairs),
Codex behavior (8 groups), real Codex 0.160.0 sandbox probe, Bash syntax
checks and staged diff whitespace checks. ShellCheck was unavailable
locally; CI retains its optional check. No live model-driven pipeline or
native planner/skill discovery run was performed. The planner's source
write boundary remains instructional under classic workspace-write.
@abdoharb abdoharb closed this Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant