Urgent.News

What's breaking now, across thousands of outlets.

AI

Your Agent Session Is a Tree. Your Code Thinks It Is a List.

Codex made Item a wire type. Pi gave every session entry a parentId . Claude Code compresses the transcript in five progressive stages. Those are three answers to the same question, and it is a question most agent code never asks out loud: what is the durable unit of state here, and what happens to it when you run out of room? You find out which answer you picked at exactly one moment. Not while…

Every harness in this series reaches the maximum capacity and must discard information. Pi assigns each session entry a parent ID, creating a branching tree structure native to the system. Codex, on the other hand, compresses the transcript through five progressive stages, making the durable unit the conversation itself. When the context window fills, Claude Code employs progressive compression, preserving the most recent turns while discarding older material.

Once the session summary is created, the detailed information underneath it cannot be accessed again, resulting in a one-way compression process. In contrast, Codex treats agent reasoning and shell commands as item types with identity, allowing them to persist and survive the compression process. Pi achieved a similar outcome by assigning a parent ID to each session entry, forming a tree-like structure.

When branches are abandoned, their content can be replaced by a summary, while the branch remains within the tree. This approach ensures that the branch's existence is retained, without the need for extensive compression algorithms or additional machinery. The difference between the two approaches lies in their durability and adaptability.

Pi's tree-based structure allows for easy branch creation and persistence, while Codex's compression strategy prioritizes the conversation's overall coherence. Both methods achieve the goal of efficient context management, but they do so through distinct design choices.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in AI

More from Tuesday 15 September →