<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[DK Labs]]></title><description><![CDATA[DK Labs]]></description><link>https://dklabsdev.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 13 Nov 2026 21:35:13 GMT</lastBuildDate><atom:link href="https://dklabsdev.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Where does your Claude Code context actually go? A practical guide]]></title><description><![CDATA[What Claude Code sends on every request, what makes the context jump, and five habits that keep it lean.]]></description><link>https://dklabsdev.hashnode.dev/where-does-your-claude-code-context-actually-go-a-practical-guide</link><guid isPermaLink="true">https://dklabsdev.hashnode.dev/where-does-your-claude-code-context-actually-go-a-practical-guide</guid><category><![CDATA[claude-code]]></category><category><![CDATA[AI]]></category><category><![CDATA[Developer Tools]]></category><category><![CDATA[Productivity]]></category><category><![CDATA[open source]]></category><dc:creator><![CDATA[DK Labs]]></dc:creator><pubDate>Wed, 11 Nov 2026 22:19:53 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6af4e8305725c17c93378f19/e38e32ca-0fe0-47ae-929c-f63b3c0b14e3.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>You type a one-line prompt. Claude Code answers it with tens of thousands of tokens of context behind it. Most developers know that in the abstract; very few have watched it happen step by step.</p>
<p>We have, because we built a tool to show it. This guide walks through what fills Claude Code's context, what makes it jump, and the habits that keep it lean. Everything here applies whether or not you use our tool. Where it helps, we'll show what one real session looked like through it.</p>
<h2>What Claude Code sends on every request</h2>
<p>Claude Code is stateless between requests in one important way: each request carries the whole working context again. A lot of that is the same every time:</p>
<ul>
<li><strong>The system prompt.</strong> Claude Code's own instructions.</li>
<li><strong>Tool definitions.</strong> Every built-in tool and every tool from each connected MCP server, with its description and parameters.</li>
<li><strong>Your instruction files.</strong> Every <a href="http://CLAUDE.md">CLAUDE.md</a> that applies to the folder you're in.</li>
<li><strong>The skills listing.</strong> The name and description of every skill available to Claude, so it knows what it could load.</li>
<li><strong>The conversation so far.</strong> Your prompts, Claude's replies, and every tool result that hasn't been compacted away.</li>
</ul>
<p>The first four are a fixed cost: you pay them before Claude does any work. The fifth grows with every step.</p>
<p>To see Claude Code's own breakdown at any moment, run <code>/context</code>. One thing to know: its report goes into the conversation, about 9K tokens, so use it when you need it, not after every turn.</p>
<h2>What one session looked like</h2>
<p>We ran a short session on a small sample project with a fresh Claude Code setup, and recorded it with Flightpath. We gave the project a long <a href="http://CLAUDE.md">CLAUDE.md</a> and more skills than it needed, to see what would show up. Then we worked normally for seven minutes: a project tour, a failing test, a build file, a subagent review, a model switch, a new flag.</p>
<p>Three moments stood out:</p>
<ol>
<li><strong>When the first prompt was answered, the context already held about 55K tokens.</strong> By the second prompt, our prompts together were about 41 tokens, while Claude Code was carrying 59,375.</li>
<li><strong>One file read added 20,573 tokens in a single step.</strong> We asked Claude to read a source map in the build folder. Perfectly reasonable, and the biggest jump in the session.</li>
<li><strong>Switching model mid-session wrote 52.9K tokens of cache again.</strong></li>
</ol>
<img src="https://cdn.hashnode.com/uploads/covers/6af4e8305725c17c93378f19/d9b22261-5b52-4311-b980-069ef5b4525c.png" alt="The biggest rise of the session: one read of a source map in the build folder added 20,573 tokens" style="display:block;margin:0 auto" />

<p><em>One read, 20,573 tokens: the biggest rise of the session, opened up to show what caused it.</em></p>
<p>None of these is a bug. All three are worth knowing about, and none of them shows in the terminal while it happens.</p>
<h2>What makes the context jump</h2>
<p>In our experience the big rises come from a few places:</p>
<ul>
<li><strong>Large file reads.</strong> Generated and vendored files are the usual suspects: source maps, minified bundles, lockfiles, <code>node_modules</code>, <code>dist</code>.</li>
<li><strong>Command output.</strong> A test run or a build log can be large.</li>
<li><strong>Subagent reports.</strong> A subagent works on its own budget and hands back a summary, which is the point. In our session, the subagent used 141.2K tokens and returned about 1.6K to the main conversation.</li>
<li><strong>Cache rewrites.</strong> Not a rise in the context itself, but a cost: when the cache can't be reused, the whole conversation is written to it again.</li>
</ul>
<h2>Five habits that keep the context lean</h2>
<p><strong>1. Deny reads of folders that are rarely worth it.</strong> If Claude never needs to read <code>node_modules</code>, <code>dist</code> or lockfiles, say so in your Claude Code settings:</p>
<pre><code class="language-json">{
  "permissions": {
    "deny": [
      "Read(**/node_modules/**)",
      "Read(**/dist/**)"
    ]
  }
}
</code></pre>
<p>A Read deny rule also blocks edits and writes in those places, so only add what you really don't want Claude touching.</p>
<p><strong>2. Keep always-loaded instructions short.</strong> Every line of every <a href="http://CLAUDE.md">CLAUDE.md</a> is sent with every request. If a section is only needed for one kind of task, move it into a skill, which loads only when it's used.</p>
<p><strong>3. Turn off skills you don't use.</strong> Each available skill's description is listed on every request. In Claude Code, <code>/skill-doctor</code> shows each skill's cost and use.</p>
<p><strong>4. Pick the model, the effort level and your MCP servers before the first message.</strong> Changing any of them mid-session can mean the cache can't be reused, and the conversation is written again.</p>
<p><strong>5. Compact before a long break.</strong> Claude Code's cache expires after a while. If you step away and come back, the next message writes the whole conversation again. Running <code>/compact</code> first makes that much smaller, and starting a fresh session is better still if you're done with the work.</p>
<h2>Seeing it while it happens</h2>
<p>We built Flightpath because we wanted these answers live, not after the fact. It's a free, open-source Claude Code plugin that draws your session in the browser as it runs.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6af4e8305725c17c93378f19/8e0d4d84-10aa-4afb-8337-5be79f7fa793.gif" alt="Flightpath following a Claude Code session: the steps, a suggestion, the context over time, and what Claude had been given" style="display:block;margin:0 auto" />

<p><em>A thirty-second tour: steps, a suggestion, the context over time, and what Claude was carrying.</em></p>
<ul>
<li><strong>Steps:</strong> every turn, tool call and subagent, with what each added to the context.</li>
<li><strong>Tokens:</strong> the context over time, the room left before auto-compact, and the biggest rises, each opened up to show what made it.</li>
<li><strong>Snapshot:</strong> what Claude had in context at any step, piece by piece, including the fixed cost of every request.</li>
</ul>
<p>And a <strong>coach</strong> that reviews the session as it runs. In our seven-minute session it raised four suggestions, each tied to the step that prompted it:</p>
<ul>
<li>the model switch</li>
<li>the long <a href="http://CLAUDE.md">CLAUDE.md</a></li>
<li>reads of the build folder that a deny rule would skip, with the rule ready to copy</li>
<li>skills that were listed but never used</li>
</ul>
<img src="https://cdn.hashnode.com/uploads/covers/6af4e8305725c17c93378f19/5dad73bb-2b0f-475c-94e7-5f2db78f2fdf.png" alt="A coach suggestion: pick your model at the start of a session, 52.9K tokens written again after the switch" style="display:block;margin:0 auto" />

<p><em>The model-switch suggestion, next to the step it came from.</em></p>
<p>Each one says why it matters and links to Claude Code's documentation.</p>
<p>Flightpath adds no tokens of its own: it records through Claude Code's hooks and answers its own commands on your machine, so nothing it does reaches the model. Everything stays local, and it keeps file paths, never file contents.</p>
<h2>Try it</h2>
<p>You need Node 24 or later. Then, inside Claude Code:</p>
<pre><code class="language-plaintext">/plugin marketplace add dk-labs-dev/flightpath
/plugin install flightpath@flightpath
</code></pre>
<p>Your next session records automatically. Type <code>/flightpath:open</code> to watch it.</p>
<p>The source is on GitHub under Apache 2.0: <a href="https://github.com/dk-labs-dev/flightpath">https://github.com/dk-labs-dev/flightpath</a>. If it shows you something unexpected about your own sessions, we'd like to hear about it. And if it's useful, a star helps other Claude Code users find it.</p>
]]></content:encoded></item></channel></rss>