@alexgreensh/token-optimizer 5.13.72 → 5.13.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,7 +13,7 @@
13
13
  "name": "token-optimizer",
14
14
  "source": "./",
15
15
  "description": "Audit, fix, and monitor Claude Code context window usage. Find the ghost tokens.",
16
- "version": "5.13.72",
16
+ "version": "5.13.73",
17
17
  "author": {
18
18
  "name": "Alex Greenshpun",
19
19
  "url": "https://linkedin.com/in/alexgreensh"
@@ -55,7 +55,7 @@
55
55
  "name": "token-optimizer-cowork",
56
56
  "source": "./cowork/token-optimizer",
57
57
  "description": "Token Optimizer for Claude Cowork \u2014 full skills + Cowork-native hooks (beta). Install THIS in Cowork; the standard token-optimizer entry is for desktop Claude Code.",
58
- "version": "5.13.72",
58
+ "version": "5.13.73",
59
59
  "author": {
60
60
  "name": "Alex Greenshpun",
61
61
  "url": "https://linkedin.com/in/alexgreensh"
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "homepage": "https://github.com/alexgreensh/token-optimizer",
9
9
  "repository": "https://github.com/alexgreensh/token-optimizer",
10
- "version": "5.13.72",
10
+ "version": "5.13.73",
11
11
  "license": "PolyForm-Noncommercial-1.0.0",
12
12
  "keywords": [
13
13
  "token",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alexgreensh/token-optimizer",
3
- "version": "5.13.72",
3
+ "version": "5.13.73",
4
4
  "description": "Token Optimizer for Claude Code cloud sessions: the real plugin, installed by your cloud environment's setup script.",
5
5
  "license": "PolyForm-Noncommercial-1.0.0",
6
6
  "author": "Alex Greenshpun (https://linkedin.com/in/alexgreensh)",
@@ -3094,6 +3094,18 @@ def _continuity_prompt_hint(prompt_text=None, session_id=None, cwd=None, max_age
3094
3094
  _effective_full_threshold = (
3095
3095
  max(0.6, _measure_facade._RELEVANCE_FULL_THRESHOLD) if _ext_memory else _measure_facade._RELEVANCE_FULL_THRESHOLD
3096
3096
  )
3097
+ # Once per session per (prior session, form): a hint already in context only
3098
+ # re-adds tokens on every later prompt until compaction (#339). Keyed on the
3099
+ # prior session id, not the rendered text or checkpoint path, because both
3100
+ # change from prompt to prompt. The form is in the key so an earlier teaser
3101
+ # never hides a later full block. The resume dedup tag means compaction and
3102
+ # /clear re-arm it. Fails open with no session id.
3103
+ _hint_form = "teaser" if score < _effective_full_threshold else "full"
3104
+ if not (_hint_form == "teaser" and _ext_memory):
3105
+ if _measure_facade._resume_block_already_injected(
3106
+ f"hint:{_hint_form}:{top['session_id']}", session_id
3107
+ ):
3108
+ return ""
3097
3109
  if score < _effective_full_threshold:
3098
3110
  if _ext_memory:
3099
3111
  return ""