Skip to content

Output schema too rigid for tool-enabled steps #24

@landigf

Description

@landigf

Problem

When a step has tools: [Read, Glob, Grep], Claude uses tools autonomously and produces freeform text as output. Forcing a structured Zod schema (e.g., critical_issues: { type: array }) on this output is fragile and often fails validation.

Current behavior

- id: code-audit
  tools: [Read, Glob, Grep]
  output:
    critical_issues: { type: array, items: string }
    high_issues: { type: array, items: string }

This fails because Claude's natural output after using tools is a markdown report, not structured JSON.

Suggested improvement

Add support for a freeform output mode for tool-enabled steps:

output: freeform  # or just a single string field

Or automatically fall back to capturing raw text when structured parsing fails, instead of failing the step entirely.

Workaround

Using a single report: string field works better:

output:
  report: string

But even this can fail in plan mode (see #1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions