Skip to content

Missing feature: automatic Sage workflows and gated autopilot in Codex #88

Closed

Description

@erickb336

2026-10-24: a new installed-workflow task completed

PR #306 is merged at c639a964a0dd484fd3d7521467b394c46119f7c3, closing #305. A fresh project now reports inactive workflow status without creating a logbook. The real installed-session discovery check exposed this defect; the fix has direct CLI proof and a meaningful failure on detached main.

T36 was framed after the T35 installation and completed through the actual chief/lead/implementer/review/QA workflow. Two final-head code/security/QA cycles were clean; local tests and CI each passed 1,981/1,981. The installed guarded publisher performed the expected-head merge. GitHub and Sage state independently confirmed it. The standard installer now supplies released main; all 213 package files match, with settings and hooks unchanged.

Fresh real-model sage help discovers the installed skill and shows the off state and supported commands. That model did not call the status helper, so a separate direct installed-helper check verifies its result and absence of writes. This is one discovery sample, not a reliability study.

A separate disposable pilot exercised installed mode-off with simulated owner inputs and actual native worker interruption. The worker changed from running to interrupted; its checkpoint remained unchanged. The task stayed unfinished and the fixture runs were recorded blocked. This proves the procedural stop-and-preserve path, not human authentication, automatic hook interruption or abrupt-host-loss recovery. The real project remains Sage on and autopilot on under the owner's prior instructions.

The active-chat workflow has a completed new-task and guarded-publication pilot. The stronger native controller, all-route contracts, cross-session ownership and crash guarantees remain open under #295, #266, #239, #243 and #246. This parent remains open. Claude's active board/state changes are untouched.

2026-10-24: active-chat Sage and guarded publication released

PR #304 merged at 5d2064989061adc8d56389dc617d7e7799d57b6f and closed #303 (T35). Its reviewed head 6db138cf9f12dacbd5c96faa13151650a6da9ff2 passed build/check, all 1,979 local tests, all 1,979 exact-head CI tests, and two clean independent code/security/QA cycles. The unanswered-gate finding was repaired before those clean cycles.

The installed session helper accepts the existing Sage and autopilot phrases. In the actual current Codex session, it records Sage on and autopilot on from the owner's standing instructions and separate publisher verification. The real publisher refused the unready PR before creating intent, then performed the authorized expected-head merge after CI passed. Independent GitHub and state-tool reads confirm PR #304 and T35 are merged. Reconciliation preserves that result without another submission.

The configured Git marketplace was refreshed from main and the released plugin installed. All 213 installed package files match the reviewed output; user configuration and hooks are unchanged.

This is a working opt-in workflow inside an active Codex task. It is not the unfinished standalone native controller, an unattended service, cryptographic caller authentication, or global native admission enforcement. Fresh-chat discovery and a new task executed entirely after installation remain to be verified. #239, #243, #246, #266 and #295 remain open. The original watcher failure in #283 remains unexplained despite the current full local suite passing. Claude-active work and board features remain outside this release. This parent remains open.

The checkpoints below are historical; they do not override this scoped release status.

Capability documentation verified — T20

PR #265 merged at bc93b26. Prepared Codex capabilities are now described separately from installed manual use and unfinished automatic Sage. The reviewed head 3360be8 passed 1,644 local tests and 1,644 exact-head CI tests, build/check and one clean independent code/QA cycle. No runtime behavior or activation default changed.

The next route and authenticated product-gate design is tracked in #266. Disposable native question trials have begun; they use simulated model/client responses and do not establish human approval or installed automatic operation. This parent remains open.

Current status — manual coordination; automatic runtime not ready

PR #263 merged at f643a90 and completed #262 (T19). Three actual CLI 0.160.0 patch routes passed: ordinary edit while off, protected-path refusal while off, and chief edit refusal while on. Independent code review and QA are clean; all 1,644 local and exact-head CI tests pass. These trials use simulated responses and a fixed local execution context. All temporary profiles and owned processes were cleaned up. Production policy and installed defaults remain unchanged. The trusted execution-context requirement in #243 remains unfinished; the PR description accidentally triggered its closure through a negated closing keyword. That wording is corrected and the issue is reopened.

PR #261 merged at cf557ea and closed #260 (T18). The native owner-turn diagnostic verifies ordinary/on/off/on in one actual CLI 0.160.0 session with simulated responses. Both instruction parts appear with cumulative counts 0, 1, 1, 2; owner epoch stays stable, the logbook stays unchanged, and cleanup completes. Independent code review and QA are clean. All 1,628 local and exact-head CI tests pass. Production policy and installed defaults are unchanged. The integration audit continues; #239, #243, #246 and required-hook failure handling remain unfinished.

PR #257 merged at 443c00a and closed #253. Reviewed head 7cec7f5 passed both independent code/security/UX/QA cycles, build/check, all 1,604 local and exact-head CI tests, and the native update/retry probe with simulated responses and cleanup. All reported findings are closed. Authenticated task updates preserve exact retries and terminal recovery through interrupted publication without granting fresh authority.

PR #259 merged at 66fe812 and closed #258 (T16). Tracked children now need an active native turn before evaluation and before permission returns, including after Sage off. Reviewed head f6cf267 passed all 1,613 local and exact-head CI tests and two fresh independent code/security/QA cycles. Four new off-mode regressions fail behaviorally on detached main; five controls already pass. The full-suite fixture repair preserved all assertions. No installed automatic activation follows. Next is #239: one active lead per PR across linked worktrees and alternate state roots. Its existing local design task T11 needs an updated writer/inventory/transaction design against merged main. Full installed automatic Sage remains unfinished; #243, #246 and the upstream required-hook failure remain separate gaps. Claude-owned #119, #105 and #67 stay untouched.

PR #254 merged at 5cf760a and closed #252. Old descendants retain their original lead assignment and cannot regain authority after rebriefing or lead reuse. Authentic terminal evidence remains usable. The final head passed all 1,494 local and CI tests, the native nested workflow with simulated responses, and two clean code/security/QA cycles. PR #256 also merged and closed #255, replacing the flaky hook CPU cutoff with deterministic work checks; it passed 1,480 local and CI tests. No installed automatic activation follows from these component results.

The active next component is #239 (local-project PR ownership); #253 is merged. Upstream trusted-context, required-hook failure, and abrupt-loss settlement gaps remain. Claude-owned #119, #105 and #67 remain untouched.

PR #140 is merged at b5889f6 after owner-authorized Codex takeover. Its reviewed head passed all 1,479 local and CI tests, build/check, and two clean code/security/QA cycles. The shared lead-honesty prerequisite is now available. Authenticated Codex task updates subsequently merged in PR #257; blocking a lead logbook row does not settle its native descendants. No live Claude lead test ran, and #119 remains separate.

Guided preview update: PR #251 is merged and closes #250. Its exact reviewed head passed all 1,420 local and CI tests. The installed package matches the reviewed release. Updated help and an isolated sample text board were verified in the desktop test chat. A delegated mode phrase was correctly refused; direct-owner activation and fresh post-update discovery in that chat remain unverified. This preview supplies explicit skill-led coordination, not persistent automatic enforcement or gated autopilot. This parent issue remains open.

Main reached a0ba97a4171b85cbf8c46b9f87cfafe98eadf5fc before the #140 merge. PR #249 is merged and #248 is closed. Its reviewed head passed 1,413 local and exact-head CI tests, the native nested report handoff, and two clean code/security/QA cycles. The native route used fixed simulated responses; it does not prove real-model review quality or installed automatic operation.

The owner selected manual multi-agent coordination. Installed automatic Sage remains disabled. Integration codex/t17-child-compaction is pushed at 31119452933d4d276bd6da4d4505744d1d0a91da, with the remote head verified. Build/check, 10 focused checks, preservation review, both native report routes, and all 1,486 full-suite tests pass. Native responses are simulated. Temporary profiles were removed and all owned local test/probe processes ended.

The remaining work is:

Dependency Work still required
Authenticated task updates Merged in #257. Whole-team settlement and project-wide ownership remain separate work.
#239 Enforce one active lead per PR across tasks, sessions, and linked worktrees, including attachment and retargeting. This needs the shared mutation boundary.
#243 Obtain trusted executor context for the complete command/path policy. Model-supplied command arguments are not that authority.
openai/codex#41979 Make required-hook failures refuse protected operations. The upstream issue remains open.
#246 Obtain authoritative child settlement after abrupt process loss without fabricated completion or overlapping owners.
Product gates before dependent work Preparation/admission alone permits a dispatch with an unanswered gate when the evaluator returns pass. Verify gate enforcement in the complete evaluator and workflow before activation; readiness checks alone do not establish it. Define permitted design/exploration work without weakening the requirement to answer product questions before dependent implementation.
Full workflow Finish installed policy/setup, all-route workflow checks, whole-runtime reviews, and a real-project pilot after the above dependencies.

Board #100 stays deferred until full Codex support. #119 remains Claude-owned despite its Codex label. The existing completed-component history below records earlier evidence; it is not a claim that this parent goal is complete.

Completed in the latest batch:

Latest completed components and next work:

Remaining runtime work after those components:

  1. Native task creation (Create recorded tasks through the Codex chief tool (T56) #221) and run creation (Create recorded runs through the Codex chief tool (T57) #224) are merged. Recorded review acceptance (Accept recorded Codex reviews with recoverable publication (T59) #227) is merged. Active-child and compaction target checks merged in Keep Codex child work and recovery on current targets (T55) #222; initial dispatch capture and prepared follow-ups merged in Validate current runs and review targets before dispatch (T53) #217 and Dispatch saved assignments to existing Codex children (T54) #219.
  2. Finish task updates and repair/check workflows. Claude Lead honesty before step 4 (T289) #140 actively edits task-set/replan behavior and the mergeCheck guard area; avoid those specific functions until coordinated.
  3. One-lead-per-PR enforcement, interrupted-run repair, additional authoritative failure recovery, active-child restart and cross-session transfer.
  4. Complete installed policy composition and setup, all-route chief workflow, whole-runtime reviews and a real-project pilot. The policy currently requires an external evaluator; advice hooks alone do not provide automatic orchestration.
  5. Required-hook failure protection and trusted effective execution context. Upstream [Hooks] Add opt-in fail-closed handling for PreToolUse hook failures openai/codex#41979 remains open. Released CLI 0.162.1 still leaves hook runtime errors and malformed output non-blocking; upgrading alone is not a verified fix. Installed CLI remains 0.160.0. Requested arguments alone do not prove the selected environment, effective cwd, shell, login or permissions.

Existing simulated CLI probes do not establish real-model recovery, session transfer, complete shell enforcement or automatic activation. Exact-commit merge enforcement and separately authorized autopilot behavior still need final evidence. This issue remains open. Nothing is required from the owner for the current independent work.

Approved lead ownership scope — 2026-10-14

The owner approved one active lead per PR within one local project, including its linked Git worktrees. The old lead must finish before ownership transfers. Manual multi-agent coordination remains selected; this decision does not enable installed automatic Sage.

This extends #177, which enforces one initial lead per project task. Different task records or owner sessions for the same PR must not create a second active lead in the local project.

Scope and acceptance:

  • Use the local project's shared identity across its linked worktrees. The same PR must share one lead owner across those worktrees, task records, and owner sessions.
  • Refuse a second active lead for that PR. Concurrent claims must produce at most one owner.
  • Refuse transfer while the old lead remains active. Finish its run through the supported lifecycle before another lead takes ownership. Existing ownership checks for an active lead team remain in force.
  • Preserve identical retries and unrelated PRs. Preserve existing branch-only task support before a PR is attached; this decision does not require every task to have a PR.
  • Verify PR attachment and retargeting against the same ownership rule, so changing a task's PR cannot introduce overlapping leads.
  • Limit the guarantee to the local project and its linked worktrees. Do not claim coordination across independent clones, machines, or repository-wide installations.

Implementation and verification remain pending. Keep Claude #140's active task-set, replan, merge-check, logbook-view, and verdict work separate. This scope is one component of #88; it does not replace the remaining full-workflow requirements.

Earlier component history — 2026-10-13

Automatic Sage remains incomplete. This issue stays open through component extraction, native recovery checks, activation blockers, and a real-project pilot.

The owner authorized this Codex coordinator to merge reviewed PRs after passing checks. This direct authorization does not enable installed Sage autopilot or prove its enforcement. Installed automatic Sage remains disabled.

GitHub previously closed this issue because a PR used a closing keyword beside this issue number even in negative wording. It is reopened. Each component PR must name only its intended component issue in closingIssuesReferences; #164 named only #163.

The entries below retain historical evidence for prepared components. They do not establish installed automatic Sage.

Missing feature

Codex can run native subagents, but the installed Sage Codex plugin does not yet provide the complete automatic Sage workflow or gated autopilot. Track the missing implementation and its live verification here.

The owner requested this issue after asking whether multi-agent Sage works in Codex. This is feature tracking, not permission to enable automatic merges now.

Current evidence

Two distinct capabilities

  1. Automatic Sage coordination with manual merging. The owner starts Sage in Codex. The chief delegates work, applies limits and permissions, collects reports, records reviews, and stops at a reviewed pull request for the owner.
  2. Gated autopilot. The owner separately opts into automatic merging. Only the authorized chief may merge, after the shared checks and required clean review cycles pass on the exact current commit. Children never merge.

Native subagents alone do not establish either capability. Autopilot is not required to use the first capability.

Scope to design and split into reviewable work

  • Define the supported installed Codex entry point, transport, task routes, owner activation, and on/off behavior. Resolve product choices before implementation.
  • Wire the verified native events and load the chief and child instructions. Do not depend only on direct test calls to runtime functions.
  • Complete command, path, file-write, role, and workflow enforcement. Unknown identity, missing evidence, or unsupported input must fail closed while retaining Codex's native permission checks.
  • Connect native child dispatch to durable task and run identity, atomic admission, project and parent limits, and exact child-result binding.
  • Validate and accept reports, record findings and verdicts, and release capacity only from authoritative lifecycle evidence. Handle duplicates, late or missing events, and failed starts.
  • Define and test interruption, compaction, restart, and recovery. A stale event must not free another agent's slot or revive completed work.
  • Verify a real Codex task from owner request through implementation, independent review, QA, accepted reports, and a pull request ready for manual merge.
  • Add separately verified autopilot activation and merge gates. Owner-only opt-in, reliable off behavior, exact-commit review checks, and child merge refusal must hold in code.
  • Update setup, help, capability status, and the board only when the implemented behavior supports the claims.

Shared rules belong in packages/sage-core/; Codex transport and native-event handling belong in packages/sage-codex/. Preserve the provider boundary and the existing Claude behavior. Edit sources and regenerate plugin output through the build.

Acceptance

  • A supported installed Codex session runs the complete manual-merge Sage workflow without the operator manually invoking internal runtime functions.
  • A live pilot records actual task/run transitions, child identities, accepted reports, slot release, review evidence, and the resulting pull request. Mock-model or fixture checks alone do not satisfy this acceptance.
  • Negative tests cover spoofed activation, role and capacity violations, prohibited writes and commands, duplicate/late events, incomplete reports, failed checks, and stale reviewed commits.
  • Autopilot remains off by default. Its implementation has separate evidence for authorized on/off behavior and merge eligibility. Tests use controlled fixtures, never real merge or push commands.
  • New commits invalidate earlier clean review cycles. Risk-bearing authorization changes receive the required independent code, security, and QA reviews.
  • Build, check, and tests pass. New behavior has regression evidence against main; remaining unsupported cases are explicit.
  • Any live automatic-merge pilot needs its own explicit owner authorization and target. Creating this issue does not authorize it.

Coordination

This is a Codex feature gap, separate from the existing Claude-owned issues #64–#68. Frame the design and implementation sequence before adding it to the current build queue. Link the eventual implementation issues and evidence here; close this issue only when both capability stages meet their acceptance criteria.

Verified activation dependency: required hook outage

The isolated native check on Codex CLI 0.160.0 found that a disconnected Sage hook server does not prevent native child creation. The server was configured with required=true. The child started and completed while the Sage journal had zero reservations. This blocks automatic activation on the tested transport.

The repeatable command is node scripts/probe-codex-lifecycle.mjs --sage-hook-outage, with the fake process tools first on PATH. It uses a temporary profile and simulated model responses. It records the exact spawn fault, returns exit code 1 with failClosed: false, and removes the temporary profile. The healthy --sage control passes. Neither check establishes a real-project pilot.

The upstream failure-policy issue tracks the native contract gap. Do not treat a proposed configuration option, an advisory fallback hook, or a later interrupt as proof that unverified dispatch cannot occur.

Before activation, verify required validation across disconnection, missing or untrusted hooks, timeouts, malformed results, unmatched coverage, permission requests, and configuration reload. Only persistent disconnection has been tested here. Report acceptance, recovery, and complete policy work can continue while this dependency remains open.

Saved diagnostic: Codex branch commit 04a58bb. Build and check pass; the full suite passes 855/855. The five normal native routes pass; the outage readiness check remains failing and blocks activation.

Verified report intake, not verdict acceptance

Commit 056852e adds sage_read_report. A parent can read only its own named child's report after exact assignment binding and native completion. The reader checks the task and report in one transcript snapshot, requires the task before the report, and matches the retained assistant message to the completed turn.

The core parser requires all seven nonempty report fields and a valid status. The repository check keeps these fields aligned with Claude. The tool returns the task, run, child, turn, message identity, report hash, and parsed report. It does not change task state, accept a verdict, or verify the child's claims.

Verification: build and check pass; full tests pass 861/861; focused provider, server, and transcript tests pass 152/152. All six new tests fail on detached main b0af484 and on the preceding commit 04a58bb. The prior-commit proof isolates the missing report APIs/tool; main also lacks earlier lifecycle prerequisites. A separate ordering regression failed before its repair and passed afterward.

node scripts/probe-codex-lifecycle.mjs --sage-report passes against the real local 0.160.0 CLI with simulated responses and a temporary profile. The five existing healthy native routes also pass. The known hook-outage readiness check still fails, so automatic activation remains gated. Durable report acceptance, verdict recording, recovery, complete policy enforcement, and a real-project pilot remain unfinished.

Durable report receipts verified

Commit 72001db adds sage_record_report. The parent supplies the hash returned by sage_read_report. The adapter rechecks provenance, then the shared journal atomically stores the exact completed binding, task, run, message identity, hash, and report text.

Identical retries create one receipt. Competing different reports cannot replace the winner. The parent can read the saved evidence after a connection restart or removal of the native transcript. Another actor, changed content, mismatched task/run, or missing completion is refused. Valid late reports remain recordable after Sage off. Recording changes only report evidence; it does not change mode, capacity, task/run status, or review verdicts.

Build and check pass; full tests pass 866/866; focused provider/server tests pass 150/150. All five new tests fail on detached main b0af484 and on the preceding commit 056852e. The native --sage-report route passes through read, first record, retry, and read-back with one receipt. The five other healthy native routes pass. These native runs use simulated responses and temporary profiles. The known outage readiness check still fails.

Next: connect the receipt to the shared task logbook and review gates, then complete broader recovery and the real-project pilot. Durable receipt storage is implemented on the saved branch; it does not establish full report-claim acceptance or installed automatic operation. The activation blocker remains open.

Shared report-to-run operation verified; native connection next

Commit 6715270 adds the shared finishReportedRun operation. It saves the exact report under its content hash and finishes only the matching task's run, with the assigned role. Report status can be done, blocked, or question. Task state, review verdicts, findings, gates, decisions, branch, and other run fields stay unchanged.

Identical retries preserve the first completion time. Conflicting evidence, another task/run/role, manual terminal results, duplicate records, redirected report paths, and newer table schemas are refused. A failed run-table write can recover from the already published report. An interrupted temporary-file cleanup can also recover without rewriting evidence. The provider must authenticate the receipt before calling this shared operation.

Verification, with fake process commands first on PATH:

  • npm run build: build passed and generated provider output was committed.
  • npm run check: all checks pass.
  • npm test: 875 tests, 875 pass, 0 fail.
  • node --test --test-name-pattern='reported run' scripts/providers.test.mjs: 9 tests, 9 pass, 0 fail.
  • The same nine tests fail on detached main b0af484 and on the preceding commit 72001db because the operation is absent. The interrupted-publication test also failed on the first implementation, then passed after the repair.
  • node scripts/probe-codex-lifecycle.mjs --sage-report: the existing native report route still passes, with one receipt, no duplicate on retry, and matching read-back. This uses the real 0.160.0 CLI, simulated responses, and a temporary profile that the probe removes.

Not yet verified or implemented in this step: the native chief-only tool connection to this logbook operation, live run completion through that tool, review-verdict acceptance, a real-project pilot, or full installed automatic operation. The known hook-disconnection activation blocker remains open. Board work remains paused. Next: connect an authenticated recorded receipt to this operation using a fixed logbook location and verified chief identity.

Native chief report-to-run connection verified

Commit 14398e4 adds sage_finish_run. The tool accepts only an assignment ID and report hash. It requires an existing report receipt, the current native root chief, and the matching project, session, and owner epoch. The shared operation checks the actual task, run, and assigned role.

Version 3 configuration fixes an external logbook root. It cannot overlap the checkout, admission journal, observation store, or native transcript directory. Tool arguments cannot select a path or supply report text. Version 2 keeps its existing tools working but cannot finish a run; there is no ambient-home fallback. Child agents and other root sessions cannot finish this chief's run.

Identical retries preserve the first result. Recorded work can finish after Sage off or removal of the child transcript. Task state, review verdicts, findings, gates, and admission state remain unchanged. Run completion does not verify the report's claims.

Verification, with fake process commands first on PATH:

  • npm run build: passed; generated output committed.
  • npm run check: all checks pass.
  • npm test: 880 tests, 880 pass, 0 fail.
  • Provider/server integration tests passed 164/164 before the final location check. The five focused workflow tests passed again after that repair.
  • All five new tests fail on detached main b0af484 and on preceding commit 6715270. The preceding-commit proof isolates the absent native module; main also lacks earlier lifecycle prerequisites.
  • A transcript-directory overlap test failed before the location repair and passed afterward.
  • node scripts/probe-codex-lifecycle.mjs --sage-report: passes through actual native read, record, finish-run, and retry calls. Direct logbook checks confirm exact report text, one finished run, unchanged task and gate tables, and the original completion time. The run used the real 0.160.0 CLI with simulated model responses; its temporary profile was removed.
  • The healthy --sage control passes. --sage-hook-outage still exits 1 with failClosed: false and readyForActivation: false: the native child starts despite the required hook outage. Automatic activation remains blocked.

Not verified here: report claims, review-verdict acceptance, a real-project pilot, full installed policy enforcement, or automatic operation. Next: connect review evidence to exact-commit verdict gates, then continue broader recovery and policy work. Board work remains paused. This issue remains open.

Exact-commit review preparation verified

Commit c9db5fb pins configured native review assignments before dispatch. Code, security, UX, and QA reviewers supply a review cycle. Shared state reads the actual task branch from Git and checks the active run, assigned role, and task round. The caller cannot supply a commit ID.

The immutable preparation records the branch, full commit ID, round, and cycle. The dispatched message and bound child instructions include that target. Admission rechecks the target before reserving a slot. A changed head or round, completed run, missing fixed options, or redirected project logbook refuses dispatch. Retries cannot replace a saved commit or cycle. The branch read ignores injected Git selection variables and does not assume that the checkout's HEAD is the task branch.

Verification, with fake process commands first on PATH:

  • npm run build: passed; generated provider output committed.
  • npm run check: all checks pass.
  • npm test: 886 tests, 886 pass, 0 fail.
  • Six focused review-target tests pass. All six fail on detached main b0af484 and preceding commit 14398e4. The prior-commit proof isolates the missing review-target behavior; main also lacks earlier native prerequisites.
  • A direct redirected-project check and its regression test failed before the canonical-folder repair, then the regression passed after it.
  • node scripts/probe-codex-lifecycle.mjs --sage-report: passes with a code reviewer and an actual commit in a temporary Git repository. The probe compares the target to a separate Git read, verifies native message delivery, then checks report receipt storage, run completion, and retry. Model responses are simulated; the temporary profile is removed.
  • The healthy --sage control passes. The required-hook outage still permits native child creation and returns failClosed: false, so automatic activation remains gated.

Not established by this step: that the reviewer actually reviewed the code, accepted findings or verdicts, completed independent review cycles, a real-project pilot, or installed automatic operation. The saved target establishes intended review scope. Verdict acceptance must recheck the current commit and round and link the accepted result to the recorded report. That connection is next. Board work remains paused, and this issue remains open.

Native chief review acceptance verified

Commit 6179317 adds explicit chief acceptance of recorded review reports. The branch includes main e42941b and preserves its exact mode phrases.

sage_accept_review takes only the assignment ID and report hash. The current native root chief must own the receipt. Shared state checks the completed run, exact saved report, prepared role, branch commit, task round, and review cycle. Structured evidence and findings must agree with that target. A changed commit or round refuses a new acceptance.

Acceptance records open findings and the role's verdict. Blocking findings return verified or PR-ready work to reviewing with a decision row. A clean review does not approve the task or supply project checks. Identical retries preserve one receipt and do not duplicate findings or verdicts.

A durable intent protects the four changed tables. A failed write blocks later logbook edits and merge checks until the same request recovers it. Recovery refuses damaged intent or unrelated table changes. Evidence already accepted for an older commit stays on that commit. A merge check also refuses a table snapshot that overlaps a completed acceptance.

Verification, with fake process commands first on PATH:

  • npm run build: built 247 files; generated provider output committed.
  • npm run check: all checks pass.
  • npm test: 894 tests, 894 pass, 0 fail.
  • node --test --test-name-pattern='review acceptance' scripts/codex-server.test.mjs: 11 tests, 11 pass, 0 fail.
  • The same 11 tests fail on detached origin/main e42941b and preceding commit 51bd1d3. Main lacks earlier review-preparation prerequisites; the preceding commit isolates the absent acceptance operation.
  • The concurrent-read regression first failed because a merge check missed a new open finding. It passes after the snapshot repair.
  • node scripts/probe-codex-lifecycle.mjs --sage-report: the actual 0.160.0 CLI completes preparation, dispatch, report read/record, run completion, review acceptance, and retries. Direct logbook inspection finds one verdict on the temporary branch's actual commit. The task and gates remain unchanged, and merge readiness remains false.
  • The healthy --sage control passes. The --sage-hook-outage readiness check still exits 1: a child starts and completes with zero reservations after required-hook disconnection. failClosed and readyForActivation remain false.

Native checks use simulated model responses and temporary profiles that the probes remove. They do not establish review quality, independent review cycles, or a real-project pilot. Full policy, broader recovery, installed automatic coordination, and separately gated autopilot remain unfinished. No real merge or automatic activation ran. Board work stays paused, and this issue stays open.

Chief inspection of recorded lead reports verified

Commit 2bf45b3 adds sage_read_recorded_report. The current root chief can inspect an already recorded assignment and exact report hash. This includes a report that a lead recorded for its own child.

The tool returns the saved text, assigned role, native issuer, child, turn, and prepared review target when present. It checks chief identity, project, current owner epoch, recorded receipt, and fixed configuration. It changes no task, run, finding, verdict, or admission record. The chief still cannot take the parent's authority to read an unrecorded grandchild report. Saved evidence remains readable after Sage off or transcript removal under the same owner.

Verification, with fake process commands first on PATH:

  • npm run build: passed; generated Codex output committed.
  • npm run check: all checks pass.
  • npm test: 898 tests, 898 pass, 0 fail.
  • node --test --test-name-pattern='chief saved report inspection' scripts/codex-server.test.mjs: 4 tests, 4 pass, 0 fail.
  • The same four tests fail on detached main e42941b and preceding commit 6179317. Main lacks earlier native prerequisites; the preceding commit isolates the missing reader and tool registration.
  • Packaged integration tests cover a lead's nested reviewer report, parent authority, chief-only access, exact text, unchanged state, pinned review targets, retries, and reads after transcript loss.
  • node scripts/probe-codex-lifecycle.mjs --sage-report: the actual 0.160.0 CLI reads the saved report through the new chief tool before finishing the run and accepting the review. Direct checks confirm matching provenance, target, exact text, and unchanged logbook at the read. The rest of the report workflow and retries pass. The temporary profile is removed.

The native route uses simulated responses and a direct reviewer. Nested report handoff is covered by packaged tests here, not yet by a complete native lead-to-reviewer report route. Cross-session recovery, independent review scheduling, a real-project pilot, and full installed automatic operation remain unfinished. The known hook-disconnection activation blocker remains open. No real merge or activation ran. Board work remains paused, and this issue stays open.

Native lead-to-reviewer report handoff verified

Commit 70eb943 adds node scripts/probe-codex-lifecycle.mjs --sage-nested-report. This verifies existing runtime operations together through the actual Codex CLI 0.160.0. It adds a probe and documentation, not new production policy or activation.

The chief prepares a lead. That lead prepares and spawns a code reviewer for the actual temporary branch commit. Both agents receive their saved instructions and bind on their first tool. The lead waits for its reviewer, reads and records the child's exact report, then passes the saved assignment and hash in its own report.

The chief records that handoff, finishes the lead run, inspects the saved review, finishes the review run, and accepts one exact-commit verdict. A retry returns the original result. Direct journal and logbook checks confirm two preparations, reservations, bindings, completions, saved reports, and completed runs, plus one verdict. Native dispatch, parent/child identity, task delivery, and stop evidence match for both agents. Task and gate state stay unchanged; merge readiness stays false.

Verification, with fake process commands first on PATH:

  • npm run build: passed; generated Codex documentation committed.
  • npm run check: all checks pass.
  • npm test: 898 tests, 898 pass, 0 fail.
  • The new --sage-nested-report route passes with 23 simulated response requests and removes its temporary profile.
  • Existing --sage-report, --nested, --sage, --follow-up, and --deny-spawn routes pass and clean up their profiles.
  • --sage-hook-outage still exits 1: the required-hook disconnection allows a child with zero reservations. failClosed and readyForActivation remain false.
  • Detached main e42941b cannot run this new probe because it lacks the earlier readAssignmentTurn native transcript API. Probe-only helpers were supplied, but no production code was copied. This is a missing-prerequisite comparison, not behavioral regression proof for the handoff. This unit adds no new production behavior or unit-test regression.

The probe uses real native agents and an actual temporary Git commit with simulated model responses. It does not establish review quality, required project checks, all review roles and cycles, repair scheduling, or a real-project pilot. Full installed coordination, broader recovery, complete policy enforcement, and gated autopilot remain unfinished. Board work stays paused. This issue stays open.

Initial no-tool child completion repaired

Commit c38eb2a fixes a native reviewer that returns its report without calling any tool. It previously remained unbound, and Sage blocked its stop. A native field probe confirmed that agent_transcript_path names the child transcript, while transcript_path names the parent's.

The stop adapter now verifies the child's initial assignment from that field using the same binding checks as the first-tool path. Current native actor/version, owner epoch, spawn result, transcript identity, exact turn, and prepared task hash must match. No path scan or invented tool event is used. Missing, foreign, changed, or stale evidence retains the reservation.

A retry can bind and complete after a matching spawn result arrives, including after Sage off. It can also recover a saved binding whose later transcript-observation publication failed. Duplicate completion requests preserve one record. Later assignments on the same child remain separate work.

Verification, with fake process commands first on PATH:

  • npm run build: passed; generated Codex output committed.
  • npm run check: all checks pass.
  • npm test: 903 tests, 903 pass, 0 fail.
  • node --test --test-name-pattern='no-tool completion' scripts/codex-server.test.mjs: 5 tests, 5 pass, 0 fail.
  • All five tests fail on detached main e42941b and preceding commit 70eb943. Main lacks earlier native preparation prerequisites; the prior commit isolates the missing no-tool behavior.
  • node scripts/probe-codex-lifecycle.mjs --sage-no-tool: passes through actual CLI 0.160.0 with one child model request and no child tool calls. The chief reads, records, inspects, finishes, and accepts the review once on the actual temporary branch commit. The journal has one binding and completion.
  • The exact new probe with probe-only helpers fails on prior runtime 70eb943: zero bindings and completions, a blocked stop, and no completed parent workflow. No production code was copied to that baseline.
  • Direct and nested native report controls pass. The required-hook outage still fails readiness with failClosed: false and zero reservations despite child execution.

Native responses remain simulated, and temporary profiles are removed. This checks the configured fixture hooks, not every combination of other blocking stop hooks. Later tasks, interruption, broader recovery, full policy, a real-project pilot, and installed automatic operation remain unfinished. No real merge or activation ran. Board work remains paused, and this issue remains open.

Codex validation update — 2026-10-13, T33

PR #182 is merged at a0f6674; component issue #181 is closed. Prepared continuations passed 1,133 local tests and 1,133 exact-head CI tests, with two clean code, security and QA review cycles on f5743a5.

The broader integration is pushed at 1076b8a. Its tree is identical to 0b1bbea, which passed all 1,259 tests and the native follow-up probe. Build and check also passed after the merge. These probes use simulated model responses; they do not prove real-model or installed automatic Sage behavior. All local test and probe processes finished.

Next component: #183, preserve historical journals while preventing new duplicate run dispatches. Claude PR #140 remains separate. Installed automatic Sage remains disabled; #94 and upstream openai/codex#41979 remain unresolved. This parent issue stays open.

T34 review and validation — 2026-10-13

Draft PR #184 implements duplicate-run admission while preserving historical journals. Final head 68254c1 has two clean code, security and QA review cycles. Build/check and 56 focused tests pass. Four new tests fail behaviorally on detached main. Exact-head CI run 38425337326 passes all 1,137 tests.

The local full suite reports 1,136 pass and one existing Claude-hook stress-test failure: F-T229-20 terminated its code-of-paths worker after 120 seconds. That hook and test are unchanged; the isolated test passes on detached main. The local full-suite timeout remains unexplained, so #184 stays draft and unmerged. All local test and diagnostic processes finished. Claude PR #140 remains untouched.

T34 merged — 2026-10-13

PR #184 merged at ed7cf14. Reviewed head 68254c1 passed two clean code/security/QA cycles, all 1,137 exact-head CI tests, and all 1,137 local tests with npm test -- --test-concurrency=1. Serial scheduling retained every assertion and internal concurrency test. The previously failing stress case passed in about 9.9 seconds; resource contention is a supported inference, not a proven cause of the earlier timeout. All narrow-PR test processes finished.

The integration has the same fix at local merge f815120. Build/check and 21 focused checks pass. Its full serial suite is running before push. Installed automatic Sage remains disabled; this does not close #88.

Integration validation after T34 — 2026-10-13

Integration f815120 passed build/check, 21 focused checks, and all 1,259 tests with serial file scheduling. The native --sage-followup probe passed on that commit: one native child completed two distinct assignments and turns, the second report was recorded, and the first report remained unchanged. It used the real CLI with simulated model responses. It does not establish real-model behavior, complete policy coverage, or installed automatic Sage. Temporary probe storage was removed and all owned local test/probe processes finished.

Next extraction: #185 (T35), immutable review targets in prepared assignments. Claude #140 remains open and untouched. #94 remains unresolved: the SDK latest release is still 2.3.1.

T35 merged — 2026-10-13

PR #186 merged at e1b590f. Exact head 859c714 passed two clean code/security/QA cycles, build/check, all 1,140 local tests with serial file scheduling, and all 1,140 CI tests (run 38429335076). Three new tests fail on detached main because review options and the parser were absent. A reported newline-regex finding did not reproduce in ten direct checks and the reviewer withdrew it.

Integration 265f008 includes this main merge. It adds documentation and three tests to f815120, whose full 1,259-test suite and native follow-up probe passed. Runtime code is unchanged; all four focused review-target checks and build/check pass on the updated integration. All owned local test/probe processes finished. Saved review targets do not authorize verdicts or merges. Native review wiring, current-record validation, and installed automatic Sage remain unfinished. Claude #140 remains untouched.

T36 merged and integration verified — 2026-10-13

PR #188 merged at 8af7caa. Reviewed head ecee6f4 passed two clean code/security/QA cycles, build/check, all 1,143 local tests with serial file scheduling, and all 1,143 exact-head CI tests (run 38431096618). Three new tests fail on detached main because the API is absent.

Pushed integration cd66953 has the same tree as tested 72b8de1: build/check, 28 focused checks, and all 1,265 full tests pass. The real CLI --sage-report probe passed with simulated responses: exact review evidence produced one matching recorded verdict, retry retained that result, and task/gate/merge approval stayed unchanged. Temporary storage was removed. All owned local tests and probe processes finished.

This does not verify real-model behavior or complete installed policy. Automatic Sage remains disabled. Claude #140 was left untouched.

Activity

  1. added
    codex
    on Oct 9, 2026
  2. erickb336 commented on Oct 9, 2026

    @erickb336
    OwnerAuthor

    The owner asked to build #88 with Claude parity. Automatic coordination with manual merging is the first delivery stage; gated autopilot remains part of the full target. The later parity direction supersedes the earlier proposal to interrupt agents on Sage off: match Claude's mode transition instead.

    First draft: #92. It contains the parity audit, delivery sequence and a reproducible isolated native 0.160.0 transport probe. Build/check pass; the unchanged full suite passes 783/783. The probe verifies spawn/result/start/stop identity joins and running/completed native states with simulated model responses. It does not prove real-model consumption or activate the installed plugin.

    Next checks are denial enforcement, event ordering, compaction/restoration and later-task attribution. Complete policy, reports, capacity release, recovery and the real-project pilot remain unfinished. No automatic merge is authorized.

  3. erickb336 commented on Oct 11, 2026

    @erickb336
    OwnerAuthor

    From the sage's repo pass (run R715), a requirement for activation: once the Codex runtime is on, the prompt identity comes from the MCP client's own clientInfo.version and _meta.threadId (packages/sage-codex/runtime/mcp-server.mjs:21, owner.mjs:51-56). Another process of the same user could start the server or import mode.mjs and record sage mode on with a real root session id. Autopilot stays off (mode.mjs:46), and configuration.md already names this limit. Before activation, #88 must make sure that no Codex agent can write the journal folder or start this server, with a test. Also: the bundled MCP SDK's fast-uri must be updated first (#94).

  4. erickb336 commented on Oct 11, 2026

    @erickb336
    OwnerAuthor

    Codex lifecycle progress: a blocked stop now retains the child slot.

    Saved on codex/issue-88-native-followup in bda0197. This issue remains open. Board work remains paused.

    A native SubagentStop callback does not prove completion. A second hook can block that stop and let the same child continue. The previous code released its slot too early. Sage now records the stop, then requires a protected native task_complete record for the exact assigned turn and retained final message. Parent list, wait, and report-read operations reconcile that evidence. A tool result that says completed cannot release the slot by itself.

    Verification, with fake ps, pgrep, and kill first on PATH for every test and native probe:

    • npm run build: built 247 files.
    • npm run check: all checks pass.
    • npm test: 906 tests, 906 pass, 0 fail, 0 skipped.
    • node scripts/probe-codex-lifecycle.mjs --sage-stop-block: native Codex 0.160.0 resumed the same child after another hook blocked its first stop. Saved completions remained 0 while it continued; the transcript also contained 0 terminal markers then. It later saved one completion and one review verdict. Exit 0; temporary profile removed.
    • The same diagnostic before the fix showed 1 saved completion while the child continued, and exited 1.
    • node scripts/probe-codex-lifecycle.mjs --sage-nested-report: two native children, two saved reports, two completed runs, one verdict, no duplicate verdict on retry. Exit 0; temporary profile removed.
    • All three new tests fail on detached c38eb2a because it returns completed at the first stop. All three also fail on detached main e42941b, which lacks the earlier prepared-task prerequisite. The prior-branch comparison proves this regression; the main comparison is a missing-prerequisite result.

    The first full run found an error-message regression from the refactor and two assertions changed too broadly. These were corrected before the passing full run; the existing assertions remain intact.

    Not verified: real-model consumption or review quality, a real project pilot, complete installed policy, follow-up assignments, compaction and cross-session recovery, or autopilot. These probes use simulated model responses and isolated profiles.

    The separate --sage-hook-outage diagnostic still exits 1: a child starts with zero Sage reservations after the required hook server disconnects. failClosed and readyForActivation remain false. Upstream tracking: openai/codex#41979. This fix does not resolve that activation blocker.

    No merge was attempted. No independent review cycles are claimed for this change.

  5. erickb336 commented on Oct 11, 2026

    @erickb336
    OwnerAuthor

    Codex now gives a child one chance to correct missing report fields, matching Claude's stop behavior.

    Saved on codex/issue-88-native-followup in bb164d6. This issue remains open; full automatic Sage is not enabled.

    The native stop boundary requires the authenticated callback's boolean stop_hook_active and text last_assistant_message. After it verifies the admitted child, missing report headings block the first stop with a correction request. The native retry can finish, so an invalid report cannot create an endless correction loop. A malformed callback or unknown assignment still refuses.

    Terminal completion remains separate from report acceptance. Even an empty, oversized, or invalid final report can release its exact slot after protected native terminal evidence. The report reader still refuses that report. No run completion or review verdict follows from releasing a slot.

    Verification, with fake ps, pgrep, and kill first on PATH for all tests and probes:

    • npm run build: built 247 files.
    • npm run check: all checks pass.
    • npm test: 911 tests, 911 pass, 0 fail, 0 skipped.
    • Focused report-correction, terminal-evidence, and existing packaged-stop tests: 7 pass, 0 fail.
    • All five new tests fail on detached bda0197. They also fail on detached main e42941b, which lacks earlier native preparation and completion APIs. The prior revision isolates this change; the main result includes missing prerequisites.
    • node scripts/probe-codex-lifecycle.mjs --sage-report-correction: actual Codex CLI 0.160.0 returns an incomplete report, continues the same child and turn after the correction, and records a repaired review. Two stop callbacks carry false then true retry flags. Capacity remains held during correction. One report and one verdict are saved. Exit 0; temporary profile removed.
    • node scripts/probe-codex-lifecycle.mjs --sage-report-escape: the child returns the same invalid report twice. It ends on the second stop, releases one slot, saves no report or verdict, and leaves its task run unchanged. Exit 0; temporary profile removed.
    • Existing --sage, --sage-stop-block, and --sage-nested-report controls pass and remove their profiles.
    • --sage-hook-outage still exits 1: the required server outage permits a native child with zero reservations. failClosed and readyForActivation remain false.

    The native probes use simulated model responses. They do not prove review quality, a real project pilot, full command/path policy, follow-up and recovery behavior, installed automatic coordination, or autopilot. No real merge ran. No independent review cycles are claimed for this change.

    Claude's hook source and the board were not changed. The shared field-presence helper ships in core; Codex owns the native stop handling.

  6. erickb336 commented on Oct 11, 2026

    @erickb336
    OwnerAuthor

    Codex recovery progress: a verified unknown-model spawn rejection now frees its reserved slot once.

    Implementation: 31fc819. Saved branch head: a9d344b on codex/issue-88-native-followup, after a clean merge of main fb48e83 (#115). This issue remains open.

    The initial native diagnostic showed the failure: Codex rejected an unknown model after Sage reserved capacity, created no child, and emitted no post-tool hook. One reservation remained occupied. A configured PostToolUseFailure hook did not appear in the 0.160.0 hook list or run.

    The adapter now checks the protected issuer transcript before a new spawn and after list/wait operations. It requires the current actor and owner, exact call and turn, original request, matching argument hash, native output metadata, and the verified unknown-model error for that dispatched model. Other errors retain capacity. Any successful dispatch result, child-start evidence, or existing binding also retains capacity on this path.

    Core saves an immutable failure receipt and releases capacity once. A retry cannot obtain a second permission for the failed call; it needs a new preparation and call. A late binding cannot revive failed work. Conflicting evidence refuses, and a binding/failure race can produce only one outcome. This does not complete a task or accept a report.

    Verification, with fake ps, pgrep, and kill first on PATH for every test and native probe:

    • npm run build: built 249 files, including regenerated plugin output.
    • npm run check: all checks pass.
    • npm test before the main merge: 919 tests, 919 pass, 0 fail.
    • npm test after the main merge: 927 tests, 927 pass, 0 fail, 0 skipped.
    • Focused failure tests: 8 pass, 0 fail. They cover exact/stale identity, unknown errors, forged metadata, duplicate output, linked transcripts, contradictory start/result evidence, lead ownership, mode off, duplicate receipts, retries before dispatch, and concurrent binding/failure.
    • All eight new tests fail on detached prior bb164d6 and detached current main fb48e83. Main also lacks earlier native preparation APIs; the prior revision isolates the new failure behavior.
    • node scripts/probe-codex-lifecycle.mjs --sage-failed-spawn: actual Codex CLI 0.160.0 with total capacity one rejects the first model, records its failure, then starts and completes a new child in the released slot. The journal contains two reservations, one failure, one binding, and one completion. Exit 0; temporary profile removed. The same route passes after the main merge.
    • Existing --sage-nested-report and --sage-report-escape controls pass and remove their profiles.

    An early probe retry reused a tool-call ID and failed its own duplicate-result check. The probe now uses separate identities for the failed dispatch, status read, new preparation, and retry. The passing runs used that correction.

    Not verified: other native failure kinds, interruption, follow-up assignment recovery, cross-session recovery, full command/path policy, required clean review cycles, a real project pilot, installed automatic operation, or autopilot. Native model responses are simulated. No independent review cycles are claimed for this change. The separate required-hook outage activation blocker remains unresolved; this recovery path cannot prevent an unverified initial dispatch.

    No PR was merged by Codex, and main was not pushed. Board and Claude hook changes arrived only through the required main merge; this implementation remains Codex recovery plus shared admission code.

  7. erickb336 commented on Oct 11, 2026

    @erickb336
    OwnerAuthor

    Codex command-policy progress: the native input boundary is now verified, and a strict command evidence reader is implemented on codex/issue-88-native-followup in 1c4a902 (following the probe in cc34790).

    Codex CLI 0.160.0 exposes exec_command to the model but sends hooks Bash with only command. The original call is present in the protected native transcript before the pre-tool callback. The native probe recovered the exact shell, working directory, terminal setting, and command using the production reader.

    readNativeCommand checks session, actor, parent/path, turn, call ID, native record metadata, version, and exact command text. It rejects duplicate calls, completed calls/turns, linked paths, incomplete input, and identity conflicts. It preserves all original arguments for later policy validation. It does not authenticate the hook caller or grant command permission.

    Verification, with fake process tools first on PATH:

    • npm run build: built 251 files.
    • npm run check: all checks pass; three inherited timing bounds remain annotated.
    • npm test: 930 tests, 930 pass, 0 fail.
    • node --test packages/sage-codex/runtime/native-command.test.mjs: 3 pass. The same three tests fail on detached main fb48e83, where the reader is absent.
    • node scripts/probe-codex-command.mjs: verified the production reader during the actual pre-tool callback, and checked native command exit code 0 and exact output.
    • node scripts/probe-codex-lifecycle.mjs --sage-failed-spawn: verified recovery and a successful child after the rejected dispatch.

    Limits: these native probes use fixed simulated model responses in fresh temporary profiles. Full command policy assembly, installed automatic coordination, real-model behavior, and the complete required-hook failure matrix remain unverified. The known required-hook outage still gates activation. No merge or automatic merge occurred. Board work remains paused, and Claude-owned work was not changed.

    Next: consume the verified command envelope in the native command policy adapter, including shell, working directory, and permission fields.

  8. erickb336 commented on Oct 11, 2026

    @erickb336
    OwnerAuthor

    Native command policy integration is implemented in 451c717 on codex/issue-88-native-followup.

    While Sage is on, the composed policy now verifies the original command before calling its evaluator. It supplies all original arguments in context.command. Missing or conflicting evidence refuses the operation before evaluation. An admitted child must first prove its binding; its saved start supplies the expected parent and task path.

    The native probe now runs through the composed Sage policy, with mode on. A receipt from the evaluator confirms the exact recovered fields and call identity. Both routes use the same fixed harmless command:

    • Allow: actual native execution exits 0 and produces the exact expected output.
    • Deny (--deny-command): the model receives the fixed denial; no command-execution event or post-tool callback occurs.

    Verification with fake process tools first on PATH:

    • npm run build: built 251 files.
    • npm run check: all checks pass, with three inherited annotated timing bounds.
    • npm test: 933 tests, 933 pass, 0 fail.
    • Three new native command policy tests pass. All three fail on detached main fb48e83 and on the previous commit 1c4a902.
    • Native command allow and deny probes pass on CLI 0.160.0.
    • The native failed-spawn recovery control passes.

    This verifies command input recovery and denial through a healthy hook connection. The fixed test policy is not the complete product policy. Shared command/file/role rule assembly, real-model consumption, installed automatic coordination, and the required-hook failure matrix remain incomplete. The known hook-outage blocker still gates activation. No merge occurred, and Claude-owned work was not changed.

  9. erickb336 commented on Oct 11, 2026

    @erickb336
    OwnerAuthor

    Command execution-context evidence is saved in 060aa64 on codex/issue-88-native-followup.

    The native probe now compares explicit shell/workdir input with omitted defaults. Its fixed harmless command also runs pwd, and the check compares the actual output without publishing the temporary path.

    Verified on CLI 0.160.0:

    • An explicit workdir sends execution to a child folder, but the hook's top-level cwd still names the session workspace.
    • Omitted workdir uses the session workspace in this local fixture.
    • The native execution event names /bin/sh for the explicit route and /bin/zsh for the default route on the tested Mac. This is not a portable default-shell guarantee.
    • The saved turn context exposes the session cwd, but no shell or selected-environment field in this capture.
    • Allow and deny routes pass for both explicit and omitted defaults. Denied commands produce no execution event or post-tool callback.

    The matching official source also accepts fields omitted from the visible model schema, including login, timeout, extra permissions, and environment selection. It resolves workdir against the selected environment and uses a supplied shell path to choose a shell type before discovering an executable. The source links and implications are in packages/sage-codex/runtime/native-command-boundary.md.

    This prevents two incorrect adapter assumptions: that hook cwd is always execution cwd, or that a supplied shell path is the exact executable. The complete adapter still needs trusted execution context and validation of every accepted field. Original-call recovery alone does not provide that context.

    Validation with fake process tools first on PATH:

    • Build: 251 files. Check: all checks pass.
    • Full suite: 933 tests, 933 pass, 0 fail.
    • All four command probe routes pass; the existing native failed-spawn recovery control also passes.

    This unit adds native evidence, not a production command rule or new regression tests. The probes still use simulated model responses and fresh temporary profiles. Full policy assembly, installed automatic coordination, the real-project pilot, and the known required-hook outage remain unresolved. No merge or activation occurred. Claude-owned work and the paused board were not changed.

  10. erickb336 commented on Oct 11, 2026

    @erickb336
    OwnerAuthor

    Shared shell-write rules are available for Codex in 55e4feb on codex/issue-88-native-followup.

    commandWrites(text, cwd) now ships through the public core API and the Codex file-policy adapter. It classifies file redirections, writer programs, in-place options, interpreter code options, and reader options that can launch another program. It preserves option values and actual function/reader dispatch boundaries. Unreadable text and non-string input count as possible writes.

    The rules for string input match the existing Claude hook exactly. The new public API adds a non-string guard after a test found that the parser accepts an object as harmless input. Claude's source hook remains unchanged while its active work continues. Its later adoption of this shared API is separate work; regenerated shared core output is included in both provider bundles.

    Validation with fake process tools first on PATH:

    • npm run build: built 254 files.
    • npm run check: all checks pass; three inherited annotated timing bounds remain.
    • npm test: 936 tests, 936 pass, 0 fail.
    • Three new focused tests pass against isolated provider bundles. All three fail on detached main fb48e83 and the preceding commit 060aa64, where the new API is absent.
    • Test command strings reached only the parser. No writer, preprocessor, interpreter, or attack string was executed.

    This is a classifier, not command permission. A false result does not prove that arbitrary scripts cannot write. Codex still needs to connect the classifier to verified execution context, logbook paths, role restrictions, and the rest of the command rules. Full policy assembly and installed automatic support remain incomplete. The known required-hook outage still gates activation. No merge or activation occurred; board work remains paused.

  11. erickb336 commented on Oct 11, 2026

    @erickb336
    OwnerAuthor

    Direct patch protection is implemented in 23312f3 on codex/issue-88-native-followup.

    The Codex patchEditDecision component combines the existing chief edit rule with shared protected-path checks. It checks add/update/delete targets and both ends of moves. It resolves links before parent traversal, checks missing targets and protected ancestors, folds case/Unicode conservatively, and refuses multiple hard links or paths it cannot check. A separate patch target parser replaces loose advice extraction for this authorization check.

    Native CLI 0.160.0 verification, using fixed simulated responses and a fresh temporary profile:

    • Sage off: an ordinary patch creates the exact expected file.
    • Sage off with --protected-target: the real policy denies the logbook patch; the target stays absent.
    • Sage on with --chief: the real policy denies the chief's ordinary patch; the target stays absent.
    • Receipts match native call identity and policy decisions. Denied routes produce no file-change event or post-tool callback.
    • The native custom apply_patch tool reaches hooks as apply_patch with one command string.

    Validation with fake process tools first on PATH:

    • Build: 258 files. Check: all checks pass, with three inherited annotated timing bounds.
    • Full suite: 940 tests, 940 pass, 0 fail.
    • Four new focused tests pass in isolated bundles. All four fail on detached main fb48e83 and the previous commit 55e4feb.
    • Native command and failed-spawn recovery controls still pass.
    • Main was refreshed and remains fb48e83; no merge was needed.

    The caller must authenticate actor/mode and supply trusted roots and the verified execution directory. This component is not an installed entry point or a complete file policy. Active-child editing, remote execution, concurrent link changes, shell writes, other editing tools, and the real-project pilot remain unverified. Filesystem sandboxing remains necessary. The known required-hook outage still gates activation. Claude's source hook and the paused board were not changed. No merge or automatic activation occurred.

  12. erickb336 commented on Oct 11, 2026

    @erickb336
    OwnerAuthor

    Codex support update: 8dab101 adds a shared shell-path check and a Codex decision adapter on codex/issue-88-native-followup.

    Known write forms now check literal targets, attached option values, assignments, redirections, directory changes, symlinks, and hard links against fixed logbook roots. Bounded final-segment globs inspect matching entries. Unresolved paths return a denial. Ordinary reads and project writes have passing cases. Tests pass attack strings to the parser only.

    Verification:

    • npm run build: built 261 files.
    • npm run check: all checks pass; 3 existing annotated timing bounds.
    • Focused provider tests: 3 passed, 0 failed.
    • npm test: 943 passed, 0 failed, 0 skipped.
    • All 3 new tests fail on detached main fb48e83 and prior revision 23312f3, because the new policy exports are absent.
    • Fake ps, pgrep, and kill were first on PATH for every test run.

    Limits: this is a tested component, not installed automatic enforcement. It does not authorize arbitrary scripts or prove complete shell, role, state-tool, or execution-environment policy. The caller must supply verified execution context; filesystem sandboxing still matters. No new native end-to-end claim or independent review-cycle completion is made here.

    Issue #88 remains open. Complete coordination and recovery, a real-project pilot, and separate autopilot acceptance remain. The known required-hook outage still prevents activation. Board work remains paused; full Sage support in Codex is the priority.

  13. erickb336 commented on Oct 11, 2026

    @erickb336
    OwnerAuthor

    Codex support update: cea5a98 verifies original native command evidence while Sage is off, on codex/issue-88-native-followup.

    Logbook and state-tool rules must have the full original input in both modes. The native policy now recovers it for every Bash event. Missing or conflicting evidence stops evaluation. Off-mode children use their protected native transcript for identity without a Sage admission or start callback. Later turns need their own pending command evidence; old completed turns and conflicting stored identity are refused. Active Sage children still need admission.

    Verification:

    • npm run build: built 261 files.
    • npm run check: all checks pass; 3 existing annotated timing bounds.
    • Focused command tests: 7 passed, 0 failed.
    • Final npm test: 947 passed, 0 failed, 0 skipped.
    • All 4 new tests fail on detached main fb48e83 and prior revision 8dab101. Main lacks prerequisite native input support; the prior revision omits off-mode command evidence and accepts missing evidence.
    • Real Codex CLI 0.160.0 checks passed for off-mode explicit execution, off-mode default execution, off-mode denial, and the on-mode control. The final denial check returned the fixed reason with no command execution or post-tool callback. These use disposable profiles, a loopback server, and fixed simulated responses.
    • Fake process tools were first on PATH for all tests and probes. Attack strings went only to parsers.

    Two fixture defects surfaced during verification: the new tests needed explicit protected-root/task setup, and the native fixture still restricted its fixed command to on mode. Those fixtures were corrected. The final child tests also initialize the configured observation directory; production readers still reject missing or invalid storage.

    Limits: native command execution was checked for the root actor. Off-mode child and later-turn cases have fixture evidence, not a new native child-command probe. Complete command/role/state-tool enforcement, installed operation, real-model behavior, and independent review cycles are not claimed. The required-hook outage issue remains open, so activation remains gated. #88 stays open.

  14. 26 remaining items

  15. erickb336 commented on Oct 15, 2026

    @erickb336
    OwnerAuthor

    Runtime integration checkpoint: codex/t17-child-compaction is pushed at b4759f81f251d8b1eb336c14ce2b5dcdf106b471, including merged #244. The remote head was verified.

    Build/check, 42 focused checks, four fixture checks, and all 1,465 full-suite tests pass. Both native capacity routes pass: initial spawn rejection and prepared follow-up rejection, each with a successful fresh retry. The integration fixture preserves its extra initial child control and blocked-stop check. Temporary profiles were removed and all test/probe processes finished.

    These checks use actual CLI 0.160.0 with simulated model responses. They do not establish real-model behavior or installed automatic Sage. #245 is now testing active-child process restart separately. #239 and #243 remain open, and Claude #140 remains untouched.

  16. erickb336 commented on Oct 15, 2026

    @erickb336
    OwnerAuthor

    PR #247 merged at 654bc8c575d8b1556522a5d6a3eb9e97c84e5fc9 and closed #245. Its reviewed head passed all 1,408 local and CI tests, build/check, 16 focused tests, three direct-native observations, and two clean code/security/QA cycles. The native routes use simulated model responses; their temporary profiles were removed and all owned processes ended.

    The result distinguishes clean shutdown from abrupt native loss. Clean shutdown supplies persisted interruption evidence. Abrupt loss does not in the observed resume phases, including a separate saved-child load. Sage retains the unresolved reservation. The missing recovery contract is now tracked in #246 / Codex task T5.

    Broader integration of #247 is in progress. The prior pushed checkpoint remains b4759f8, with all 1,465 tests passing. Full automatic Sage is still incomplete; #239, #243, #246 and the upstream fail-closed dependency remain separate. Claude #140 remains open and untouched.

  17. erickb336 commented on Oct 15, 2026

    @erickb336
    OwnerAuthor

    PR #249 merged at 998d8662cc945c286c0394ede750dd8bd30982fb and closed #248. Reviewed head fef171bfac8543468dd2dd993d3be30447811df3 passed build/check, nine focused checks, all 1,413 local and exact-head CI tests, and two clean code/security/QA cycles.

    The exact-head native nested handoff verifies two children, two saved reports, two finished runs, one pinned review verdict, and an unchanged retry. Protected transcripts and hook records match both identities and briefs. Responses are simulated; capture and cleanup passed. This preserves workflow evidence on main, not real-model review quality or installed automatic operation.

    Integration checkpoint 478d4a3 is pushed and verified with 1,481 tests. It includes #247 but does not yet include #249; that merge and its preservation checks are underway.

    Remaining implementation depends on Claude #140 for shared task mutations and #239 lead ownership, #243 trusted execution context, upstream openai/codex#41979 required-hook failure behavior, and #246 durable crash settlement. Claude #140 remains untouched. A local post-#140 design now accounts for task/run/decision transactions and validated recovery; it is preparation, not shipped code. Board #100 stays deferred and #119 remains Claude-owned. This parent issue stays open.

  18. erickb336 commented on Oct 16, 2026

    @erickb336
    OwnerAuthor

    Research: a usable Codex workflow can precede full hook enforcement

    The owner asked whether Sage can defer the hook-dependent guarantees and follow existing pstack Codex ports. Source inspection supports a separate, explicitly invoked workflow path. This is a proposed implementation direction, not a completed experiment or a default change.

    Inspected examples:

    • michael-denyer/pstack-claude, Codex mapping: shared skills map to native agent tools. Its Codex hook manifest contains SessionStart routing only. The mapping explicitly supports skills-only installation with explicit invocation or AGENTS.md guidance. Some tool descriptions differ from this session, so adopt the pattern rather than copying the mapping unchanged.
    • mdsmithaustin/pstack, mode skill: the mode gives explicit skill-loading and delegation rules. Its Codex metadata disables implicit invocation. Its PORTING.md records harness adaptations and evaluation findings; those are the project's reports, not independently reproduced Sage results.
    • Aqua-123/pstack-for-codex, adaptation: explicit skills with optional trusted lifecycle hooks. Without verified persistence it reports current-turn-only mode. Its hook manifest covers startup/resume context and mode propagation, not a PreToolUse execution-policy gate.

    Proposed next deliverable:

    1. An opt-in, explicitly invoked Sage skill for Codex: read the relevant workflow/principles, delegate through available native agent tools, collect reports, verify results, and keep the task logbook current.
    2. Keep existing permissions, state-tool validation, ownership checks and review requirements. Do not disable all hooks or delete enforcement code. State precisely which checks are enforced by a tool and which depend on the agent following instructions.
    3. Make lifecycle advice hooks optional for this path. Do not promise persistent activation across compaction or restart without observed evidence; use explicit re-entry and recovery instructions.
    4. Keep full automatic enforcement and uncertain crash recovery as open support gaps: [Hooks] Add opt-in fail-closed handling for PreToolUse hook failures openai/codex#41979, Expose trusted resolved execution context to policy hooks openai/codex#54427, Provide durable reconciliation for orphaned child turns after process loss openai/codex#54428, plus the associated Sage issues. Do not automatically release uncertain work or claim the full Missing feature: automatic Sage workflows and gated autopilot in Codex #88 acceptance is met.
    5. Evaluate this path using the existing principle-delivery experiment criteria, including delivery, timing, repeats, application and task outcomes. Port adoption alone does not prove equivalent quality.

    The separate dependencies on Claude #140 and cross-task PR ownership (#239) remain. This research does not authorize edits to Claude-active work. No plugin configuration, installed defaults, production code, or protective checks changed during the research.

  19. erickb336 commented on Oct 21, 2026

    @erickb336
    OwnerAuthor

    PR #278 is merged as 48f3719 and closes #274 (T22). Its exact reviewed head 19976b1 passed build/check, all 1,899 local and 1,899 CI tests, and two clean independent code/QA cycles. Three native CLI 0.160.0 recovery diagnostics passed with fixed simulated replies and cleanup. Portable replay checks consistency; the native reader supplies provenance in the actual trial.

    This completes a diagnostic component, not installed automatic Sage or real-model behavior. PR #279 / #275 (T23) now integrates the new main; #276 (T24) follows. Ownership #239, trusted execution context #243, abrupt-loss recovery #246, route/gate design #266 and required-hook failure handling remain open. #283's watcher cause remains unknown despite later passing unchanged controls and the current full suite. Board #100 stays deferred; Claude's active PR #288 is excluded.

  20. erickb336 commented on Oct 21, 2026

    @erickb336
    OwnerAuthor

    PR #279 merged as 947c834 and closed #275 (T23). The exact reviewed head 7d8982a passed build/check, all 1,902 local and 1,902 CI tests, eight native CLI 0.160.0 diagnostic trials with fixed simulated replies, and two clean independent code/QA cycles.

    The owner-approved G4 scope preserves active-retarget and premature-finish earlier refusals, unchanged protected rows and authentic later settlement. The retired later-tool ordering remains unproved. This is diagnostic coverage, not installed automatic Sage.

    #276 (T24) now integrates the latest main. #239, #243, #246, #266 and required-hook failure handling remain separate unfinished requirements. #283's watcher cause remains unknown despite current passing full suites. Board #100 stays deferred. Claude's active PR #288 remains excluded.

  21. erickb336 commented on Oct 21, 2026

    @erickb336
    OwnerAuthor

    Codex checkpoint: PR #290 is merged at 97a02e25, and #276 is closed. The exact reviewed head passed 1,917 local tests and 1,917 CI tests, with two clean code-review and QA cycles. The diagnostic batch #274–#276 is complete; these simulated-model diagnostics do not activate automatic Sage.

    T26 now has a local external-controller design and actual CLI 0.160.0 feasibility observations. Request matching works with out-of-order replies. A pending native command approval can be interrupted, and a running direct command can be terminated through its exact owned handle with a terminal result. All final probe processes exited and disposable profiles/listeners were removed. No paid inference ran.

    A key limit is established: permitted direct and agent commands can execute without an approval request. A controller that only listens for approvals therefore cannot enforce the complete Sage contract. The next work maps the actual execution boundary and shared ownership writers before implementation. This does not waive #239, #243, #246 or #266.

    #283 stays open because the earlier watcher failure cause remains unresolved despite current passing suites. Board #100 stays deferred. Claude PR #288 and Claude-owned issues remain untouched. Installed automatic Sage and autopilot remain unfinished; this parent stays open.

  22. erickb336 commented on Oct 21, 2026

    @erickb336
    OwnerAuthor

    T29 is merged in #292 at 2f351c44e47c5e742e0bf7a87533388845b54797; component issue #291 is closed. The merged tree matches reviewed head 7337432697c7ea02ba8ad863d850785787446e29 exactly.

    This adds the transport foundation for the approved opt-in terminal controller. It binds typed request IDs and connection generations, reapplies environment restrictions on every turn, and settles initialization as uncertain after disconnect. It provides no generic effect request, process launcher or automatic task acceptance.

    Verification:

    • Build and check passed.
    • All 1,940 local tests passed, with zero failures, cancellations or skips.
    • Exact-head CI 39677026141 passed all 1,940 tests.
    • Two clean independent code/security/QA review cycles completed on the final head.
    • Actual CLI 0.160.0 transport and two-process restart controls passed with simulated replies, explicit restrictions and no tool effects or paid inference. Owned processes/listeners settled and temporary profiles were removed.
    • Identical tests fail on detached main because the new API is absent. The disconnect regression also failed behaviorally on the preceding implementation before repair.

    The next launch requirement is explicit: a configured ordinary MCP server still initializes and appears in the model catalog under environments=[]. A paired known-server disable removes it. These bounded controls do not prove full execution isolation. The process adapter must account for ordinary MCP routes, complete configuration, owner authority and protected effects before live activation.

    Full Sage/autopilot, hierarchy, shared ownership, route/gate completion and authoritative recovery remain unfinished. Codex desktop keeps manual coordination. Defaults are unchanged. Claude PR #288 remains separate; board #100 stays deferred. This parent issue remains open.

  23. erickb336 commented on Oct 21, 2026

    @erickb336
    OwnerAuthor

    Codex progress: PR #294 is ready for review at cac726e. Build/check, all 1,956 local tests and two independent code/security/QA cycles pass. Exact-head CI run 39682378929 is still running; no merge is claimed.

    A new actual CLI 0.160.0 paired control confirms another pre-model requirement, tracked in #295: ordinary configured MCP tools can execute despite environments=[] and the existing controller flags. A harmless owned fixture received exactly one tools/call and returned a matching fixed synthetic receipt. Disabling that known server refused the identical emitted call. Both native handles/listeners/profiles cleaned up. No paid inference or external effect occurred. Independent diagnostic code review is clean; full investigation/evidence-review remains unfinished.

    The process owner still exposes no model-turn operation. Complete tool/startup isolation, shared ownership, trusted effect context, route/gate completion, authoritative recovery and installed pilot acceptance remain required. Claude PR #288 and active Claude-owned work remain untouched. No default or installed mode changed.

  24. erickb336 commented on Oct 21, 2026

    @erickb336
    OwnerAuthor

    PR #294 is merged at 113edff and #293 is closed. The merged tree is identical to the reviewed head cac726e. Build/check, 1,956 local tests, 1,956 exact-head CI tests and both independent code/security/QA cycles pass.

    The process owner exposes startup, configuration inspection, status and bounded shutdown only. It admits no model turn or effect. #295 tracks the actual ordinary-MCP execution gap under the current environment restriction. Full #88 remains open; current Claude work remains excluded.

  25. erickb336 commented on Oct 21, 2026

    @erickb336
    OwnerAuthor

    T31 is merged in PR #297 at bf7cecb. Component issue #296 is closed.

    The controller now has a strict native-request binding that snapshots trusted assignment data and refuses stale connections, foreign turns, forged fields, invalid arguments, duplicate calls and closed bindings. It stages data only; it grants no action authority.

    Validation on reviewed head fe74131: build/check passed; 1,970 local tests and 1,970 exact-head CI tests passed. Two fresh code/security/QA cycles are clean. Final tests fail on detached main because the API is absent; two repair regressions also fail the old feature head and pass the final head. The merged tree is identical to the tested tree.

    Review found and removed an unsafe Promise observer. The explicit contract requires trusted synchronous validators that own their asynchronous resources; hook-free Promise refusal does not claim arbitrary rejection containment.

    Full automatic Sage and gated autopilot remain unfinished. Open dependencies remain #295, #243, #239, #246, #266 and the validation prerequisite #283. Board #100 stays deferred. No installed activation or default change occurred. Claude PR #288 remains untouched. All owned local commands and reviewer agents are terminal.

  26. erickb336 commented on Nov 9, 2026

    @erickb336
    OwnerAuthor

    Closing as done. Codex autopilot merges on its own after clean cycles: PR #455 (T677), with follow-ups #456 (T823) and #460 (T896). It was proven on the Codex CLI 0.164 and on the desktop app's Codex 0.167. The one real desktop pilot on a small task is tracked as sage task T731. Owner decision 2026-11-09.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    codex

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions