<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://oskrim.github.io/feed.xml" rel="self" type="application/atom+xml" /><link href="https://oskrim.github.io/" rel="alternate" type="text/html" /><updated>2026-08-02T10:08:44+00:00</updated><id>https://oskrim.github.io/feed.xml</id><title type="html">Oskari Mantere</title><subtitle>Software and systems</subtitle><entry><title type="html">Call stack diffs</title><link href="https://oskrim.github.io/engineering/2026/08/02/call-stack-diffs.html" rel="alternate" type="text/html" title="Call stack diffs" /><published>2026-08-02T07:00:00+00:00</published><updated>2026-08-02T07:00:00+00:00</updated><id>https://oskrim.github.io/engineering/2026/08/02/call-stack-diffs</id><content type="html" xml:base="https://oskrim.github.io/engineering/2026/08/02/call-stack-diffs.html"><![CDATA[<p>Inspired by <a href="https://github.com/humanlayer/advanced-context-engineering-for-coding-agents/blob/main/wsff.md#program-design">HumanLayer’s “Program Design” section</a> in <em>Why Software Factories Fail</em>, I’ve recently added a permanent system instruction for coding agents to communicate all planned changes or implementations inline as <em>call stack diffs</em>:</p>

<div class="language-diff highlighter-rouge"><div class="highlight"><pre class="highlight"><code> LLMRun.generate()
 └─ llmClient.streamChatCompletions()
<span class="gd">-   └─ iterator.next()
-      └─ wait indefinitely
</span><span class="gi">+   └─ withProviderInactivityTimeout()
+      ├─ race iterator.next() against 30s timeout
+      ├─ event received → reset timer → yield downstream
+      └─ timeout
+         ├─ abort provider request
+         └─ throw ProviderInactivityTimeoutError
+            ↳ LLMRun.retryBackup()
</span></code></pre></div></div>

<p>I find this much faster to scan than the prose which these language models tend to produce by default. The red/green highlighting visually stands out from the rest of the session transcript, so you can quickly parse the behavioral changes on a high level. This is especially useful when working out the design in back-and-forth conversation or when resuming work after switching sessions.</p>

<p>This diff does not replace the supporting explanations or documentation, rather it’s like a pseudocode but better at showing the location of changes in the actual program, using real function and class names in an informal but maximally compressed representation.</p>]]></content><author><name></name></author><category term="engineering" /><summary type="html"><![CDATA[Inspired by HumanLayer’s “Program Design” section in Why Software Factories Fail, I’ve recently added a permanent system instruction for coding agents to communicate all planned changes or implementations inline as call stack diffs:]]></summary></entry></feed>