Skip to content
Back to Guides
tool specificadvanced

Claude Context Window Optimisation

Handle long contracts and documents within Claude's context window

The Problem

Long contracts are often cut into chunks before they are given to an AI tool. Cutting a contract up loses the links between its clauses and makes the analysis harder.

The Solution

Claude can take a long document in one upload and answer questions across the whole of it, provided the document is within the limits below.

Before You Upload

This guide is about document length. It does not make a document safe to upload. Do not upload a client document until your firm's plan and settings allow it: see Claude Projects for Client Matters. To practise the technique, use a precedent or a published agreement that contains no client information.

Limits, Checked 29 September 2026

Anthropic changes these figures. Read its pages before you rely on one.

Context window. It depends on the model you choose. For paid plans (Pro, Max, Team and Enterprise), Anthropic lists a context window of 1 million tokens for the models it names on its page and 200,000 tokens for the rest. Source: How large is the context window on paid Claude plans?

Length of a PDF. A PDF uploaded to a chat can have up to 1,000 pages. Claude reads the text and the visual elements (images, charts and graphics) of a PDF of 100 pages or fewer. For a PDF of 101 to 1,000 pages it reads the text only. Source: Upload files to Claude

File size and number. In a chat: up to 500MB per file and up to 20 files. In a project: up to 30MB per file, with no limit on the number of files so long as the total fits within the context window. Source: the same page.

Document types. PDF, DOCX, CSV, TXT, HTML, ODT, RTF, EPUB, JSON and XLSX (XLSX only when code execution and file creation are switched on in your account). For documents that are not PDFs, Claude extracts the text only. Source: the same page.

Fitting is not the same as being read well. Anthropic's developer documentation says that "more context isn't automatically better" and that "As token count grows, accuracy and recall degrade". Source: Context windows. The Context Architecture page explains how to leave a margin.

How to Use It

Step 1: Upload the Document

Attach the document to the chat. Anthropic's current steps are in Upload files to Claude.

If the PDF is longer than 100 pages and parts of it are images (a scanned schedule, a signature page, a table pasted in as a picture), remember that Claude reads the text only at that length.

Step 2: Check What Claude Can See

Do not rely on asking Claude whether it has read the document. A yes proves nothing.

Test it against things you already know:

Quote the heading and the first sentence of the last numbered clause
in this agreement, and the title of the final schedule.

Compare the answer with the document. If Claude cannot quote from the end of the document, or from a scanned page, it is not working from the whole of it.

Step 3: Ask Specific Questions

Now ask with the whole document in view:

What are the termination provisions across this entire agreement?
Check all sections.

Are there any conflicts between Clause 5.2 and Clause 12.4?

What liability cap applies? Check for any carve-outs throughout the document.

Ask for clause numbers in every answer so that you can check each one against the text.

Example Workflow: 60-Page SPA Review

Upload: a 60-page share purchase agreement

Prompt 1:

I've uploaded a 60-page Share Purchase Agreement.

Quote the heading of the last numbered clause and the title of the
final schedule.

Check the answer against the document before you go on.

Prompt 2:

Provide a comprehensive risk assessment focusing on:
1. Warranty and indemnity provisions
2. Conditions precedent
3. Liability caps and exclusions
4. Post-completion obligations

For each category, cite specific clause numbers.
Cross-reference any related provisions elsewhere in the agreement.

Prompt 3:

Are there any internal contradictions or inconsistent provisions?
Check the entire document.

Asking across the whole document is how you find conflicts between clauses that sit far apart. Check each conflict Claude reports against the text: it can miss one, and it can report one that is not there.

Pro Tips

Best practices:

  • Test what Claude can see before you rely on an answer
  • Ask for clause-by-clause analysis with clause numbers
  • Request cross-references to catch conflicts
  • Use for: long contracts, sets of related documents, due diligence bundles

Don't use for:

Combine with Projects:

  • Add the contract to a Claude project
  • The document stays available to every chat in that project
  • You do not have to upload it again for each conversation

Quick Reference

Process:

  1. Check the document against the limits above
  2. Upload it
  3. Test what Claude can see
  4. Ask specific, cross-referencing questions and check the clause numbers

Advantage over breaking into chunks: the links between clauses are kept, so conflicts across sections can be found.

Related Topics

claudedocumentsadvanced