From f254a1ca401296d69df29ebd4f2198e5dbc4d44c Mon Sep 17 00:00:00 2001 From: Julian lechner Date: Thu, 8 Oct 2026 10:34:00 +0200 Subject: [PATCH] fix(context-report): accept "< 20" token counts from /context Co-Authored-By: Claude Opus 5.5 --- scripts/benchmarks/context.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/benchmarks/context.py b/scripts/benchmarks/context.py index 2220ec1..c3b82a6 100644 --- a/scripts/benchmarks/context.py +++ b/scripts/benchmarks/context.py @@ -43,7 +43,8 @@ def skill_names(root): def tokens(text): - text = text.strip().lstrip('~') + # Claude prints "< 20" for small nonzero counts; count it as its upper bound. + text = text.strip().lstrip('~<').strip() if text in ('', '-'): return 0 return round(float(text[:-1]) * 1000) if text.endswith('k') else round(float(text))