Tags: alexgreensh/token-optimizer
Tags
fix(install): OpenCode-safe install + robust self-update (5.11.28) Addresses #57. - Drop the chmod +x on the git-tracked measure.py: it flipped 100644 to 100755 and, with core.fileMode=true, made the next verified-update checkout abort on a dirty tree. Every caller runs python3 measure.py, so the executable bit was never needed. - update_repo() now stashes (never discards) dirty tracked runtime paths before the release checkout, and reports a dirty-tree failure with an actionable message instead of a misleading network error. - Honor CLAUDE_CONFIG_DIR via a CLAUDE_HOME var, and create the skill-tree home when absent instead of hard-failing with 'Install Claude Code first'. OpenCode users (who load ~/.claude/skills directly) and relocated Claude homes are now supported. - Guard the Claude-only hook setup so a fresh empty home degrades to a warning instead of aborting the install under set -euo pipefail.
fix: first-read skeleton transparency + markdown opt-out (5.11.27) Addresses #79. - First-read skeleton now applies to code only (python/typescript); markdown serves full content (a headings-only outline drops load-bearing prose, and the edit-rate gate does not capture read-need). Markdown stays measured in shadow. All three cohort mirrors kept in sync. - Surface v5_first_read_shadow / v5_first_read_active on the v5 status screen and dashboard Manage tab; they are now visible and toggleable like the other features (master switch vs serve-vs-measure-only). - config.json flag values now parse string falsy tokens ("0"/"false"/"off") consistently with the env path in both the read-hook and dashboard readers; the structure-map tri-state still honors only "beta"; unrecognized values warn. - Archive records now carry file_path + language so a degraded read is self-identifiable (additive, redacted, null when unknown). - Docs corrected (README, read-cache, benchmarks) to describe first-read substitution accurately as code-only with the expand/range/edit recovery.
fix: Windows install + UTF-8 re-exec hardening (5.11.26) - Add .gitattributes to keep shipped scripts/text at LF so install.sh runs on Windows clones (#78) - utf8_io re-execs via subprocess.Popen on Windows so interpreter paths with spaces relaunch correctly; graceful fallback on restricted hosts - README: one-time line-ending self-heal note for older checkouts - Bump opencode plugin to 1.0.15; sync Codex marketplace mirror; refresh CHECKSUMS
fix: skill-payload completeness check + dev/cache self-heal (5.11.25) - install.sh verifies the skill payload is complete (SKILL.md plus the references it cites), repairing a partial sparse-checkout or failing loudly instead of loading an incomplete skill tree - add install_reconcile self-heal for a dev-symlink / plugin-cache skill shadow: backup-first, confined to the plugin cache, warns when ambiguous - document the OpenCode skill-refresh path (skills load from ~/.claude/skills; refresh via the standard installer, not the --opencode bundle build) - sync the Codex marketplace mirror and bump to 5.11.25
fix: OpenCode runtime detection + CRLF install.sh + utf8_io Windows p… …ath (5.11.24) Issue #78: install.sh CRLF line endings - Add .gitattributes to force LF for *.sh, *.py, *.json, and 20+ file types - Prevents git autocrlf from converting to CRLF on Windows clone Issue #57: Token optimizer targets .claude instead of .opencode - Process tree scan now uses ps args= (full cmdline) instead of comm= Detects wrapper launches: node /path/opencode, bun run opencode - Add _opencode_config_signal() tertiary fallback: checks ~/.config/opencode/ with real content when env vars and process tree scan fail - Claude plugin env vars suppress the config signal (Claude takes priority) utf8_io.py: os.execv fails on Windows with spaces in path - Use subprocess.Popen on Windows (quotes paths correctly) - Keep os.execv on Unix (no quoting issue) - Wrap child.wait() in try/except, flush streams before os._exit - Narrow all except blocks to specific exception types Code quality (torture room gauntlet): - Elimin- Elimin- Elimin- Elimin- Elimin- Elimin- Elimin- Elimin- Elimin- Elimin- Elimin- EliminPTIMIZER_DEBUG env-gated diagnostic logging - Narro- Narro- Narro- Narro- Narro- Narro- Narro- Narro- Narro- Narro- Narro- Nay empty files (scripts/0, scripts/to) - Bump version to 5.11.24, sync nested Codex marketplace plugin - Regenerate CHECKSUMS.sha256
fix(5.11.22): dashboard recommendations read settings.json env, not j… …ust os.environ (#77) Detection of v5 features and recommendations only read os.environ. The dashboard is regenerated by the daemon, which does not inherit Claude Code's per-session env injection, so flags a user set in settings.json were invisible and the dashboard nagged them to enable things already configured (even showing RECOMMENDED next to "set via env var, cannot toggle"). Fix is systemic across every feature the dashboard marks: - New helpers resolve env vars and top-level keys across settings.json (project local/shared then global local/shared), memoized by mtime. - A feature set via env var is source=env, recommended=False, and excluded from headline and opt-in savings -- in both directions (enable or disable). - structure_map stays faithful to its real telemetry gate (beta only) so the badge never shows enabled while logging never fires. - Same settings.json awareness applied to the git-instructions (Rule 14), claude.ai MCP (Rule 15 + coach) and context-window detection paths. - Hardening: non-UTF8 settings no longer crash the run, a FIFO at .claude/settings.json can't hang it, a deleted CWD degrades gracefully, and /api/v5/toggle rejects env-managed features instead of writing a shadowed config.
fix(5.11.21): Codex hooks survive version upgrades (#75) The Codex installer baked the marketplace's versioned install dir (.../token-optimizer/<X.Y.Z>/) directly into ~/.codex/hooks.json. When the marketplace installed a newer version, that directory was removed, so every Codex tool call failed on a missing hook path. The hook command now resolves the newest installed version at runtime from the stable parent directory (semver-filtered glob + sort -V), falling back to the baked path if none is found. Non-marketplace installs (dev / install.sh) keep the previous direct invocation unchanged. Existing affected users: re-run codex-install once after updating to pick up the self-healing hook; subsequent upgrades will no longer break. Thanks to @amirfish1 for the precise root-cause report (#75).
feat(5.11.20): respondToBashCommands detector (PR #74) with integrati… …on fixes Adds a config detector that flags when respondToBashCommands isn't disabled in settings.json. Since Claude Code v2.1.186 that setting makes the model emit a reply after every /command and !bash output, spending output tokens on unrequested replies. Detection idea + 13 test cases contributed by @danikdanik (PR #74). Ported from the generated plugins/ tree into canonical skills/ and hardened: - always_show findings now bypass triage's token floor AND measure.py's 5% message-frequency noise gate (a config check has no occurrence rate), so the nudge actually reaches users instead of being silently suppressed. - finding carries savings_tokens:0 so the display never KeyErrors; config findings render as "Config fix" instead of "~0 tokens". - registry dedups always_show findings to a single copy.
PreviousNext