LEARN · PHASE 13 · LESSON 90

Reducing Context Without Losing Capability

You can halve the standing cost of a setup and still do the task the removed

Type
Learn
Prerequisites
Lesson 89 (Prompt Caching as a Design Constraint), Lesson 72 (Subagents as Isolation)
Time
~35 minutes

Learning Objectives

  • Reduce startup and per-turn cost with levers, not with deletions
  • Move a fact to a home that loads it back when it is needed
  • Pair every cut with a capability test that would fail if the fact were simply gone
  • Explain the difference between reducing context and losing capability
  • Pick the cheapest lever that preserves the capability

The Problem

You read that a full window causes forgetting. So you delete half of CLAUDE.md.

The window drops. It feels great for a week. Then Claude stops following a rule you deleted — a rule you had forgotten existed, because the file no longer reminds you. A release goes out without the check, and you find out from the incident.

That is not reduction. That is amnesia with better numbers. The size went down and so did the capability, and you cannot tell the difference until something breaks.


The Concept

Reduction is relocation, not deletion. Every fact you remove gets a place to load from when it is actually needed. The window stays small because the fact is not standing there; the capability stays because the fact is still reachable.

The levers, roughly cheapest and safest first:

graph TD
    A[Start: full window] --> B[Delete what the code already says]
    B --> C[Move procedures to skills]
    C --> D[Move directory facts to path-scoped rules]
    D --> E[Move long reference to references/]
    E --> F[Move research reads to a subagent]
    F --> G[Trim memory files, scope rules]
    G --> H[Clear between tasks, compact at breaks]
    H --> I[Smaller window, same capability]
Mermaid source — renders as a diagram where mermaid.js is available
LeverWhat movesLoads back when
Delete derivable contentDetails the code/config already statesNever — it is re-derivable
Procedure → skillStep-by-step instructionsThe skill is invoked
Fact → path-scoped ruleDirectory-specific conventionsA matching file is read
Reference → references/Long checklists and guidesThe skill body points at it
Research → subagentMany-file reads you will not reuseIts summary returns; reads never touch your window
disable-model-invocationSide-effect skillsYou type the skill name
Defer MCP schemasTool definitionsTool search fetches one on demand
/clear between tasksThe whole prior conversationNever — it is a new task
/compact at a breakVerbatim historyA structured summary returns

The capability test

A cut is safe when you can name a task that fails if the fact is deleted and passes if the fact is relocated. Without that task, you are guessing.

You cutBad proofReal proof
The release checklist moved to a skill"The window is smaller.""In a fresh session, run a release; the checklist loads and the check runs."
A path rule for src/api/**"It is still in the repo.""Edit a file in src/api/; the rule loads. Edit a file in src/lib/; it does not."
A research read moved to a subagent"The read is gone.""The task completes and only the summary appears in the main window."

The reframe: the goal is not a smaller context but the same capability at a

lower standing cost — so every cut must come with a place to load the thing

back, and a task that proves it still works.

Verified against the skills page, memory page, and context window page on 2026-10-15. Which levers exist and their exact budgets are version-gated; the principle — relocate, then prove — is not.


Build It

Use the project from Lesson 88, or any project where /context starts above half the window.

  1. Baseline. Run /context in a fresh session and record the startup total and the total after one representative task.
  1. Apply two levers, no more:
    • a procedure out of memory into a skill, and
    • one long file read delegated to a subagent.

Do not delete anything yet.

✅ You pass when you can name the two levers and the fact each one moved.

  1. Re-/clear, run /context again, and run the same representative task. Record both totals.

✅ You pass when the startup total is lower and the task still completes.

  1. Write the capability test. Name a task that requires the moved facts and would fail if they were deleted. Run it in a fresh session.

✅ You pass when the task succeeds using the relocated content, and you have the transcript as evidence — not just "it looked fine".

  1. Only now consider deleting the derivable lines. For each, state where Claude would get the fact instead.

✅ You pass when every deletion has a stated re-derivation path and a task that still passes without it.


Use It

SymptomLever to reach for
CLAUDE.md over 200 linesMove procedures to skills; path-scope directory facts
A skill over ~150 linesSplit into SKILL.md + references/
Every session reads the same 12 filesA subagent for that research
A side-effect skill in the listingdisable-model-invocation: true
A huge MCP tool listLeave schemas deferred (the default)
New task, old history/clear
Finished a task, starting another/compact at the break
The window is full mid-taskDo not /compact blindly — see Lesson 89 first

Exercises

  1. Cut and prove. Pick one fact at startup. Move it to a home that loads it back. Write the capability test and run it. ✅ You pass when the window is smaller, the test task passes, and the evidence shows the fact was loaded on demand rather than deleted.
  1. Distinguish reduction from deletion. Take a fact and produce two versions of the setup: one where it is deleted, one where it is relocated. Run the capability test against both. ✅ You pass when the deleted version fails the test and the relocated version passes — this is the whole lesson in one experiment.
  1. Find the cheapest lever. For a bloated section of memory, list every lever that could handle it and pick the one that loads it back latest (cheapest standing cost) without breaking the capability test. ✅ You pass when you can name a cheaper lever you rejected and why it was cheaper but wrong.

Key Terms

TermWhat people sayWhat it actually means
reduction"make it smaller"Relocating facts to homes that load on demand. Deleting instead is a different, usually wrong, move.
relocation"I moved it"The fact still loads — just later and only when needed. The evidence is a run where it loaded.
capability test"it still works"A named task that fails if the fact is gone. The only honest proof a cut was safe.
standing cost"the startup number"What you pay every session regardless of the task. The target of reduction.
on-demand load"lazy loading"A skill body, a references/ file, a path rule, a subagent read — each loads only when triggered.
subagent delegation"run it in a worker"The reads happen in a separate window; only the summary returns to yours (Lesson 72).

What this lesson skipped

The cache cost of your cuts. Moving content changes the prefix and may invalidate the cache. Re-read Lesson 89 before a large reshuffle.

Automating the audit. /doctor and /doctor prompt-audit can flag unused extensions and redundant instructions. Worth revisiting once your manual pass feels repetitive.

Harness-level budgeting. Deciding the cost envelope for an entire harness — rather than one project — is Phase 14.

The graded version. This is the lesson. The module practice/13-cut-context-in-half is where you do it to a real repo and submit the before/after and the proof.

Check yourself

4 questions. Answer before you reveal — recognising the right option is not the same as being able to produce it.

  1. You cut your window in half by deleting sections from CLAUDE.md. A week later Claude stops following a check you deleted, and you never notice. What actually went wrong?

    1. The window got too small for Claude to reason about
    2. You deleted instead of relocating, and had no capability test to catch it
    3. Deleting from CLAUDE.md always invalidates the cache and confuses the model
    4. Claude forgot the rule because it was compacted away
    Show answer

    B. You deleted instead of relocating, and had no capability test to catch it

    Reduction is relocation: the fact needs a home that loads it back, and a test that fails if it is gone. Deleting passes the size test and fails the capability test silently. Option A inverts the lesson — the window was too full, not too small. Option C confuses caching with capability; the cache is not why the rule stopped being followed. Option D blames compaction, but the rule was deleted, not summarized.

  2. You move a research task that reads twelve files into a subagent. What is the honest way to prove capability survived?

    1. Confirm the subagent definition file exists
    2. Run a real task that needs the research and confirm it completes, with only the summary in your window
    3. Check that the twelve files are still in the repository
    4. Measure that the main window shrank
    Show answer

    B. Run a real task that needs the research and confirm it completes, with only the summary in your window

    The proof is a task that would fail if the capability were lost, run for real, with the reads happening in the subagent's window and only the summary returning. Option A proves a file exists, not that the capability works. Option C proves the files exist, not that they are read. Option D is the reduction measurement, not the capability proof — the two are separate claims.

  3. A convention applies only to files under packages/api/ and is used on maybe one task in ten. Which home gives the lowest standing cost without losing it?

    1. CLAUDE.md
    2. A path-scoped rule with paths: packages/api/**
    3. A skill invoked on every task
    4. Auto memory
    Show answer

    B. A path-scoped rule with paths: packages/api/**

    A path-scoped rule loads only when a matching file is read, so nine tasks in ten never pay for it while the tenth gets it automatically. Option A pays every session. Option C would load it on every task if invoked, and requires the user to remember to invoke it. Option D is a startup block; the convention is directory-specific, so auto memory is the wrong trigger.

  4. After a large reshuffle of your context, the next turn is slow and expensive even though the window is now smaller. What is the most likely cause?

    1. A smaller context always runs slower on the first turn
    2. The reshuffle changed the request's prefix, so the cache had to rebuild
    3. The removed content corrupted the session
    4. Claude is re-reading the deleted files
    Show answer

    B. The reshuffle changed the request's prefix, so the cache had to rebuild

    Changing what sits in the prefix changes the exact start of the request, so everything after it is reprocessed — a one-time rebuild. This is why Lesson 89 comes before this one. Option A has no mechanism. Option C invents corruption. Option D is impossible to observe as a cost here and is not what the prefix rule describes.