{"slug": "call-stack-diffs", "title": "Call stack diffs", "summary": "A developer has added a permanent system instruction for coding agents to communicate planned changes as call stack diffs, inspired by HumanLayer's 'Program Design' section in 'Why Software Factories Fail'. The approach uses red/green highlighting to visually distinguish behavioral changes, making it faster to scan than prose and useful for design discussions and session resumption.", "body_md": "# Call stack diffs\n\nInspired by [HumanLayer’s “Program Design” section](https://github.com/humanlayer/advanced-context-engineering-for-coding-agents/blob/main/wsff.md#program-design) 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*:\n\n```\n LLMRun.generate()\n └─ llmClient.streamChatCompletions()\n-   └─ iterator.next()\n-      └─ wait indefinitely\n+   └─ withProviderInactivityTimeout()\n+      ├─ race iterator.next() against 30s timeout\n+      ├─ event received → reset timer → yield downstream\n+      └─ timeout\n+         ├─ abort provider request\n+         └─ throw ProviderInactivityTimeoutError\n+            ↳ LLMRun.retryBackup()\n```\n\nI 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.\n\nThis 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.", "url": "https://wpnews.pro/news/call-stack-diffs", "canonical_source": "https://oskrim.github.io/engineering/2026/08/02/call-stack-diffs.html", "published_at": "2026-08-02 10:09:29+00:00", "updated_at": "2026-08-02 10:22:24.216349+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools"], "entities": ["HumanLayer"], "alternates": {"html": "https://wpnews.pro/news/call-stack-diffs", "markdown": "https://wpnews.pro/news/call-stack-diffs.md", "text": "https://wpnews.pro/news/call-stack-diffs.txt", "jsonld": "https://wpnews.pro/news/call-stack-diffs.jsonld"}}