Skip to content

Structured output: return a turn's JSON-schema result (claude --json-schema, codex outputSchema) #337

Closed

Description

@xxchan

Found by Lookout's comparison with the Claude Agent SDK 0.3.296: the SDK's outputFormat: {type: "json_schema", schema} returns the validated object as result.structured_output. In OAR, launchArgs: ["--json-schema", …] takes effect, but the object exists only in claude's native result frame: promptAndWait returns empty text and the turn outcome carries nothing, so a host has to dig through records().

Structured output is a common host scenario and is not claude-only: codex takes an outputSchema per turn (@openai/codex-sdk TurnOptions.outputSchema; app-server turn/start).

To design, evidence first:

  • Which runtimes accept a schema, and at what granularity (claude: per process via --json-schema; codex: per turn). Refuse where a runtime cannot.
  • Where the result lands in OAR: an event on the result frame (for example structured_output { value }) folded into the turn outcome and returned by promptAndWait, live and on replay.
  • What a schema failure looks like on each runtime.

Part of the first-party SDK parity work.

Activity

  1. 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