Skip to content

Fresh worker fails before tool calls with assistant-prefill rejection #1895

Closed

Description

@justrach

graff: 0.302.74.64 (latest: 0.302.74.64), managed engine
Harness: 0.2.189 (latest: 0.2.189)
Surface: Harness desktop
Platform: macOS arm64

Symptom

A freshly spawned worker fails before making any tool calls:

invalid_request_error: This model does not support assistant message prefill. The conversation must end with a user message.

The operation reports 2 rejected attempts and marks retrying as-is unsafe.

Repro

  1. Spawn a fresh worker on the affected backend.
  2. Observe the rejection above before any tool calls (0 tool calls; 2 rejected attempts).

Reproduced on the versions above. Root cause is not established.

Image

Synthetic illustration of the error and observed counts, not an application capture.

Assistant-prefill rejection: zero tool calls and two rejected attempts

Fix

Construct a valid request history for backends that reject assistant prefill. If a request cannot be made valid, fail fast with an actionable error rather than making another rejected attempt.

Activity

  1. justrach commented on Nov 12, 2026

    @justrach
    OwnerAuthor

    Second occurrence, same versions (graff 0.302.74.64, Harness 0.2.189, macOS arm64).

    Two independent fresh-worker spawns in one session failed the same way: 0 tool calls, 2 rejected attempts, invalid_request_error: This model does not support assistant message prefill. The conversation must end with a user message.

    New evidence on scope: re-running the identical task text on a different worker tier succeeded, so the rejection is specific to that backend route rather than to the task content. Both failures happened at worker spawn, before any tool call, which is consistent with the request shape rather than with anything the task did.

  2. justrach commented on Nov 14, 2026

    @justrach
    OwnerAuthor

    Implemented in #1900 (not yet merged); current-head CI is green.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions