Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

How my Go coding agent keeps a turn-1 constraint across 3 context resets

Description and use

<p><em>Originally published on <a href="https://inhere.github.io/en/blog/2026/suga-long-session/" rel="noopener noreferrer">my blog</a>. I'm the author of suga, an MIT-licensed coding agent written in Go.</em></p> <p>Keep an agent in one session long enough and three things go wrong. The context fills up and gets compacted, and the part that gets dropped is the constraint you gave it in the first turn. Every request carries a few thousand tokens of fixed overhead, so long sessions get expensive. And when something breaks, there is no record of what the agent did.</p> <p><code>suga</code> is a

Problem

<p><em>Originally published on <a href="https://inhere.github.io/en/blog/2026/suga-long-session/" rel="noopener noreferrer">my blog</a>. I'm the author of suga, an MIT-licensed coding agent written in Go.</em></p> <p>Keep an agent in one session long enough and three things go wrong. The context fills up and gets compacted, and the part that gets dropped is the constraint you gave it in the first turn. Every request carries a few thousand tokens of fixed overhead, so long sessions get expensive. And when something breaks, there is no record of what the agent did.</p> <p><code>suga</code> is a

Outcome

<p><em>Originally published on <a href="https://inhere.github.io/en/blog/2026/suga-long-session/" rel="noopener noreferrer">my blog</a>. I'm the author of suga, an MIT-licensed coding agent written in Go.</em></p> <p>Keep an agent in one session long enough and three things go wrong. The context fills up and gets compacted, and the part that gets dropped is the constraint you gave it in the first turn. Every request carries a few thousand tokens of fixed overhead, so long sessions get expensive. And when something breaks, there is no record of what the agent did.</p> <p><code>suga</code> is a

Evidence

How my Go coding agent keeps a turn-1 constraint across 3 context resets

Source

  • Record date: 2026-10-26T09:26:09.129Z