Skip to content

fix: preserve native process failure diagnostics - #59

Merged
xxchan merged 2 commits into
mainfrom
fix/process-startup-diagnostics
Oct 2, 2026
Merged

xxchan merged 2 commits into
mainfrom
fix/process-startup-diagnostics

Conversation

@xxchan

@xxchan xxchan commented Oct 2, 2026

Copy link
Copy Markdown
Member

Installation and Codex startup failures currently lose the native reason, leaving hosts with only Failed to run ... or app-server exited. Preserve exit code, signal, timeout or spawn error, and the final 8 KiB of stderr in the existing error message and cause so a host can distinguish a missing executable from a native crash when deciding whether to repair configuration or retry.

The shared process layer continuously drains stderr into a bounded buffer and still forwards it when OAR_CHILD_STDERR=inherit. Codex pending and subsequent RPCs retain the exit diagnostics. Also handle the parallel spawned rejection: a real missing-executable regression showed that catching session initialization otherwise still left an unhandled rejection capable of terminating the host.

Windows Codex CI now forwards stderr; an absent trace directory produces an artifact warning while the failed startup/test step continues to fail the job. Existing timeouts, assertions and record shapes are unchanged. Ordinary nonzero readiness exits remain unsupported-installation results. No automatic retry policy is added.

Validation:

  • CI=true pnpm run check and pnpm run build.
  • CI=true pnpm tsx sea-trial/all.ts: mock and all three aimock backends passed, with Claude 2.1.287, Codex 0.160.0 and Pi SDK 1.0.0. The final run uses Codex 0.160.0 for both warmup and sessions.
  • Codex and Claude vendor suites: 10 and 12 applicable tests passed.
  • New regressions cover exit codes, timeout vs external signal vs maxBuffer, ENOENT/EINVAL, synchronous spawn errors, stderr flooding beyond pipe capacity, UTF-8 truncation, passthrough, and pending/later RPC failures.

One local Linux run captured SQLite initialization errors while concurrent cases shared a temporary Codex home; the retained evidence and limitations are recorded in the issue. The unchanged baseline and patched rerun passed. This improves diagnosis; the Windows root cause remains open.

Refs #57.

@xxchan
xxchan merged commit 33cc7a4 into main Oct 2, 2026
12 checks passed
@xxchan
xxchan deleted the fix/process-startup-diagnostics branch October 2, 2026 11:09
xxchan added a commit that referenced this pull request Oct 2, 2026
Patch release with two fixes merged today:

- #58 `Session.deliver` prompts a new turn when the runtime itself
refuses a steer because the turn just ended (codex answers `no active
turn to steer` after the adapter's gate passed); before, `deliver`
returned `rejected: runtime_refused` with the session already idle.
Found by the daily inspection.
- #59 Installation probes and the codex app-server keep native failure
diagnostics: exit code, signal, timeout or spawn error, and the last 8
KiB of stderr in the thrown error's message and cause (record shapes
unchanged); a failed spawn no longer leaves an unhandled rejection that
could end the host. Windows codex CI forwards stderr. Refs #57.

Version bump only in this PR.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: exe.dev user <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
xxchan added a commit that referenced this pull request Oct 2, 2026
…e code (#63)

Runtime pages from the 2026-10-02 documentation maintenance pass. 47,595
to 44,457 words across 18 pages: narrative, superseded proposals and
repetition removed; every evidence pointer kept; each page compared
against its original by a separate reviewer and the findings fixed.

Corrections against the code, beyond length:
- claude: `--replay-user-messages`, `images: true`, `list_models` is the
discovery path, workspace-scoped inventories, account usage
`--safe-mode`, effort read-back is the one JSON frame not recorded;
process death now answered by crash-resume.md.
- codex: `images: true`; deltas do not depend on
`experimentalRawEvents`; server requests recorded only as `toApp`
requests; model listing runs `codex debug models`; `outputDelta` is
`tool_call_progress`; `childSessionId` only on `task_started`; queue
durability, the interrupted call shown as `aborted`, and a lost unechoed
steer cited from crash-resume.md; a resume that runs a queued item makes
an immediate prompt `busy`; the `interacted` naming the parent links
issue #60. Installation diagnostics from #59 merged in.
- grok, kimi: `rawEvents` (not `subscribe`), steer rejection codes
(`no_active_turn` / `unsupported`, `not_steerable` is the reason
prefix), kimi `usage().total` is null, grok `images: true`.
- pi, cursor, antigravity: `rawEvents`; dispose rejects every control
`disposed`; pi `user_message` events; the HTTP plane installs nothing by
default and never replaces a host dispatcher; SDK baseline dates; the
spec no longer promises a rebuild-after-death cursor.
- steer-delivery.md reduced to current runtime evidence (the implemented
API lives in spec/conversation.md); the old proposal claims (no input
ids, no echo) were stale.
- maka.md described OAR with a turn handle and `subscribe`; now the real
contract.
- agents-api.md: open decision number, compaction pointer, rejection
codes; goose/opencode keep probe scope wording.
- index lists every page, crash-resume included; an inbound anchor to
hard-problems fixed.

All relative links and anchors resolve; no dashes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: exe.dev user <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants