<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Context Window on Programmer.ie: Modern AI programming</title>
    <link>http://programmer.ie/tags/context-window/</link>
    <description>Recent content in Context Window on Programmer.ie: Modern AI programming</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Wed, 02 Sep 2026 15:15:00 +0100</lastBuildDate>
    <atom:link href="http://programmer.ie/tags/context-window/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>A Session Is Not a Stateless Function</title>
      <link>http://programmer.ie/books/browser-ai-from-first-principles/09-chapter/</link>
      <pubDate>Wed, 02 Sep 2026 15:00:00 +0100</pubDate>
      <guid>http://programmer.ie/books/browser-ai-from-first-principles/09-chapter/</guid>
      <description>&lt;p&gt;A remote model API often encourages a simple mental model:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-javascript&#34; data-lang=&#34;javascript&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#66d9ef&#34;&gt;const&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;answer&lt;/span&gt; &lt;span style=&#34;color:#f92672&#34;&gt;=&lt;/span&gt; &lt;span style=&#34;color:#66d9ef&#34;&gt;await&lt;/span&gt; &lt;span style=&#34;color:#a6e22e&#34;&gt;complete&lt;/span&gt;(&lt;span style=&#34;color:#a6e22e&#34;&gt;prompt&lt;/span&gt;);&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Input goes in. Output comes back. Any conversation state is reconstructed by the application and sent again.&lt;/p&gt;&#xA;&lt;p&gt;A browser-managed Prompt API session is a different kind of object. It owns resources, may retain conversational state, reports a finite input budget, supports branching in some implementations, and should be destroyed when its work is finished.&lt;/p&gt;&#xA;&lt;p&gt;The correct abstraction is not a stateless function.&lt;/p&gt;</description>
    </item>
    <item>
      <title>When the Context Window Fills</title>
      <link>http://programmer.ie/books/browser-ai-from-first-principles/10-chapter/</link>
      <pubDate>Wed, 02 Sep 2026 15:15:00 +0100</pubDate>
      <guid>http://programmer.ie/books/browser-ai-from-first-principles/10-chapter/</guid>
      <description>&lt;p&gt;A stateful session eventually encounters a physical limit.&lt;/p&gt;&#xA;&lt;p&gt;Prompts, initial instructions, examples, conversation history and model outputs all compete for a finite context budget. Once the budget is exhausted, the application cannot solve the problem by pretending the next message is independent.&lt;/p&gt;&#xA;&lt;p&gt;The difficult question is not how to delete text.&lt;/p&gt;&#xA;&lt;p&gt;It is how to preserve the right state.&lt;/p&gt;&#xA;&lt;hr&gt;&#xA;&lt;h2 id=&#34;1-the-context-window-is-a-budget&#34;&gt;1. The context window is a budget&lt;/h2&gt;&#xA;&lt;p&gt;When a session exposes usage and quota, context pressure becomes observable:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
