Skip to content

Avoid EAGAIN and BEL in peer JSON stdin transport #41

Description

@CBEPX

Summary

Make peer JSON stdin transport reliable for TTY, delayed multi-chunk, and ignored-stdin execution, and make generated Codex activation/submission recipes complete and bounded.

Evidence

In the audited window, 15 real peer-final calls produced 10 failures across four workflows; six exposed EAGAIN and several exposed PTY BEL-only failures. All seven workflows eventually completed, so fencing and provenance held. The root cause is scripts/lib/fs.mjs reading process.stdin.isTTY before fs.readFileSync(0), whose getter sets O_NONBLOCK. Generated Codex plans also expose bare activation/submission commands rather than a complete bounded stdin procedure.

Desired outcome

Peer stdin reads do not fail spuriously or emit BEL-only failures, and generated plans are copy-runnable with bounded ignored-stdin behavior.

Acceptance criteria

  • Cover tty.isatty(0), delayed multi-chunk input, and bounded ignored-stdin behavior with regressions.
  • Generate complete activation/submission recipes rather than bare commands.
  • Keep raw leases out of Node argv, durable state, logs, and rendered output.
  • Live qualification records zero EAGAIN/BEL failures.

Severity/release disposition

High reliability risk; mandatory v1.7.4 scope and release gate.

Provenance

Confirmed by the v1.7.4 reliability audit of real peer-final calls; findings are limited to repository behavior and redacted operational evidence.

Activity

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions