AI inputs / Practical field guide / November 30, 2026

Your AI stopped at page one.

Before asking an assistant to summarize API records, check how many pages your tool actually collected. A successful request can still leave the next page unread.

In this field note · 6 sections
  1. Run the pagination lab
  2. Inspect the next-page link
  3. Make it your own
  4. Keep the evidence in scope
  5. Read the primary sources
  6. Get the practice and posting files

You ask an AI assistant to summarize a project list. Its tool receives two records, gets 200 OK, and hands them over. A third record is waiting behind a next-page link. Better wording cannot recover evidence the tool never supplied.

This is a possible integration mistake, not a claim about every assistant. The useful check sits between the API response and the model: what did the collection step retrieve, and what evidence says the traversal ended?

What we ran. A fictional two-page API inside Python using HTTPX 0.28.1 and CPython 3.13.15 on Windows. We compared a single response with a bounded traversal and exercised seven refusal cases. MockTransport supplied every response. No model or live business API ran.
Cream portrait graphic with the oversized heavy black headline, Your AI stopped at page one, and a regular serif subheading, A successful request can still miss records. Two cream response cards stand on a pale stone tabletop in soft natural daylight. PAGE 1 shows records A and B with a small burnt-orange next tab. An orange paper strip connects it to PAGE 2, which shows record C. Soft plant shadows fall across the warm ivory background. The centered bottom lockup reads AI Anonymous, from JAB Systems, a short amber rule, and jabsystems.io.
Original AI-generated conceptual still life: page one has A/B and a next link; page two has C. The downloadable lab uses the same fictional record IDs.

01 / Reproduce

Run the pagination lab

Download the practice ZIP and extract its three files into a fresh folder: check_pages.py, requirements.txt and README.md. Use Python 3.11 or later for this walkthrough. Open PowerShell in that folder:

py -3 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r .\requirements.txt
.\.venv\Scripts\python.exe .\check_pages.py

The requirements pin HTTPX 0.28.1 for this reproduction. Installation needs internet; the exercise itself uses httpx.MockTransport inside the Python process. Its api.example.test URLs are fictional. The script does not contact them, need an API key or start a server.

Page one is authored to return [{"id": "A"}, {"id": "B"}] with a Link header pointing to page two using rel="next". Page two returns [{"id": "C"}] without a next link. The program prints JSON and checks the expected results; it does not write a report or modify site files.

02 / Inspect

Inspect the next-page link

The first observed record in the program's output is:

{
  "http_status": 200,
  "record_ids": ["A", "B"],
  "has_next_link": true
}

That status describes one successful response. The next link is the clue that this fixture has more to fetch. GitHub's REST documentation provides a real example of this pagination convention; other APIs use different contracts, including cursors in JSON bodies. Read the endpoint documentation before deciding what ends a traversal.

HTTPX exposes parsed response links through response.links. These two lines from the collector select the next URL and resolve it against the response URL:

next_url = response.links.get("next", {}).get("url")
url = urljoin(str(response.url), next_url) if next_url else None

The full collect function is in the practice script. It checks the target scheme, host and path before requesting another page. It rejects a repeated URL, enforces a page budget, checks each response status, requires a JSON list of records with nonempty string IDs and refuses duplicate IDs. Redirect following is disabled. Only after the loop reaches no next link does it return the collection.

Its second observed record is:

{
  "pages_fetched": 2,
  "record_ids": ["A", "B", "C"],
  "pagination_state": "no_next_link"
}

no_next_link reports what this traversal observed. It does not certify that an API exposed every record in a business system. Permissions, filters, search caps, changing data or a faulty response can still limit what you receive.

The script also runs seven authored refusal cases: a link back to page one, a link to another host, a one-page budget while more remains, an object where a list is expected, a missing ID, a duplicate ID and an HTTP 503 on page two. Each must raise. The loop, foreign-target and budget cases also check that a second request never happened. Partial records stay inside the failed call instead of being returned as a successful collection.

03 / Adapt

Make it your own

Change only the record on page two:

.\.venv\Scripts\python.exe .\check_pages.py --third-id D

In our run, the first-response view stayed A/B. The traversal changed to A/B/D. This gives you a small regression fixture: a change beyond the first page should reach the collection your assistant receives.

To adapt this to a real tool, first copy the shape of a documented API response into fictional local fixtures. Put a distinctive record on the second page. Implement that endpoint's next-page and termination rules, then make the second page fail. Check both outcomes before connecting real data. Keep a record of pages fetched, filters, collection time, requested scope and whether traversal finished; decide which of those facts the assistant needs.

The lab intentionally allows only https://api.example.test/records. Editing that allowlist is not sufficient to make a production client. Add the real schema, authorized scope, limits and failure policy deliberately. For an assistant consuming a reviewed collection, a proposed starting instruction is:

Summarize only the records supplied in this collection.
Report the collection's observed pagination state and record count.
If collection failed or stopped early, describe that limit before summarizing.
Do not describe the records as the entire business dataset.

We did not run this prompt or test model adherence. Put collection checks in the tool, then separately evaluate how an assistant communicates those limits.

04 / Boundaries

Keep the evidence in scope

We ran the exact setup and adaptation commands from the extracted practice files, checked both observed output records and the source excerpt, and exercised the seven refusals. These are deterministic checks against authored responses.

This small collector handles one list-shaped JSON contract and one Link convention. It is not a universal pagination client. The page budget limits request count, not response size or total runtime. Real integrations need appropriate response limits, timeouts, rate limits, retry rules, authentication and authorization handling, plus endpoint-specific tests. No security audit was performed.

A duplicate-ID check can reveal some overlap. It cannot detect all missing records when the underlying data changes between pages. Use the service's documented snapshot or consistency mechanism when available, and state remaining uncertainty. We did not test a live API, account visibility, production completeness, model quality, savings or speed.

05 / Sources

Read the primary sources

Checked November 30, 2026. This applies established API behavior to an AI input check. The lab deliberately pins HTTPX 0.28.1; PyPI also lists a newer 0.29.0 release. We tested the pinned version, not a version comparison.

06 / Take it with you

Get the practice and posting files

The practice ZIP includes the complete lab script, requirements and instructions. The posting ZIP contains the original portrait, teaser caption, alt text and full article URL. Social content is prepared for manual posting; it is not scheduled or published.

Did this help?

Please don't include personal or confidential information.

Ask or suggest

Please don't include personal or confidential information.

What would you like to send?