> ## Documentation Index
> Fetch the complete documentation index at: https://manifest.build/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# M301: Messages array too long

> Manifest error M301 fires when a request has more than 1000 messages. Returns HTTP 400. Fix: trim conversation history or summarize older turns.

## What you saw

```text theme={"theme":{"light":"github-light","dark":"github-dark"}}
[🦚 Manifest M301] `messages` array exceeds maximum length of 1000.
See https://manifest.build/docs/errors/M301
```

## Why it happened

Manifest caps each request at 1000 messages so scoring and tier resolution stay fast. Long agent loops that never prune their context window hit this faster than you'd think.

## How to fix it

1. Trim conversation history before sending. Keep the last N messages plus the system prompt.
2. Summarize older turns into a single message instead of replaying the raw history.
3. If you actually need more than 1000, split the work across multiple requests.

## Related

* [M300: Missing messages array](/errors/M300)
* [API reference](/reference/api)
* [All error codes](/errors)
