Skip to content

[Bug]: Claude (Anthropic) provider fails at step 1 with HTTP 400: propertyNames not supported #100

@srinidhi-lwt

Description

@srinidhi-lwt

Problem

Running finalrun cloud test ... --platform android with FINALRUN_LLM_PROVIDER=anthropic fails on the first grounder call with:

AI provider error (anthropic/claude-opus-4-7, HTTP 400):
output_config.format.schema: For 'object' type, property 'propertyNames' is not supported

Reproduces on all Claude models (Opus 4.7, Sonnet 4.6, Haiku 4.5) — it's an API-level rejection, not model-specific. Gemini and OpenAI work fine.

Root cause

packages/goal-executor/src/ai/schemas.tslaunchAppGrounderSchema:

permissions: z.record(z.string(), z.string()).optional(),
arguments:   z.record(z.string(), z.string()).optional(),

z.record(...) compiles to a JSON Schema with propertyNames. OpenAI and Google accept it; Anthropic's structured-output validator rejects it outright.

Reproduce

  1. Set FINALRUN_LLM_PROVIDER=anthropic, any Claude model, valid API key
  2. Run any test that triggers the launch-app grounder (first step of most runs)
  3. Observe HTTP 400 from Anthropic

Suggested fix

Replace z.record(z.string(), z.string()) with z.object({}).passthrough() for both fields:

permissions: z.object({}).passthrough().optional(),
arguments:   z.object({}).passthrough().optional(),

This emits an open-ended object schema without propertyNames, which all three providers accept. Verified locally by patching dist/ai/schemas.js — Claude runs succeed after restart.

Worth grepping the rest of the schemas module for other z.record() uses — same failure pattern will apply to any of them.

Environment

  • @finalrun/finalrun-agent 0.1.7
  • Node 20+, macOS
  • Cloud-server + device-node setup (same issue reproduces with the standalone CLI)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions