Skip to content

Fix runner subprocess I/O for Codex provider probes #94

Closed

Description

@antoninpire

Problem

The installed runner fails during Codex setup probes in this environment. The Claude route passes auth preflight, then Bun's child stdin write fails with EPERM. A minimal Bun.spawn control writing to cat reproduces it; the equivalent Node child-process control succeeds.

The Cursor route reports unauthenticated, but agent status --format json reports authenticated when stdout is inherited or directed to a regular file. When Bun or Node captures status through a pipe, Cursor CLI 2026.09.28 exits successfully with no output. The runner then maps the empty status to unauthenticated.

Expected behavior

The runner should send prompts through a working child-process stdin path, capture Cursor preflight output in a way supported by the CLI, and distinguish missing or malformed status output from an actual unauthenticated response. Keep the explicit timeout and no-fallback behavior unchanged.

Reproduction evidence

  • claude auth status --json passed in the failing Opus receipt.
  • The Opus receipt failed after preflight with EPERM: operation not permitted, write.
  • Bun 1.4.2's minimal child-stdin control failed with the same error; Node's control passed.
  • Direct Cursor status returned isAuthenticated: true, with access and refresh tokens present.
  • Cursor status returned zero bytes when stdout was captured through Bun/Node pipes, but JSON when stdout was inherited or a regular file.

Acceptance

  • Add focused regression coverage for prompt stdin writes, Cursor status output capture, and accurate failure classification.
  • Preserve native/external routing and receipt semantics.
  • Verify the exact probes from the Codex parent surface after installing the candidate.

Activity

  1. ericlitman commented on Sep 30, 2026

    @ericlitman
    Owner

    MASTRA-707 F0 live lane 5 retriage probe: this comment must create no decision on the canceled Work cards for this issue.

  2. ericlitman commented on Oct 1, 2026

    @ericlitman
    Owner

    Triage split, 2026-10-01: the stdin EPERM part ships with #58. The Cursor status-pipe part moves to #71, because main has no Cursor provider yet (runner/types.ts:2).

  3. ericlitman commented on Oct 4, 2026

    @ericlitman
    Owner

    @antoninpire, thanks for the detailed report. We tried to reproduce the stdin EPERM and couldn't. We ran the same minimal control:

    Bun.spawn(["cat"], { stdin: "pipe" }); // then stdin.write(...)

    It succeeded with Bun 1.4.0 on macOS in each of these:

    • directly;
    • inside a Codex workspace-write session with network disabled;
    • inside a Codex danger-full-access session.

    Could you share the environment where it failed?

    • OS and kernel (uname -a), and whether it was a container, VM or cloud sandbox.
    • bun --version, and how Bun was installed.
    • The Codex CLI version and sandbox mode of the parent session, if there was one.
    • The exact output of the control in that environment.

    The Cursor status-pipe part of this issue moved to #71. We'll fix the stdin part once we can reproduce it.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions