instar 1.3.354 → 1.3.355
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/dist/monitoring/QuotaExhaustionDetector.d.ts.map +1 -1
- package/dist/monitoring/QuotaExhaustionDetector.js +24 -2
- package/dist/monitoring/QuotaExhaustionDetector.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +2 -2
- package/upgrades/1.3.355.md +45 -0
- package/upgrades/side-effects/context-exhaustion-false-positive.md +62 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuotaExhaustionDetector.d.ts","sourceRoot":"","sources":["../../src/monitoring/QuotaExhaustionDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAqB,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAiElG;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,GAC7B,0BAA0B,CAkE5B;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"QuotaExhaustionDetector.d.ts","sourceRoot":"","sources":["../../src/monitoring/QuotaExhaustionDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAqB,0BAA0B,EAAE,MAAM,kBAAkB,CAAC;AAiElG;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI,GAC7B,0BAA0B,CAkE5B;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,GAAG,QAAQ,CAAA;CAAE,CAwCvI;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,IAAI,CAc/E"}
|
|
@@ -150,8 +150,30 @@ export function detectContextExhaustion(tmuxOutput) {
|
|
|
150
150
|
if (!match) {
|
|
151
151
|
return { matched: false, pattern: null, confidence: 'medium' };
|
|
152
152
|
}
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
// FALSE-POSITIVE GUARD (RUN-2 2026-06-06, topic 13435 flood). The bare phrase
|
|
154
|
+
// "conversation (is) too long" appears as ordinary CONTENT whenever a session
|
|
155
|
+
// discusses the conversation-too-long failure mode — an autonomous session
|
|
156
|
+
// working ON that feature, a quoted error, or the recovery NOTICE this very
|
|
157
|
+
// detector triggers ("Session hit \"conversation too long\" …"), which re-enters
|
|
158
|
+
// the pane and self-amplifies one false positive into a flood. A REAL Claude
|
|
159
|
+
// Code exhaustion error always renders WITH its CLI recovery framing — the
|
|
160
|
+
// "press esc twice …" hint or an "error during compaction" line (see the
|
|
161
|
+
// realistic fixture in the unit tests). Require that framing: the bare phrase,
|
|
162
|
+
// alone, is content, not a live CLI error.
|
|
163
|
+
const bareExhaustionPhrases = ['conversation too long', 'conversation is too long'];
|
|
164
|
+
// Both wordings of the CLI recovery hint ("esc"/"escape"), kept anchored on
|
|
165
|
+
// "twice" so it matches the real too-long prompt but not an unrelated
|
|
166
|
+
// "press escape to stop" working-indicator line.
|
|
167
|
+
const cliErrorFrames = ['press esc twice', 'press escape twice', 'error during compaction'];
|
|
168
|
+
const hasBarePhrase = bareExhaustionPhrases.some(s => output.includes(s));
|
|
169
|
+
const hasCliFrame = cliErrorFrames.some(s => output.includes(s));
|
|
170
|
+
if (hasBarePhrase && !hasCliFrame) {
|
|
171
|
+
// Phrase present only as content/narration — not the framed CLI error. (A
|
|
172
|
+
// non-phrase soft signal like "context limit" is unaffected: hasBarePhrase
|
|
173
|
+
// is false, so this guard does not apply and existing behavior is preserved.)
|
|
174
|
+
return { matched: false, pattern: null, confidence: 'medium' };
|
|
175
|
+
}
|
|
176
|
+
const isStrong = hasBarePhrase || output.includes('error during compaction');
|
|
155
177
|
return { matched: true, pattern: match, confidence: isStrong ? 'high' : 'medium' };
|
|
156
178
|
}
|
|
157
179
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"QuotaExhaustionDetector.js","sourceRoot":"","sources":["../../src/monitoring/QuotaExhaustionDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,oCAAoC;AACpC,MAAM,cAAc,GAAG;IACrB,kBAAkB;IAClB,YAAY;IACZ,KAAK;IACL,iBAAiB;IACjB,cAAc;IACd,mBAAmB;IACnB,oBAAoB;IACpB,UAAU;IACV,SAAS;IACT,qBAAqB;CACtB,CAAC;AAEF,MAAM,gBAAgB,GAAG;IACvB,kBAAkB;IAClB,gBAAgB;IAChB,eAAe;IACf,uBAAuB;IACvB,kBAAkB;IAClB,0BAA0B;IAC1B,uBAAuB;IACvB,mCAAmC;IACnC,yCAAyC;CAC1C,CAAC;AAEF,MAAM,oCAAoC,GAAG;IAC3C,wBAAwB;IACxB,+BAA+B;IAC/B,6BAA6B;IAC7B,oCAAoC;IACpC,kCAAkC;IAClC,qBAAqB;CACtB,CAAC;AAEF,MAAM,oCAAoC,GAAG;IAC3C,uBAAuB;IACvB,0BAA0B;IAC1B,yBAAyB;IACzB,yCAAyC;CAC1C,CAAC;AAEF,MAAM,cAAc,GAAG;IACrB,SAAS;IACT,SAAS;IACT,SAAS;IACT,aAAa;IACb,sBAAsB;IACtB,QAAQ;IACR,gBAAgB;IAChB,eAAe;IACf,WAAW;CACZ,CAAC;AAEF,M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,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;IACjE,CAAC;IACD,MAAM,MAAM,GAAG,UAAU,CAAC,WAAW,EAAE,CAAC;IACxC,IACE,aAAa,CAAC,MAAM,EAAE,oCAAoC,CAAC;WACxD,CAAC,aAAa,CAAC,MAAM,EAAE,oCAAoC,CAAC,EAC/D,CAAC;QACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;IACjE,CAAC;IACD,MAAM,KAAK,GAAG,aAAa,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;IACtD,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC;IACjE,CAAC;IACD,MAAM,
|
|
1
|
+
{"version":3,"file":"QuotaExhaustionDetector.js","sourceRoot":"","sources":["../../src/monitoring/QuotaExhaustionDetector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,oCAAoC;AACpC,MAAM,cAAc,GAAG;IACrB,kBAAkB;IAClB,YAAY;IACZ,KAAK;IACL,iBAAiB;IACjB,cAAc;IACd,mBAAmB;IACnB,oBAAoB;IACpB,UAAU;IACV,SAAS;IACT,qBAAqB;CACtB,CAAC;AAEF,MAAM,gBAAgB,GAAG;IACvB,kBAAkB;IAClB,gBAAgB;IAChB,eAAe;IACf,uBAAuB;IACvB,kBAAkB;IAClB,0BAA0B;IAC1B,uBAAuB;IACvB,mCAAmC;IACnC,yCAAyC;CAC1C,CAAC;AAEF,MAAM,oCAAoC,GAAG;IAC3C,wBAAwB;IACxB,+BAA+B;IAC/B,6BAA6B;IAC7B,oCAAoC;IACpC,kCAAkC;IAClC,qBAAqB;CACtB,CAAC;AAEF,MAAM,oCAAoC,GAAG;IAC3C,uBAAuB;I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Version": "1.3.
|
|
4
|
+
"generatedAt": "2026-06-06T08:02:23.000Z",
|
|
5
|
+
"instarVersion": "1.3.355",
|
|
6
6
|
"entryCount": 199,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Fixed a false-positive in context-exhaustion detection that could flood a topic with
|
|
9
|
+
duplicate "conversation too long" notices. The detector (`detectContextExhaustion`)
|
|
10
|
+
matched the bare phrase "conversation too long" anywhere in a session's terminal
|
|
11
|
+
output, with no check that it was an actual CLI error versus ordinary content. A
|
|
12
|
+
session that merely discussed the failure mode — or the recovery notice the detector
|
|
13
|
+
itself emits ("Session hit 'conversation too long'…") — re-tripped detection, and
|
|
14
|
+
because the notice text re-enters the pane, one false positive amplified into a flood
|
|
15
|
+
of duplicate notices and spurious respawns on a perfectly healthy session.
|
|
16
|
+
|
|
17
|
+
The detector now requires the real CLI error framing — the "Press esc twice…" hint or
|
|
18
|
+
an "error during compaction" line — for the bare phrase to count. The bare phrase
|
|
19
|
+
alone is treated as content. Real exhaustion errors always carry that framing, so
|
|
20
|
+
genuine recovery is unaffected; the self-amplifying flood and the content
|
|
21
|
+
false-positive are both eliminated.
|
|
22
|
+
|
|
23
|
+
## What to Tell Your User
|
|
24
|
+
|
|
25
|
+
If you ever saw a burst of repeated "conversation too long" messages while your
|
|
26
|
+
session was actually working fine, that was a false alarm — now fixed. Real
|
|
27
|
+
out-of-room recovery still works exactly as before. Nothing for you to do.
|
|
28
|
+
|
|
29
|
+
## Summary of New Capabilities
|
|
30
|
+
|
|
31
|
+
- Context-exhaustion detection no longer fires on the phrase appearing as content or
|
|
32
|
+
in its own recovery notice — it requires the real CLI error framing.
|
|
33
|
+
- Eliminates the self-amplifying "conversation too long" notice flood.
|
|
34
|
+
- No behavior change for genuine context-exhaustion recovery.
|
|
35
|
+
|
|
36
|
+
## Evidence
|
|
37
|
+
|
|
38
|
+
- Unit (`tests/unit/context-exhaustion-recovery.test.ts`): real framed error detected;
|
|
39
|
+
bare phrase rejected; recovery-notice text rejected; agent narration rejected; a
|
|
40
|
+
mixed pane (narration + real framed error) still detected. 31 passing.
|
|
41
|
+
- Unit (`tests/unit/presence-proxy-context-exhaustion.test.ts`): standby detection on
|
|
42
|
+
realistic framed snapshots; non-error content not detected. 14 passing.
|
|
43
|
+
- SessionRecovery recovery-behavior tests updated to realistic framed fixtures and
|
|
44
|
+
still green (recovery still triggers on real exhaustion).
|
|
45
|
+
- Full typecheck clean.
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Side-effects review — context-exhaustion false-positive fix
|
|
2
|
+
|
|
3
|
+
**Change:** `detectContextExhaustion` (QuotaExhaustionDetector) now requires the
|
|
4
|
+
real CLI error framing ("press esc twice" or "error during compaction") for the
|
|
5
|
+
bare "conversation (is) too long" phrase. The bare phrase as content no longer
|
|
6
|
+
matches.
|
|
7
|
+
|
|
8
|
+
**Signal vs authority (Phase 1):** This IS a decision point — the detector's verdict
|
|
9
|
+
gates a destructive action (SessionMonitor kills + respawns the session and notifies
|
|
10
|
+
the user). It is a SIGNAL feeding the SessionMonitor authority; this change makes the
|
|
11
|
+
signal correct, it does not add or move authority. The fix narrows a brittle
|
|
12
|
+
substring match that was producing false positives with blocking-equivalent
|
|
13
|
+
consequences (forced respawns + user notices) — exactly the "brittle check with
|
|
14
|
+
real-world authority" failure `docs/signal-vs-authority.md` warns about.
|
|
15
|
+
|
|
16
|
+
1. **Over-block (false positive — the bug):** FIXED. Before, the bare phrase as
|
|
17
|
+
content (a session discussing the failure mode, a quoted error, or the recovery
|
|
18
|
+
notice itself) was flagged as live exhaustion → spurious respawn + user notice,
|
|
19
|
+
self-amplifying into a flood (RUN-2 2026-06-06, topic 13435, ~27 notices on a
|
|
20
|
+
healthy session). Now the bare phrase without CLI framing is not matched.
|
|
21
|
+
|
|
22
|
+
2. **Under-block (could a REAL error now be missed?):** No real loss. Every
|
|
23
|
+
realistic exhaustion fixture in the unit tests carries the CLI framing ("press
|
|
24
|
+
esc twice" and/or "error during compaction") — that is how Claude Code actually
|
|
25
|
+
renders the error. The guard only removes matches that lack any framing, which
|
|
26
|
+
are content, not live errors. Residual: if a future Claude Code version renders
|
|
27
|
+
the error WITHOUT the esc hint or compaction line, it would be missed — the frame
|
|
28
|
+
list is a one-line extension and is documented as the tuning point.
|
|
29
|
+
|
|
30
|
+
3. **Level-of-abstraction fit:** Correct layer. The fix is in the detector (the pure
|
|
31
|
+
function that decides), not in SessionMonitor (the actor). One change fixes every
|
|
32
|
+
consumer (SessionMonitor, PresenceProxy standby). The soft, non-phrase patterns
|
|
33
|
+
(context limit, token limit) are deliberately left unchanged — they are not the
|
|
34
|
+
observed bug and gating them risks under-detection; scoped to the live bug, not
|
|
35
|
+
a hypothetical.
|
|
36
|
+
|
|
37
|
+
4. **Signal vs authority compliance:** Compliant. Detector stays a signal; the fix
|
|
38
|
+
reduces its false-positive rate without changing where authority lives.
|
|
39
|
+
|
|
40
|
+
5. **Interactions:** The same `detectContextExhaustion` feeds SessionMonitor's
|
|
41
|
+
proactive check and PresenceProxy. Both now benefit. The self-amplification path
|
|
42
|
+
(recovery notice → pane → re-detect) is closed because the notice lacks CLI
|
|
43
|
+
framing. classifySessionDeath (the POST-death classifier) shares the bare-phrase
|
|
44
|
+
pattern but runs on a dead session's final output where the flood/respawn harm
|
|
45
|
+
does not apply; left as-is to keep this fix scoped to the live false-positive
|
|
46
|
+
(noted as a known sibling, not a deferral of THIS bug).
|
|
47
|
+
|
|
48
|
+
6. **External surfaces:** Reduces user-facing noise (fewer false "conversation too
|
|
49
|
+
long" notices). No API/schema change. Behavior depends on tmux pane content,
|
|
50
|
+
which is what it already read; no new timing/runtime dependence.
|
|
51
|
+
|
|
52
|
+
7. **Rollback cost:** Trivial — revert the commit. Pure-function change, no data
|
|
53
|
+
migration, no state. Worst case on revert is the original false-positive returns.
|
|
54
|
+
|
|
55
|
+
**Tier:** 1 (a guard added to one pure function + realistic test fixtures; no route,
|
|
56
|
+
no migration, no persistent state). No CLAUDE.md template change: this is an internal
|
|
57
|
+
detector hardening, not a new agent-invocable capability.
|
|
58
|
+
|
|
59
|
+
**No deferrals:** the fix is complete — detector guard + both-sides unit coverage
|
|
60
|
+
(real-error-detected, bare-phrase-rejected, recovery-notice-rejected, narration-
|
|
61
|
+
rejected, mixed-pane-still-detected) + updated realistic fixtures. classifySessionDeath
|
|
62
|
+
is a distinct surface (post-death), not a withheld part of this fix.
|