Skip to content

Runner labels any failed child 'unauthenticated' when its output mentions authentication #142

Closed

Description

@brenonesto

unavailableStatus in skills/poteto-mode/scripts/runner/run.ts (1.5.0, line 382) matches /not logged in|unauthenticated|authentication|sign in|login required/i against ${result.stderr}\n${result.stdout} of any child that exits non-zero.

The bare authentication alternative matches the child's own work, not only the CLI's auth error. A Codex explorer that reviewed an auth-related diff exited 1 after six minutes, and the receipt said unauthenticated. The parent then retried and rerouted as if the login had expired. The same goes for any lane whose transcript mentions "sign in" (a login form, a Cognito flow).

Repro

A child that prints reviewing the authentication middleware and exits 1 gets status: "unauthenticated".

Suggested fix

Match the provider CLIs' own auth error strings only (for example not logged in, 401 Unauthorized, please run .* login), and drop the bare authentication and sign in alternatives. Alternatively, classify auth only from the preflight probe, and leave a mid-run non-zero exit as child-failed.

Activity

  1. ericlitman commented on Oct 11, 2026

    @ericlitman
    Owner

    Design pass, 2026-10-11 (bundled with #141, #131, #132; see the plan on #141)

    Class rule: only the preflight probe classifies authentication. A nonzero child exit after the model call starts, with no structured provider error, is never unauthenticated. The model regex moves into its own classifier, whose return type is "unavailable-model" | "child-failed", and that classifier replaces the call at run.ts:991. The broad auth regex remains for preflight output only.

    Known loss: if a Claude or Codex login expires between the preflight and the model call, the run is now child-failed/70 instead of unauthenticated/77. The CLI's error text stays in the receipt evidence. provider-dispatch.md already forbids automatic rerouting.

    Tests: the reported sentence ("reviewing the authentication middleware") and the other auth phrases, on stdout and on stderr with exit 1, now give child-failed/70. The neighbouring cases stay as they are: preflight unauthenticated/77, unavailable-model/69, cancellation, timeout, and Grok structured errors.

  2. added a commit that references this issue on Oct 11, 2026
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