Reload CWD fix
Fixed: cozempic reload could cd into a subdirectory instead of the project root, causing claude --resume to fail with "No conversation found." Slug reversal (derived from the session's own JSONL path) now takes priority over sidecar CWD and os.getcwd().
Input validation hardening (PR #83, @ynaamane)
Three-layer numeric validation across CLI flags, env vars, and in-process calls:
- Layer 1: argparse validators catch bad values at the CLI (
--threshold -1→ clear error, exit 2) - Layer 2:
start_guard()validates in-process callers (soft < hard ordering, positive values) - Layer 3: env vars (
COZEMPIC_CONTEXT_WINDOW,COZEMPIC_SYSTEM_OVERHEAD_TOKENS) warn on bad values and fall back to defaults instead of crashing
Follow-up: start_guard_daemon() now pre-validates numeric params before spawning the child process — without this, bad values passed through to the child, which died immediately while the parent reported success.
Stats
- 464 tests passing
- ~6.2B tokens saved, ~17.5K tracked installs, 279 stars