Original Reddit post

Hey builders! Context window saturation is the biggest bottleneck for long-horizon agents like Claude. Raw token streams get noisy and expensive, causing agents to lose track of complex goals. I’m implementing h5i , a Git-like sidecar based on the Git Context Controller (GCC) framework ( arXiv:2508.00031 ). It treats agent reasoning as a versioned workspace rather than a linear chat history. Repo : https://github.com/Koukyosyumei/h5i Key Features: OTA Traces (Observe-Think-Act) : The agent uses fine-grained traces to log its state. This allows it to “offload” reasoning to a structured file that it can selectively retrieve later.

The agent logs its specific observations and actions h5i context trace --kind OBSERVE “Redis p99 latency is 2 ms under load” h5i context trace --kind THINK “In-memory storage is redundant; Redis overhead is acceptable” h5i context trace --kind ACT “Switching session store to Redis in src/session.rs”

Branch & Merge : When an agent isn’t sure about a path, it can branch its reasoning to explore a hypothesis without polluting the main context. Once validated, it merge s the findings back.

Explore a risky refactor in isolation h5i context branch experiment/sync-fallback --purpose “test sync storage as a fallback” # After validation, merge the reasoning back into the main trajectory h5i context merge experiment/sync-fallback

Instant State Recovery : When a session restarts, the agent doesn’t need to re-read 50 tool calls. It just runs show to see the roadmap and the recent execution trace. h5i context show --trace Output Example: ── Context ───────────────────────────────────────────────── Goal: Build an OAuth2 login system (branch: main) Milestones: ✔ [x] Initial setup ✔ [x] GitHub provider integration ○ [ ] Token refresh flow ← resume here Recent Trace: [ACT] Switching session store to Redis in src/session.rs Why it matters: The GCC paper shows a 13% improvement on SWE-Bench Verified . It’s the difference between an agent that “chats” and an agent that “engineers” across multiple trajectories. submitted by /u/Living_Impression_37

Originally posted by u/Living_Impression_37 on r/ClaudeCode