@misterhuydo/cairn-mcp 1.32.0 → 1.33.0

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.
package/README.md CHANGED
@@ -374,41 +374,43 @@ is least reason to speak. Bytes survive now only as a fallback for when no usage
374
374
  record is reachable, and when that happens the line says so instead of dressing a
375
375
  file size up as a token count.
376
376
 
377
- **It only speaks at 90% of the window and above** — and the window is a setting, not
378
- a measurement. Nothing cairn can read carries it: no hook input has it, the
379
- transcript records usage but never a limit, and the model id is no help either
380
- because a `claude-opus-5[1m]` session writes the base `claude-opus-5` into both the
381
- transcript's `message.model` and `lastModelUsage` in `~/.claude.json`.
382
-
383
- Through v1.31.0 cairn guessed the *smallest* window that could hold what it had
384
- measured, which meant an unmeasured session was assumed to be 200k. That produced a
385
- guaranteed false-alarm band: on a 1M session, every reading between 180k and 196k
386
- looked like a nearly-full 200k one. It was measured live at 192,634 tokens, where
387
- cairn reported **96%** and `/context` said **19%**. The band is structural rather
388
- than a tuning error — any firing point for a 200k window is a point a 1M session
389
- also passes through — so no threshold can serve both, and the tie-break has to come
390
- from outside.
391
-
392
- Since v1.32.0 cairn never guesses downward. Unset, it assumes the widest window it
393
- knows about and stays quiet; the cost of that being wrong is one missed nudge on a
394
- genuinely full small window, against an interruption at a fifth of capacity that
395
- teaches you to ignore the line for good. Measurement still raises the floor — having
396
- *seen* 482k tokens proves the window is bigger than that — it simply can never lower
397
- it.
377
+ **There is no threshold, and since v1.33.0 there is deliberately no attempt at one.**
378
+ Cairn reports the measured count on every prompt and the *agent* decides whether to
379
+ stop, weighing what is left against how big the work you just asked for is going to be.
398
380
 
399
- If your window really is 200k, say so and both the threshold and the reported
400
- percentage become exact:
381
+ The reason is that a threshold needs a window, and the window is the one thing cairn
382
+ cannot see. No hook input carries it, the transcript records usage but never a limit,
383
+ and the model id is no help either: a `claude-opus-5[1m]` session writes the base
384
+ `claude-opus-5` into both the transcript's `message.model` and `lastModelUsage` in
385
+ `~/.claude.json`. Three versions tried anyway, each failing differently:
401
386
 
402
- ```bash
403
- export CAIRN_CONTEXT_WINDOW=200000
404
- ```
387
+ | | approach | how it failed |
388
+ |---|---|---|
389
+ | v1.20.0 | fixed 120k tokens | 60% of a 200k window but 12% of a 1M one, so it fired a tenth of the way into a 1M session |
390
+ | v1.31.0 | infer the smallest window that fits the measurement | sound as a lower bound only, so below 196k it assumed 200k — reported **96%** where `/context` said **19%** |
391
+ | v1.32.0 | never guess downward; `CAIRN_CONTEXT_WINDOW` states the truth | nothing could ever set it. `install-hooks` cannot know the window either, so there was no correct value to write — unwritable by construction, and the feature went silently dead |
392
+
393
+ v1.31.0's false-alarm band could never have been tuned away: any firing point for a
394
+ 200k window is a point a 1M session also passes through, so no number serves both.
395
+
396
+ The agent, though, *does* know its window — it is stated in its own system prompt —
397
+ and it is the only party that knows whether the next task is a one-line answer or a
398
+ refactor across thirty files. So cairn hands over what it actually measured and the
399
+ rules for acting on it, and never issues the verdict itself. It is the same division
400
+ of labour as the handoff: cairn demands the judgement and carries it, never computes
401
+ it.
402
+
403
+ That also removes the rate-limiting. The old block was a *verdict*, so repeating it
404
+ was nagging and it had to be shown once per situation; this is a *measurement*, and a
405
+ budget you are only shown once it is nearly spent cannot inform the decision to start
406
+ something. It rides every prompt.
405
407
 
406
- `CAIRN_CONTEXT_HINT_TOKENS` still overrides the trigger point outright if you want a
407
- different bar rather than a different window.
408
+ `CAIRN_CONTEXT_HINT_TOKENS` no longer gates anything, but if you set it, cairn tells
409
+ the agent when you have passed it rather than ignoring you.
408
410
 
409
411
  Deliberately not built: no full transcript walk (the tail only; a full walk in this
410
412
  hot path once froze every terminal in the cockpit for 4.3 seconds), no counting
411
- subagent spend as main-thread context, no repeating the prompt when nothing changed,
413
+ subagent spend as main-thread context, no cairn-side verdict about when to stop,
412
414
  and no auto-clearing, auto-compacting, or filling the field in on your behalf. Same
413
415
  shape as completed-phase detection: detect, surface, confirm with the user, never apply.
414
416