Why a run failed: "prompt is too long" (or similar size errors)

What you'll learn

If a run stopped without returning any results and you saw an error message about the prompt, request, or context being too long, too large, or exceeding a limit, this article explains what's happening and how to fix it.

By the end, you'll know:

  • What this type of error means
  • Why it happens
  • The quickest ways to resolve it and get your run working again

The main explanation

What does this error mean?

Sometimes a run fails with a message indicating the request sent to the AI was too large to process. The exact wording varies — you might see something like "prompt is too long""context length exceeded""input too large", or a message showing two numbers (the size of the request and the maximum allowed).

Whatever the exact phrasing, it all means the same thing: the request contained more data than the model could read in one go.

Nothing is broken. This is a data-volume issue, not a bug or a problem with your account.

Why does it happen?

Every request to the AI has a size limit, measured in tokens (think of these as small pieces of words or text). When a task collects a lot of content — such as full web pages, documents, transcripts, search results, scraped profiles, or a long conversation history — all of that data gets bundled into a single request. If the total size goes over the limit, the request is rejected before any output is generated.

It most commonly happens when a step pulls back large, unfiltered content, for example:

  • Complete web pages, profiles, or scraped records instead of just the relevant fields
  • Full datasets rather than a filtered subset
  • Long transcripts, PDFs, or documents in their entirety
  • Many results at once when only the top few are needed
  • A lengthy back-and-forth conversation history that has built up over time

The good news: it's straightforward to fix by reducing the amount of data the model needs to handle at once.


Example: what this looks like in practice

Imagine a run that visits a list of websites, pulls back the full page content for each one, and then asks the model to summarise everything in one go.

If those pages add up to more text than the model's limit allows, the run will stop and show a size error — even if every individual page looked fine on its own.

The fix in this case would be to extract only the relevant parts of each page (for example, just the "About" section or a few key data points) before passing the content to the model. That way, the model only ever sees a small, focused extract rather than entire pages of raw content.

The same logic applies to any step that loads a lot of content at once — the goal is to pass in less, not more.


How to fix it

Try one or more of the following — any single change is often enough to get back under the limit:

1. Reduce the amount of data collected

Instead of returning every result, limit to the top few. For example, fetch the 5 most relevant results rather than 50.

2. Keep only the fields that matter

Before passing data to the next step, extract just the parts you need — a title, a summary, a price, a key paragraph — rather than the full raw content.

3. Summarise in batches

If you're working with a large set of documents, pages, or records, summarise them in smaller groups first, then combine those summaries. The model never has to handle the full raw volume in a single request.

4. Trim your conversation history

In long sessions, earlier messages add up and count toward the limit. Starting a fresh session or shortening the input can free up a significant amount of space.

Combining more than one of these approaches gives you the most headroom, especially for large or complex jobs.


Before you reach out for support

It's worth identifying which step in your run produced the error — it's usually the step that gathers or loads the most data. Steps that work with small, filtered inputs are unaffected and will still run correctly on their own.

If you've tried the steps above and the run is still failing, get in touch with our support team and share the error message along with a short description of what the run is doing — we're happy to help.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us