estimate-tokens-chars-div-4

IN premise

`estimate_tokens` uses `len(text) // 4` with a minimum return value of 1; it never returns 0, even for empty strings.

Summary

The token estimator uses a simple character-count heuristic, dividing the text length by four. Because it floors to a minimum of 1, every input — even an empty string — is treated as consuming at least one token. This means downstream logic can safely divide by or depend on the token count without guarding against zero values.

Details

Sourceentries/2026/04/24/tests-test_compact.md