You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix Codex setup with Claude JSON event arrays and Grok API-key authentication #58
Codex setup against pstack 1.3.0 fails at two provider boundaries. Claude Code 2.1.263 emits a JSON event array containing a successful terminal result, while parseClaude accepts only a single object. Grok models exits successfully, lists grok-4.6, and reports You are using XAI_API_KEY., while the preflight requires logged in. Preserve legacy result objects, terminal failure handling, exact model evidence, and authenticated live probes. Add regression coverage for both cases and verify the installed candidate from the real Codex surface. Optional Astra support overlaps PR #55; model extension routing will align with that work.
Reviewer model: Claude Opus 5.5, reviewing in a separate context.
Rubric: the factory-adjudicate plan checklist.
The design for both defects is sound: Claude JSON event arrays parsed by their final type:"result" event, and Grok XAI_API_KEY preflight accepted only with the exact model listed. Three gates fail.
Stale base. The plan says "Implement from current main". The runner files it edits have changed a great deal since 2026-09-09, and two open PRs change them further:
What passes: add a phase for Fix runner subprocess I/O for Codex provider probes #94's stdin finding. Send the prompt through a child-stdin path that works where Bun's stdin pipe write fails. Add regression coverage for the write path, and classify the failure accurately. Keep the explicit-timeout and no-fallback behaviour unchanged. Name the exact mechanism in the plan. If it needs an empirical check on a host that reproduces EPERM, list that under Open questions; don't guess.
Factory plan verdict: approve, with Phase 4 removed
Card: Delivery 8ea81502, plan-review revision 11.
Planner model:gpt-6.1-sol.
Reviewer model: Claude Opus 5.5, reviewing in a separate context.
Rubric: the factory-adjudicate plan checklist.
The open question, resolved by the maintainer's delegate
The plan asked which host reproduces #94's Bun child-stdin EPERM. I tested the plan's exact control on the operator's Mac with Bun 1.4.0. Bun.spawn(["cat"], {stdin:"pipe"}), then stdin.write, returned "STDIN_CONTROL\n" with exit 0:
directly;
inside a Codex 0.160.0 workspace-write session with network disabled;
inside a danger-full-access session.
The report names Bun 1.4.2 on an unspecified host. No accessible host reproduces it.
Decision: remove Phase 4 (the regular-file stdin transport) and the #94 rows from this PR's scope. Changing transport with no reproduction would be a speculative change that the plan's own empirical gate forbids. #94's stdin part stays open until someone reproduces it on a known host.
Acceptance amendment for #58, approved by the maintainer on 2026-10-04
The plan's live Claude JSON event-array item is accepted as covered by regression tests. Claude Code 2.1.289 emits a single result object under the runner's --output-format json flags. It emits the event-array form only with --verbose, which the runner doesn't pass. So a real-surface array can't be produced. The live gate on PR #130 (heads 5d75866 and 927a7b6) covered the legacy-object path, and Grok XAI_API_KEY preflight from both parents. #94's stdin part stays open, as approved. The post-merge checks passed on main 67c08fa.
Activity
ericlitman commentedon Oct 1, 2026
Prior art: #59 (Claude event arrays) and #75 (Grok
XAI_API_KEYauth). Planned as one PR with the stdin part of #94.ericlitman commentedon Oct 4, 2026
Factory plan verdict: revise
8ea81502, plan-review revision 8.gpt-5.6-sol.The design for both defects is sound: Claude JSON event arrays parsed by their final
type:"result"event, and GrokXAI_API_KEYpreflight accepted only with the exact model listed. Three gates fail.Stale base. The plan says "Implement from current
main". The runner files it edits have changed a great deal since 2026-09-09, and two open PRs change them further:shlauncher withentry.ts.What passes: build on
origin/factory/issue-124(e257bad), which contains Preserve Grok terminal failures and complete runner evidence [#78] #126, and land after Preserve Grok terminal failures and complete runner evidence [#78] #126 and Explain Codex sandbox restrictions before pstack setup probes [#124] #129. Update by merging, never by rebasing or force-pushing. Re-anchor every finding and line reference to that base, and recompute the pre-fix baseline there.Missing scope. On 2026-10-01, triage put the stdin
EPERMpart of Fix runner subprocess I/O for Codex provider probes #94 into this PR. Bun's child-stdin write fails withEPERMon some hosts, while Node's child-process path succeeds. The Cursor status-pipe part of Fix runner subprocess I/O for Codex provider probes #94 moved to Support Cursor CLI as an external worker provider #71.What passes: add a phase for Fix runner subprocess I/O for Codex provider probes #94's stdin finding. Send the prompt through a child-stdin path that works where Bun's
stdinpipe write fails. Add regression coverage for the write path, and classify the failure accurately. Keep the explicit-timeout and no-fallback behaviour unchanged. Name the exact mechanism in the plan. If it needs an empirical check on a host that reproducesEPERM, list that under Open questions; don't guess.Grok preflight against Preserve Grok terminal failures and complete runner evidence [#78] #126. Preserve Grok terminal failures and complete runner evidence [#78] #126 changed how Grok failures are classified. Show that
XAI_API_KEYacceptance composes with it:Add a regression for each against the new base.
Keep the 4-file budget as a guide; #94 adds
run.ts/run.test.tswork, not new files. Prior art: #59, #75.ericlitman commentedon Oct 4, 2026
Factory plan verdict: approve, with Phase 4 removed
8ea81502, plan-review revision 11.gpt-6.1-sol.The open question, resolved by the maintainer's delegate
The plan asked which host reproduces #94's Bun child-stdin
EPERM. I tested the plan's exact control on the operator's Mac with Bun 1.4.0.Bun.spawn(["cat"], {stdin:"pipe"}), thenstdin.write, returned"STDIN_CONTROL\n"with exit 0:workspace-writesession with network disabled;danger-full-accesssession.The report names Bun 1.4.2 on an unspecified host. No accessible host reproduces it.
Decision: remove Phase 4 (the regular-file stdin transport) and the #94 rows from this PR's scope. Changing transport with no reproduction would be a speculative change that the plan's own empirical gate forbids. #94's stdin part stays open until someone reproduces it on a known host.
Why approve the rest
origin/factory/issue-124(e257bad, which contains Preserve Grok terminal failures and complete runner evidence [#78] #126 and Explain Codex sandbox restrictions before pstack setup probes [#124] #129), with no rebase or force-push.type:"result"event, with errors rejected before text is accepted.XAI_API_KEYpreflight needs exact, bounded model evidence and fails closed on an explicit "not supported" or "unauthenticated" message.Noneonce Phase 4 is removed.Build conditions
runProcessstdin handling.XAI_API_KEY, if the operator provides a key. Otherwise the plan records that as blocked.fix(#58): accept Claude terminal event arrays without masking errors
fix(#58): accept Grok API keys without bypassing preflight failures
fix(#58): merge main to retain merged prerequisite updates
Merge pull request #130 from ericlitman/factory/issue-58
fix(ericlitman#58): integrate Grok failure and sandbox prerequisite base
Merge upstream ericlitman#130 into the local build
ericlitman commentedon Oct 4, 2026
Acceptance amendment for #58, approved by the maintainer on 2026-10-04
The plan's live Claude JSON event-array item is accepted as covered by regression tests. Claude Code 2.1.289 emits a single result object under the runner's
--output-format jsonflags. It emits the event-array form only with--verbose, which the runner doesn't pass. So a real-surface array can't be produced. The live gate on PR #130 (heads 5d75866 and 927a7b6) covered the legacy-object path, and GrokXAI_API_KEYpreflight from both parents. #94's stdin part stays open, as approved. The post-merge checks passed on main 67c08fa.