Files
openfang/crates
Philippe BranchuandClaude Opus 4.6 55395c80db Fix token estimation: include ToolUse arguments in text_length
`MessageContent::text_length()` returned 0 for `ToolUse` blocks,
ignoring the tool name and JSON input arguments. This caused the
compactor's `estimate_token_count()` (which uses `text_length()`)
to massively undercount tokens when conversations contained tool
calls with large arguments (e.g. web_search results, page content).

The result: compaction never triggered despite the session exceeding
the context window, leading to "Token limit exceeded" errors.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 23:15:57 +00:00
..
2026-03-15 19:50:43 +03:00
2026-03-15 19:50:43 +03:00