long contract plus full amendment history overflowed context - the agent quietly dropped the earliest amendments, the...
Fixes a contract review agent that silently drops the oldest amendments when the contract plus its amendment history exceeds the context window. Use when the agent's answers reflect later amendments but contradict or ignore earlier ones, especially governing law or term clauses set at signing. Key trigger: the agent is unaware of any amendment older than the most recent few.
TL;DR: Extract each amendment into a compact per-amendment summary (what changed, effective date) and load those summaries instead of full amendment text, reserving full text only for the amendments the question actually needs. The agent was loading amendments newest-first until the window filled, so the oldest ones, which often set governing law and the original term, silently fell off.
long contract plus full amendment history overflowed context - the agent quietly dropped the earliest amendments, the ones that set governing law- Confirm which amendments the agent actually saw. Ask it to list the amendments it considered, with effective dates. Expected: the list starts at some recent amendment and the earliest ones are missing, with no warning that anything was dropped.
- Build a compact amendment ledger. For each amendment, extract a short record: amendment number, effective date, and a one-to-three sentence summary of what it changed. This ledger should fit in a fraction of the full text. Expected: the full history compresses to a few hundred lines the agent can always hold.
- Change the loading order. Load the base agreement plus the amendment ledger first, then pull full text only for the specific amendments relevant to the question at hand. Never load amendments newest-first until the window fills. Expected: the agent can name every amendment and its effective date even when full texts do not fit.
- Re-run the failing question and check the answer against the early amendments. For governing law specifically, verify the answer cites the amendment that actually set it. Expected: the agent now references the earliest relevant amendment instead of acting like it does not exist.
- Add a completeness assertion to the pipeline. Before answering, the agent must confirm the amendment ledger covers the full known history (count of amendments matches the source folder). Expected: a missing amendment blocks the answer with a warning instead of silently narrowing the agent's view of history.
Use this when
- the agent's answers ignore the earliest amendments in a long amendment chain
- governing law, original term, or initial pricing comes back wrong on heavily amended contracts
- the pipeline loads amendments in recency order and the context window is tight
- the agent cannot enumerate the full amendment history when asked
Not for this skill when
- there is only one amendment and the agent still gets it wrong (check extraction or cross-reference resolution instead)
- the amendments are separate files the pipeline never collected (fix document collection first)
- the agent reads all amendments but resolves conflicts between them incorrectly (that is a precedence-logic problem)
Variant phrasings
- agent dropped the original amendment history and only knew the recent ones
- earliest amendments fell out of context on a long contract chain
- agent answered governing law from the base agreement, missing the amendment that changed it
- amendment history too long for context, old amendments silently skipped
Why it happens
Amendment text is verbose and mostly restates unchanged language, so a long chain eats the window fast. Loading newest-first feels natural (recent changes matter most), but the earliest amendments are the ones that establish the baseline everything else modifies. Dropping them does not just lose old news, it loses the foundation the later amendments assume.
Edge cases
- Amendments that restate the entire agreement ("amended and restated") make the ledger approach essential. Flag these in the ledger so the agent knows the restatement supersedes piecemeal history.
- Effective dates can precede signature dates. Sort and reason by effective date, not by file date or upload order.
- Side letters and email amendments often live outside the numbered amendment sequence. The ledger must include them or the history is silently incomplete.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_1jE69REra6kxRJut9VW7Tw