Commit Graph

7 Commits

Author SHA1 Message Date
123456wda
b5bd0ddfa1 fix: preserve latest tool result batch during compaction 2026-08-15 21:14:22 +08:00
Haoran
7e2f2fd99b refactor: streamline the course to 17 lessons 2026-08-12 03:02:42 +08:00
Haoran
b36dbcd84f Consolidate agent harness course into 19 lessons 2026-08-04 02:25:40 +08:00
Haoran
13dc5396bb feat: refresh context compaction lesson 2026-07-31 15:52:53 +08:00
Haoran
2d69019342 feat: consolidate course into 21 lessons 2026-07-31 03:15:58 +08:00
John Costa
49b3822247 refactor: summarize only trimmed history in reactive_compact
reactive_compact summarized the full message history before slicing off
the recent tail, so the kept tail was summarized and then re-attached
verbatim, and the emergency prompt-too-long path re-summarized the whole
oversized context. Move the summarize_history call below the tail
computation (including the tool_use/tool_result pair adjustment) and
summarize only messages[:tail_start], so the summary covers older history
while the recent tail stays verbatim.

Applied to the duplicated function in s08, s09, and s20, with the s08
README snippets (en/zh/ja) updated to match. Adds tests covering the
normal path and the case where a tool pair straddles the tail boundary.

Fixes #350
2026-06-15 21:55:21 -07:00
gui-yue
99a1e52b36 fix: harden compaction pair handling 2026-06-07 12:35:08 +08:00