Skip to content

Sync 2: Accept Claude JSON event arrays #38

Closed

Description

@thisguymartin

Priority 2 of 5 runner fixes.

The Claude parser currently accepts one result object. A synthetic event-array result fails with claude emitted a non-object result; the upstream parser accepts the same input.

Accept both formats. For arrays, select the last type: "result" event and reject terminal errors before accepting its text. Preserve model, session, usage, and cost parsing. Keep the fork's gateway-specific model verification and costUsd: null behavior.

Cover legacy objects, valid arrays, multiple result events, missing terminal results, and terminal errors. Exercise the shared parser through Claude and gateway provider routes.

Source: open-pstack PR #130.

Files: runner/parse-output.ts and its tests, under plugins/pstack/skills/poteto-mode/scripts/.

Done when

  • The focused regression checks pass, along with bash scripts/check.sh.
  • The exact candidate is installed and the changed behavior passes from each affected parent app. Record the version, action, and observed result in the PR. Keep it draft until that evidence is complete.

Activity

  1. added
    in syncUpstream changes selected to sync into pstack-flex
    on Oct 9, 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

    in syncUpstream changes selected to sync into pstack-flex

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions