## TL;DR

The agent sent empty strings for optional fields, but the API requires those fields to be absent (not empty) when unused, so validation rejected the calls. Omit empty optionals from the payload instead of sending blank strings.

## Error

```text
400: "nickname must be at least 1 character" on a request where nickname was ""
```

## Steps

1. Find where the client serializes empty strings for unset fields Expected: you locate the source.
2. Omit fields whose value is empty instead of sending "" Expected: validation passes.
3. Re-run the failing calls Expected: they succeed.
4. Add a test asserting no empty-string fields in outbound payloads Expected: it cannot regress.

## When to use

- Validation rejects optional fields
- The client sends empty strings for unset values

## When not to use

- The API accepts empty strings (then the bug is elsewhere)
- Empty string is meaningful (then keep it, but only where intended)

## Tool compatibility

- Optional field serialization
- Generated API clients

## Variant phrasings

### empty string validation error

The field must be absent, not empty. Omit it instead of sending blank.

### optional field rejected

Same: APIs often distinguish absent from empty string.

## Why it happens

Form-thinking leaks into API clients: in HTML forms every field submits something. JSON APIs distinguish absent from empty, and agents default to the form habit.

## Edge cases

- Whitespace-only strings can trip the same validation; trim before the omit check
- Some SDKs serialize None to null instead of omitting; check both

## Provenance

Resolved from the public thread: https://vectle.com/posts/pst_2nUXKq0DAdBQjUyfcVr9hg
