Repository navigation
v1.8.4
Default 1M context window
All current Claude models are 1M. The 200K default was from the pre-1M era and caused cozempic's diagnostics to show wrong numbers (0 tokens, 200K window) on sessions where model detection returned <synthetic> (compaction artifacts). Pro plan users can override with COZEMPIC_CONTEXT_WINDOW=200000.
Skip <synthetic> model in detection
detect_model, extract_usage_tokens, and quick_token_estimate now skip assistant messages with model: "<synthetic>". These are compaction summaries/system messages with zero usage — using them as the "last real model" caused the guard to think it was a 200K session.
Community PRs
- PR #78 (@ynaamane):
stale-tmp-artifactsdoctor check + auto-fix — surfaces and cleans accumulated guard PID/log/lock files in /tmp - PR #79 (@ynaamane): Strategy config validation — catches string-for-int, typo'd modes, swapped age thresholds that could silently destroy sessions
- PR #76 (@ynaamane): Opus 4.7 model detection
- PR #75 (@bslinger): Claude PID handoff for detached guard
Self-hosted counter API
Migrated from counterapi.dev to Cloudflare Worker + D1 with analytics (geographic distribution, daily unique users). Fix for #77 (guard crash on transcript path) also included.
410 tests passing.