Managing Context Limits in Long Claude Runs: AC Tree Pattern

A developer on r/ClaudeAI describes a recurring failure pattern in long-running Claude sessions. The failures aren't obvious errors but gradual drift where the model's output becomes less aligned with the original intent.
The Problem: Auto-Compact and Context Limits
According to the source, auto-compact presents the first issue. It consumes a meaningful portion of the available context before productive work begins, and the compression isn't neutral—the model decides what information to preserve, leading to information loss. Primacy and recency bias exacerbate this: the middle of the run weakens first, early constraints fade, and decisions are made against fragmented intent.
Turning auto-compact off reveals the second problem: the hard context limit. Once a session fills up, it's effectively over with no clean continuation or recovery path.
The Solution: AC Tree Execution Pattern
The developer found success by changing the execution shape rather than just adjusting settings. The approach treats the input not as a finished specification but as a human goal. The system interviews the user to clarify intent, extract constraints, and surface hidden assumptions, then compiles this into an AC tree—a dependency graph of discrete, verifiable units of work.
Each node in the AC tree gets its own session, and nodes only know about each other through minimal durable state passed forward. This keeps the overall workflow long-running while making each generation short, bounded, and isolated. Drift gets contained at the node level instead of poisoning the entire run.
The developer implemented this pattern in a project called Ouroboros, available at github.com/Q00/ouroboros.
📖 Read the full source: r/ClaudeAI
👀 See Also

Claude Code Used to Reverse Engineer Disney Infinity 1.0, Breaking 13-Year Character Restriction
A developer used Claude Code (Opus 4.6 with high reasoning) to reverse engineer the Disney Infinity 1.0 game binary, identifying and patching 13 validation call sites that prevented characters from playing in any playset. The solution required 17 binary patches and 3 modified data files, solving a problem the modding community had been unable to crack for over a decade.

Emergency coding setup: Claude Code on OCI free VM with Termux on Android
A developer shares a setup using Oracle Cloud Infrastructure's free VM (24GB RAM, 4 vCPUs) with Claude Code installed, accessed via Termux on Android for emergency coding when a laptop isn't available. The setup requires Claude Pro ($20/month) or Max ($100/month) subscription.

Controlling Claude Code via WhatsApp with Channels Feature
A developer connected WhatsApp to a running Claude Code session using the Channels feature (v2.1.80+), enabling text messages, voice notes with Whisper transcription, and voice replies with OpenAI TTS to interact with the same CLI session.
