Context and output interfaces
Context pressure drops when each turn carries less and delegated work runs in its own window: load MCP servers per session, keep CLAUDE.md short and clear the window before it fogs. On the output side, HTML has become a practical default for specs and reports that people are meant to read.
Written by
-
Benedikt Stemmildt Founder & Co-CEO
Updated:
Tools 4
Our position. We do not wait for a bigger window: context quality degrades silently as the window fills (opens in a new tab), and bigger windows did not end that. Offload instead (opens in a new tab): the codebase is the state, the file system is the memory, and a sub-agent gets a fresh window and returns only the result.
Recurring context costs tokens on every turn, so whatever loads before the first task has to earn its place (Paste This Into Claude, Never Hit a Token Limit Again (opens in a new tab)). Since July 2026 the vendor itself steers its Claude 5 generation models with far less instruction than before (The New Rules of Context Engineering (opens in a new tab), July 2026).
How do you keep context pressure low?
Beyond the tooling, the most transferable practitioner discipline is treating the context window as the scarce resource and managing it deliberately. One recurring framing reduces the options to two levers, reduce and delegate: shrink what each turn carries, or hand work to a subagent whose own window absorbs the cost (Context engineering techniques (opens in a new tab), 8 September 2025). On the reduce side the concrete moves are consistent: delete the default mcp.json and launch MCP servers per session with claude --mcp-config <file> plus --strict-mcp-config, since idle MCP tools measured at 24.1k tokens, about 12% of the window, before any work began; the same flag also lets you split one server into read-only and write configs loaded only when each is needed (Claude Code feature roundup (opens in a new tab), 15 August 2025); shrink CLAUDE.md to a few dozen lines of universal essentials and prime context per task type with commands like /prime bug or /prime feature instead of loading everything every session (Context engineering techniques (opens in a new tab), 8 September 2025).
Verbosity is not free either: cutting roughly half the instruction lines from one spec-driven system improved its results, because extra words give the agent more room to get confused (Builder Methods – Agent OS walkthrough (opens in a new tab), 6 August 2025).
A measured audit makes the startup waste concrete: one setup carried about 25,000 tokens at session start, 9,000 of it from the frontmatter of 82 installed skills, and the emerging CLAUDE.md consensus is under 300 lines covering project intent, non-obvious tooling, an architectural map, verifiable rules (“parameterize all SQL queries” rather than “write clean safe code”), hard constraints and anti-patterns, pointers to deeper docs, and tribal knowledge (Seven tools to stop burning tokens in Claude Code (opens in a new tab), May 2026). The interview’s blunter version: when CLAUDE.md bloats, delete it and start fresh with the minimal thing that gets the model on track, since every model release needs less steering; the creator starts about 80% of sessions in plan mode and prefers a second fresh window over pushing a fogged one, “two context windows that don’t know about each other tend to get better results” (Plan mode and CLAUDE.md interview (opens in a new tab), 1 April 2026).
The vendor has since quantified that trend against its own harness: it removed over 80 percent of Claude Code’s system prompt for its Claude 5 generation models with no measurable loss on its coding evaluations (The New Rules of Context Engineering (opens in a new tab), July 2026). The practices it retires are the ones most teams still follow. Explicit rules give way to the model’s judgment; worked examples give way to better tool design, “what parameters does Claude have and how can they be more expressive?”; front-loaded context gives way to progressive disclosure through skills; and the manual # hotkey that appended to CLAUDE.md gives way to memories the model saves on its own. A spec also stops having to be prose, since “a spec may also be a detailed test suite, or a function in a different codebase that Claude might port”, alongside HTML artifacts and rubrics where the standard is taste rather than a passing test, which is the same move as the output-medium argument below. The command /doctor packages the check and rightsizes skills and CLAUDE.md files. This is vendor self-assessment on its own current generation, so the transferable part is the direction of travel, less scaffolding per model release, and the CLAUDE.md editing test below is the cheap way to find out whether it holds for the model you actually run (The New Rules of Context Engineering (opens in a new tab), July 2026).
A fresh-session audit separates fixed context from task-driven growth. /usage shows which activity consumes account limits, while /context exposes MCP definitions, skill descriptions, and instructions loaded before the first task. The audit reports a 58.8k-token baseline in one setup. The number is anecdotal, but the diagnostic is useful: recurring context should earn its place because its cost repeats across turns (Paste This Into Claude, Never Hit a Token Limit Again (opens in a new tab), July 2026, practitioner and promotional source).
Hooks can deterministically remove repeated lines and formatting noise before command or file output reaches the model. Concise responses trim a relatively small part of total use. The same source recommends giving delegated work to the smallest model that can solve it instead of inheriting the primary agent’s model by default (Paste This Into Claude, Never Hit a Token Limit Again (opens in a new tab), July 2026, practitioner and promotional source).
In monorepos, Anthropic recommends running /init in the subdirectory you work in rather than at the root, since Claude walks up the directory tree loading every CLAUDE.md on the path (Anthropic – How Claude Code works in large codebases (opens in a new tab), May 2026); Intent Layers automates the same idea, generating nested CLAUDE.md or AGENTS.md files in any directory over roughly 20,000 tokens, with a global-invariants section for what the code alone cannot show (Seven tools to stop burning tokens in Claude Code (opens in a new tab), May 2026). Two smaller CLAUDE.md disciplines recur: as a file grows, wrapping domain-specific rules in conditional <important if="..."> tags keeps the model from ignoring them, and HumanLayer’s editing test for any candidate line is whether Claude would err without it, which holds their own CLAUDE.md near 60 lines (HumanLayer - Writing a good CLAUDE.md (opens in a new tab)).
The harness’s own defaults set hard limits most users never see. Bash output truncates at 30,000 characters by default (raisable in settings), and file reads cap at 25k tokens plus a hard 2,000-line limit Claude does not know it hit, so large-file work needs explicit offset-and-limit instructions or a read hook that enforces them; auto-compact fires at 95% full though an override can trigger it earlier, cleanupPeriodDays keeps transcripts only 30 days by default, silently bounding both --resume history and /insights, three settings flags disable Statsig analytics and Sentry error telemetry, and an attribution setting removes Claude’s co-author line from commits (AI Labs – Hidden Claude Code settings and flags (opens in a new tab), March 2026). Threshold folklore converges around the same numbers: the same source puts quality degradation at about 70% full, and an aggregated guide claims precision loss from 70%, rising hallucination from 85%, and erratic responses past 90% (Claude Code Ultimate Guide (opens in a new tab), July 2026).
Compaction is contested. Some practitioners avoid /compact and instead rewind to around 40% of the window after having the agent write its own progress summary, or use targeted compaction that names what to keep (“keep the database schema and the authentication logic”) rather than a blind pass (Builder Methods – Agent OS walkthrough (opens in a new tab), 6 August 2025). Others go further: keep a progress reference file and clear the window entirely (“when in doubt, clear it out”), plan in one window and implement in a fresh one, and expect corner-cutting as the limit nears, since the model starts wrapping up early out of token-budget concern unless told compaction will handle the overflow (15 hidden Claude Code rules (opens in a new tab), 10 December 2025). AMP dropped compaction for handoff, starting a fresh thread seeded with what carries over, which one observer calls the winning strategy (How Claude Code works (opens in a new tab), 26 December 2025).
Practitioner rules of thumb put effective context at 50-60% of the window, so a complicated task should not start halfway into a conversation; the visible todo list is itself a context tool, recitation that re-states objectives at the end of the context to counter lost-in-the-middle, and the todo list and plan persist through compaction as markdown files (A Guide to Claude Code 2.0 (opens in a new tab), December 2025). A heavier variant logs every read, search, and prompt to an append-only “context bundle” through hooks, so a fresh agent can reload it and recover roughly 60-70% of the prior session after a context blowout (Context engineering techniques (opens in a new tab), 8 September 2025). On the delegate side, per-subfolder CLAUDE.md files that index each file and function let the agent read instead of grepping, and a separate CHANGELOG.md records why past changes were made so the agent does not undo them (Claude Code power-user patterns (opens in a new tab), 2 August 2025).
Why use HTML instead of Markdown for output?
A short essay from inside the Claude Code team pushed many practitioners off markdown as the default artifact format. The essay finds markdown restricting past about a hundred lines and moves specs, reports, and PR writeups to HTML because “the chance of someone actually reading your spec, report or PR writeup is much much higher if it’s in HTML”; the pattern extends to throwaway single-purpose editors, single HTML files purpose-built for one piece of data, whose trick is always ending with an export, a copy-as-JSON or copy-as-prompt button that turns UI state back into something to paste into Claude Code (The Unreasonable Effectiveness of HTML (opens in a new tab), May 2026).
The essay names two costs: HTML takes 2-4x longer to generate than markdown (barely noticeable inside a 1M window), and HTML diffs are noisy to review; it explicitly warns against packaging the technique as a skill, “you can just ask it to ‘make a HTML file’,” and recommends generating one design-system HTML file from your codebase as a reference for all later ones (The Unreasonable Effectiveness of HTML (opens in a new tab), May 2026). A follow-up account describes dropping the GPT-4-era markdown default in response, noting that the 8,192-token limits which once made markdown’s token efficiency worthwhile are gone, and that HTML answers can carry SVG diagrams, interactive widgets, and in-page navigation (The Unreasonable Effectiveness of HTML (opens in a new tab), May 2026). Experiments that use output styles as generative UI follow the same current.
Related
- Context Engineering: the reduce-and-delegate techniques step by step.
- Persistent agent memory: how to keep state in files instead of the window.
- Context and productivity: the research on how context affects output quality.
- Authoring skills: why skill descriptions count against the startup budget.
- Evaluation and economics: what the startup tokens cost and who sells the fixes.
Resources
Context and output
- Paste This Into Claude, Never Hit a Token Limit Again (opens in a new tab) - Practitioner walkthrough of auditing fixed context, compressing tool inputs, reducing output, and routing delegated work to smaller models.
- The New Rules of Context Engineering (opens in a new tab) - Vendor guidance retiring rule-heavy prompting for model judgment, progressive disclosure, and automatic memory on its Claude 5 generation models, July 2026.