Repository navigation
Agentao 0.5.20
Agentao 0.5.20
This release is about long, tool-heavy runs. A batch of parallel tool calls
used to stop compaction, or make it fire again and again while shedding
almost nothing. The local token estimate ran 20–40% high on Chinese tool
results for most models, so compaction started early. Both are fixed, and a
compaction now keeps the request of the turn in progress. Three changes
behave differently on upgrade; see Behaviour changes.
Behaviour changes
- The
[PIN]message prefix is removed. It has not worked for a normal
turn since 2026-04-01, when the date reminder moved into user messages,
because the check required the content to start with[PIN]. The check
also read no role, so a tool result or an assistant message that started
with[PIN]was moved out of its tool exchange. A message that starts with
[PIN]is now an ordinary message.PreparedCompaction.pinnedand
.summary_messagesare gone, and.kept_requestis new. - A compaction keeps the request of the turn in progress. When a cut
lands inside a turn, the full compaction and the last overflow rung
(minimal_history) put the request back after the summary, with a note
that tells the model to continue. A long prompt no longer loses its later
lines to the summarizer's 2,000-character cut. The copy costs at most 10%
of the effective window. Past that it keeps both ends and states the gap.
Images are not kept. - The token estimate is lower on Chinese text, so compaction starts
later (#630). The estimate was checked against each provider's own
prompt_tokensin real runs:- With
agentao[tokenizer]installed,gpt-5 and later,gpt-4.1,
gpt-4.5,gpt-oss,o4anddeepseekmodels now useo200k_base.
gpt-6.xhad no encoding and was estimated 20–37% high. - Without tiktoken, or for a model without an encoding, the character
heuristic counts a non-ASCII character at 1.0 tokens fordeepseek,
gemini,glmandkimi, and 1.1 forgpt-5and later. Claude and
every unmeasured family keep 1.3. - A first request, which has no real count yet, now includes the tool
schemas in its estimate.
- With
Fixes
- A batch of parallel tool calls no longer blocks compaction (#625).
When the rest of history was one run of tool results, the full compaction
failed withno_safe_split. Three such batches in a row opened the circuit
breaker. It now cuts at the assistant message that requested the batch. - Compaction no longer clips results the model has not read, until the
provider refuses the request. After a context-length error or a413, the
full compaction clips them, and each clipped result names a saved copy in
.agentao/tool-outputs/. If the full compaction does not succeed on a
context-length error, the overflow ladder runs a clip of its own
(kind="microcompact",reason="api_overflow"). - A compaction that would not help now stands down. These cases return
skipped, make no summarizer call and do not count against the circuit
breaker:nothing_to_shed: the older half holds only the turn's request or what
an earlier compaction wrote (#623). A first request that fans out into a
batch is this case too.too_little_to_shed: the compaction would shed less than 10% of history,
usually because most of it is a batch the model has not read (#629). In
real runs, such compactions went from 136,086 to 131,841 tokens, and the
next request compacted again within seconds.
complete_taskends the sub-agent's turn, and the parent gets that
answer. Before, the loop went on, the model calledcomplete_taskagain
with a line such as "see above", and the parent got that line.- A cancel during a tool batch wins over a hook stop,
complete_taskor
the doom loop (#632). A cancelled batch could end as a success, and its
save_memoryor skill activation emitted no event. agentao.loglogs messages that a compaction rewrote in place (#635).
Each request logs the messages that are new or changed, a changed one
marked(rewritten)./crystallizeevidence no longer quotes the date reminder as the start of
a user goal.
See CHANGELOG.md for the full entries.