instar 1.3.345 → 1.3.347
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/commands/server.d.ts.map +1 -1
- package/dist/commands/server.js +8 -1
- package/dist/commands/server.js.map +1 -1
- package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
- package/dist/core/PostUpdateMigrator.js +21 -0
- package/dist/core/PostUpdateMigrator.js.map +1 -1
- package/dist/monitoring/PresenceProxy.d.ts +8 -0
- package/dist/monitoring/PresenceProxy.d.ts.map +1 -1
- package/dist/monitoring/PresenceProxy.js +28 -9
- package/dist/monitoring/PresenceProxy.js.map +1 -1
- package/dist/monitoring/RateLimitSentinel.d.ts +5 -2
- package/dist/monitoring/RateLimitSentinel.d.ts.map +1 -1
- package/dist/monitoring/RateLimitSentinel.js.map +1 -1
- package/dist/monitoring/StuckSignatureClassifier.d.ts +52 -0
- package/dist/monitoring/StuckSignatureClassifier.d.ts.map +1 -0
- package/dist/monitoring/StuckSignatureClassifier.js +133 -0
- package/dist/monitoring/StuckSignatureClassifier.js.map +1 -0
- package/dist/monitoring/sentinelWiring.d.ts +13 -4
- package/dist/monitoring/sentinelWiring.d.ts.map +1 -1
- package/dist/monitoring/sentinelWiring.js +10 -8
- package/dist/monitoring/sentinelWiring.js.map +1 -1
- package/package.json +1 -1
- package/src/data/builtin-manifest.json +19 -19
- package/upgrades/1.3.347.md +76 -0
- package/upgrades/honest-turn-receipts.eli16.md +47 -0
- package/upgrades/rate-limit-resume-nudge-internal-channel.eli16.md +35 -0
- package/upgrades/side-effects/honest-turn-receipts.md +90 -0
- package/upgrades/side-effects/rate-limit-resume-nudge-internal-channel.md +102 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StuckSignatureClassifier — honest turn-receipts.
|
|
3
|
+
*
|
|
4
|
+
* The problem (2026-06-05, three incidents in two days, same symptom): a
|
|
5
|
+
* session is ALIVE and still emitting output, but every turn fails — it is
|
|
6
|
+
* rate-limited, policy-wedged, context-wedged, or out of context. Because the
|
|
7
|
+
* process is alive, PresenceProxy's tier-3 assessment sees "active child
|
|
8
|
+
* processes" and reports "🔭 actively working" — a lie. The user stares at
|
|
9
|
+
* delivery receipts while the session is dead, and finds out by screenshot.
|
|
10
|
+
*
|
|
11
|
+
* This classifier answers the honest question: "is this live session actually
|
|
12
|
+
* able to reply, or is it failing every turn for a known reason?" When it
|
|
13
|
+
* matches, PresenceProxy surfaces the REAL reason instead of "working."
|
|
14
|
+
*
|
|
15
|
+
* Two design rules carried from the ContextWedgeSentinel work:
|
|
16
|
+
*
|
|
17
|
+
* 1. TAIL-GATED. The signature must be in the LIVE TAIL of the capture, not
|
|
18
|
+
* merely somewhere in scrollback. A session that hit "conversation too
|
|
19
|
+
* long" an hour ago, recovered, and kept working has that phrase scrolled
|
|
20
|
+
* far up — matching it anywhere is exactly the false-positive noise the
|
|
21
|
+
* user flagged ("these messages come up often but the conversation
|
|
22
|
+
* continues fine"). The live tail is the discriminator between a real
|
|
23
|
+
* current block and a stale mention.
|
|
24
|
+
*
|
|
25
|
+
* 2. SIGNAL-ONLY. This returns a classification + an honest user-facing
|
|
26
|
+
* message. It never kills, blocks, or recovers — the caller decides what
|
|
27
|
+
* to do with the honest answer. Recovery stays with the sentinels.
|
|
28
|
+
*
|
|
29
|
+
* Reuses the wedge detectors (classifyWedgeTail) shipped for the AUP-rejection
|
|
30
|
+
* incident, and adds tail-gated rate-limit + context-too-long detection.
|
|
31
|
+
*/
|
|
32
|
+
import { classifyWedgeTail } from './ContextWedgeSentinel.js';
|
|
33
|
+
/** Rate-limit / usage-limit pane signatures (the Claude usage-limit form the
|
|
34
|
+
* RateLimitSentinel does NOT auto-handle — it only owns the capacity throttle).
|
|
35
|
+
* Anchored on the STATIVE/blocking forms Claude Code prints when it actually
|
|
36
|
+
* blocks a turn ("You've hit your session limit · resets 10:30pm"), NOT prose
|
|
37
|
+
* that merely mentions limits ("when you hit your usage limit, the session
|
|
38
|
+
* pauses") — the same prose-vs-block discriminator the wedge detector uses. */
|
|
39
|
+
const RATE_LIMIT_TAIL_PATTERNS = [
|
|
40
|
+
/you'?ve (?:hit|reached) your (?:session|usage|5-hour) limit/i,
|
|
41
|
+
/usage limit reached/i,
|
|
42
|
+
/(?:session|usage|5-hour) limit reached/i,
|
|
43
|
+
/\blimit\b[^.\n]{0,30}\bresets?\b/i, // "limit · resets 10:30pm" co-occurrence
|
|
44
|
+
];
|
|
45
|
+
/** Context-exhaustion pane signatures — the genuine "conversation too long"
|
|
46
|
+
* block (NOT the normal compaction lifecycle, which recovers on its own). */
|
|
47
|
+
const CONTEXT_TOO_LONG_TAIL_PATTERNS = [
|
|
48
|
+
/conversation (?:is )?too long/i,
|
|
49
|
+
/error during compaction[^.\n]{0,40}too long/i,
|
|
50
|
+
/press esc twice to go up a few messages/i,
|
|
51
|
+
];
|
|
52
|
+
/** Normal compaction lifecycle phrases — when these are the tail (and no
|
|
53
|
+
* explicit too-long error is), the session is mid-recovery, not stuck. */
|
|
54
|
+
const NORMAL_COMPACTION_TAIL_PATTERNS = [
|
|
55
|
+
/conversation compacted/i,
|
|
56
|
+
/paused for context compaction/i,
|
|
57
|
+
/compaction[^.\n]{0,20}resumed/i,
|
|
58
|
+
/compaction recovery/i,
|
|
59
|
+
];
|
|
60
|
+
/** The last `tailLines` non-empty, trimmed lines of a capture, joined. */
|
|
61
|
+
function liveTail(text, tailLines) {
|
|
62
|
+
const lines = text.split('\n').map(l => l.trim()).filter(Boolean);
|
|
63
|
+
return lines.slice(-tailLines).join('\n');
|
|
64
|
+
}
|
|
65
|
+
function anyMatch(text, patterns) {
|
|
66
|
+
for (const p of patterns)
|
|
67
|
+
if (p.test(text))
|
|
68
|
+
return p;
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
/** Extract a human reset hint ("resets 10:30pm", "resets in 5m") if present. */
|
|
72
|
+
export function extractResetHint(text) {
|
|
73
|
+
const m = /resets?\s+(?:at\s+)?(\d{1,2}(?::\d{2})?\s*(?:am|pm))/i.exec(text) ??
|
|
74
|
+
/resets?\s+(?:in\s+)?(\d+\s*(?:minutes?|mins?|hours?|hrs?|m|h))\b/i.exec(text);
|
|
75
|
+
return m ? m[1].trim() : undefined;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Classify a LIVE session from its tmux capture. Returns the honest stuck
|
|
79
|
+
* reason when the live tail shows a known "alive but failing every turn"
|
|
80
|
+
* signature, else null (the session is genuinely working/idle/normal).
|
|
81
|
+
*
|
|
82
|
+
* Precedence reflects recoverability: a wedge (needs a fresh session) and a
|
|
83
|
+
* usage limit (clears on its own) are both more specific/actionable than a
|
|
84
|
+
* generic context-too-long, so they win when co-present in the tail.
|
|
85
|
+
*/
|
|
86
|
+
export function classifyStuckSignature(capture, tailLines = 12) {
|
|
87
|
+
if (!capture || !capture.trim())
|
|
88
|
+
return null;
|
|
89
|
+
const tail = liveTail(capture, tailLines);
|
|
90
|
+
// Wedges first — most specific, and they reuse the already-tail-gated +
|
|
91
|
+
// (for AUP) repetition-gated detector. classifyWedgeTail does its own tail
|
|
92
|
+
// slicing over the full capture, so pass the whole thing.
|
|
93
|
+
const wedge = classifyWedgeTail(capture);
|
|
94
|
+
if (wedge === 'aup-rejection') {
|
|
95
|
+
return {
|
|
96
|
+
kind: 'policy-wedge',
|
|
97
|
+
message: "My session on this thread got stuck on a content-policy error and can't reply here. " +
|
|
98
|
+
"I'm starting a fresh session — please resend your last message.",
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
if (wedge === 'thinking-block-400') {
|
|
102
|
+
return {
|
|
103
|
+
kind: 'context-wedge',
|
|
104
|
+
message: "My session on this thread hit a stuck-context error and can't continue. " +
|
|
105
|
+
"A fresh session is starting — please resend your last message.",
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
// Rate / usage limit — tail-gated. Clears on its own, so the message is
|
|
109
|
+
// reassuring rather than action-demanding.
|
|
110
|
+
if (anyMatch(tail, RATE_LIMIT_TAIL_PATTERNS)) {
|
|
111
|
+
const hint = extractResetHint(tail);
|
|
112
|
+
return {
|
|
113
|
+
kind: 'rate-limited',
|
|
114
|
+
message: "I've hit the usage limit, so I can't reply on this thread right now" +
|
|
115
|
+
(hint ? ` (resets ${hint})` : '') +
|
|
116
|
+
'. I\'ll pick back up automatically once it clears — your messages are not lost.',
|
|
117
|
+
detail: hint ? `resets ${hint}` : undefined,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
// Context too long — tail-gated, and suppressed when the tail is the NORMAL
|
|
121
|
+
// compaction lifecycle (which recovers itself). This is the fix for the
|
|
122
|
+
// "conversation too long messages come up often but are just noise" report:
|
|
123
|
+
// a stale mention up in scrollback no longer fires.
|
|
124
|
+
if (anyMatch(tail, CONTEXT_TOO_LONG_TAIL_PATTERNS) && !anyMatch(tail, NORMAL_COMPACTION_TAIL_PATTERNS)) {
|
|
125
|
+
return {
|
|
126
|
+
kind: 'context-too-long',
|
|
127
|
+
message: "This conversation got too long for one session. I'm starting a fresh session with your recent history — " +
|
|
128
|
+
"please resend your last message if I don't pick it up.",
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
return null;
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=StuckSignatureClassifier.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StuckSignatureClassifier.js","sourceRoot":"","sources":["../../src/monitoring/StuckSignatureClassifier.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAgB9D;;;;;gFAKgF;AAChF,MAAM,wBAAwB,GAAsB;IAClD,8DAA8D;IAC9D,sBAAsB;IACtB,yCAAyC;IACzC,mCAAmC,EAAI,yCAAyC;CACjF,CAAC;AAEF;8EAC8E;AAC9E,MAAM,8BAA8B,GAAsB;IACxD,gCAAgC;IAChC,8CAA8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1D,MAAM,KAAK,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACzC,IAAI,KAAK,KAAK,eAAe,EAAE,CAAC;QAC9B,OAAO;YACL,IAAI,EAAE,cAAc;YACpB,OAAO,EACL,sFAAsF;gBACtF,iEAAiE;SACpE,CAAC;IACJ,CAAC;IACD,IAAI,KAAK,KAAK,oBAAoB,EAAE,CAAC;QACnC,OAAO;YACL,IAAI,EAAE,eAAe;YACrB,OAAO,EACL,0EAA0E;gBAC1E,gEAAgE;SACnE,CAAC;IACJ,CAAC;IAED,wEAAwE;IACxE,2CAA2C;IAC3C,IAAI,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC,EAAE,CAAC;QAC7C,MAAM,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC;QACpC,OAAO;YACL,IAAI,EAAE,cAAc;YACpB,OAAO,EACL,qEAAqE;gBACrE,CAAC,IAAI,CAAC,CAAC,CAAC,YAAY,IAAI,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;gBACjC,iFAAiF;YACnF,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,CAAC,SAAS;SAC5C,CAAC;IACJ,CAAC;IAED,4EAA4E;IAC5E,wEAAwE;IACxE,4EAA4E;IAC5E,oDAAoD;IACpD,IAAI,QAAQ,CAAC,IAAI,EAAE,8BAA8B,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,+BAA+B,CAAC,EAAE,CAAC;QACvG,OAAO;YACL,IAAI,EAAE,kBAAkB;YACxB,OAAO,EACL,0GAA0G;gBAC1G,wDAAwD;SAC3D,CAAC;IACJ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -134,9 +134,17 @@ export type RecoveryReachKind = 'recovery-reached' | 'recovery-unreachable';
|
|
|
134
134
|
export declare const RATE_LIMIT_RESUME_NUDGE = "The temporary server throttle should have cleared \u2014 please continue where you left off.";
|
|
135
135
|
export interface RateLimitRecoverySurface {
|
|
136
136
|
isSessionAlive(sessionName: string): boolean;
|
|
137
|
-
/**
|
|
138
|
-
|
|
139
|
-
|
|
137
|
+
/**
|
|
138
|
+
* Trusted internal nudge that bypasses the topic-prefix requirement.
|
|
139
|
+
*
|
|
140
|
+
* This is the ONLY channel the resume nudge is allowed to use. The resume
|
|
141
|
+
* nudge is infrastructure poking the session to continue — it is NOT a user
|
|
142
|
+
* message, so it must never carry a `[telegram:N]` prefix. A telegram-prefixed
|
|
143
|
+
* nudge is byte-indistinguishable from a real message from the user, which
|
|
144
|
+
* makes the agent answer it ("no throttle on my end") and relay that denial
|
|
145
|
+
* back to the topic, contradicting the sentinel's own throttle notices.
|
|
146
|
+
* (Incoherence incident 2026-06-05.)
|
|
147
|
+
*/
|
|
140
148
|
injectInternalNudge(sessionName: string, text: string): boolean;
|
|
141
149
|
getTopicForSession(sessionName: string): number | null | undefined;
|
|
142
150
|
/** The always-available system topic; null during initial setup. */
|
|
@@ -149,7 +157,8 @@ export interface RateLimitRecoverySurface {
|
|
|
149
157
|
/**
|
|
150
158
|
* Build the resume/notify functions for RateLimitSentinel. Both paths ALWAYS
|
|
151
159
|
* record an audit event and never silently return:
|
|
152
|
-
* - resumeFn:
|
|
160
|
+
* - resumeFn: ALWAYS internal inject (no `[telegram:N]` user-message prefix),
|
|
161
|
+
* topic-bound or not — the resume nudge is infrastructure, never a user turn.
|
|
153
162
|
* - notifyFn: session topic → lifeline topic → recovery-unreachable audit.
|
|
154
163
|
*/
|
|
155
164
|
export declare function buildRateLimitRecoveryDeps(s: RateLimitRecoverySurface): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentinelWiring.d.ts","sourceRoot":"","sources":["../../src/monitoring/sentinelWiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,+BAA+B,CAAC;AAClF,OAAO,KAAK,EACV,6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B,CACjC,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,GACjD,MAAM,CAsBR"}
|
|
@@ -210,7 +210,8 @@ export const RATE_LIMIT_RESUME_NUDGE = 'The temporary server throttle should hav
|
|
|
210
210
|
/**
|
|
211
211
|
* Build the resume/notify functions for RateLimitSentinel. Both paths ALWAYS
|
|
212
212
|
* record an audit event and never silently return:
|
|
213
|
-
* - resumeFn:
|
|
213
|
+
* - resumeFn: ALWAYS internal inject (no `[telegram:N]` user-message prefix),
|
|
214
|
+
* topic-bound or not — the resume nudge is infrastructure, never a user turn.
|
|
214
215
|
* - notifyFn: session topic → lifeline topic → recovery-unreachable audit.
|
|
215
216
|
*/
|
|
216
217
|
export function buildRateLimitRecoveryDeps(s) {
|
|
@@ -218,16 +219,17 @@ export function buildRateLimitRecoveryDeps(s) {
|
|
|
218
219
|
resumeFn: async (sessionName) => {
|
|
219
220
|
if (!s.isSessionAlive(sessionName))
|
|
220
221
|
return false;
|
|
222
|
+
// The resume nudge ALWAYS goes through the internal recovery channel —
|
|
223
|
+
// topic-bound or not. It un-sticks the session identically to the
|
|
224
|
+
// user-message path (both converge on the same low-level inject) but
|
|
225
|
+
// carries no `[telegram:N]` prefix, so the agent can never mistake it for
|
|
226
|
+
// a message from the user and relay a contradictory "no throttle" reply.
|
|
227
|
+
// The topic (when present) is recorded for the audit trail only.
|
|
228
|
+
// (Incoherence incident 2026-06-05 — see throttle-notice-coherence spec.)
|
|
221
229
|
const topicId = s.getTopicForSession(sessionName);
|
|
222
|
-
if (topicId != null) {
|
|
223
|
-
const ok = s.injectTopicNudge(sessionName, topicId, RATE_LIMIT_RESUME_NUDGE);
|
|
224
|
-
s.recordRecovery(ok ? 'recovery-reached' : 'recovery-unreachable', sessionName, ok ? 'resume nudge injected via topic' : 'topic injectMessage returned false', ['topic']);
|
|
225
|
-
return ok;
|
|
226
|
-
}
|
|
227
|
-
// Non-topic-bound (e.g. interactive dev window): internal injection path.
|
|
228
230
|
const ok = s.injectInternalNudge(sessionName, RATE_LIMIT_RESUME_NUDGE);
|
|
229
231
|
s.recordRecovery(ok ? 'recovery-reached' : 'recovery-unreachable', sessionName, ok
|
|
230
|
-
?
|
|
232
|
+
? `resume nudge injected via internal recovery channel${topicId != null ? ` (topic ${topicId})` : ''}`
|
|
231
233
|
: 'internal injection returned false', ['internal-injection']);
|
|
232
234
|
return ok;
|
|
233
235
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sentinelWiring.js","sourceRoot":"","sources":["../../src/monitoring/sentinelWiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAWH,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AA4BlE,MAAM,UAAU,mBAAmB,CAAC,IAInC;IACC,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,IAAI,KAAK,CAAC;IACxC,OAAO,KAAK,EAAE,IAAI,EAAE,EAAE;QACpB,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,oBAAoB,IAAI,CAAC,IAAI,YAAY,EAAE;gBACpE,MAAM,EAAE,MAAM;gBACd,OAAO,EAAE;oBACP,cAAc,EAAE,kBAAkB;oBAClC,aAAa,EAAE,UAAU,IAAI,CAAC,SAAS,EAAE;iBAC1C;gBACD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,CAAC;aAC7E,CAAC,CAAC;YACH,OAAO,IAAI,CAAC,MAAM,KAAK,GAAG,CAAC;QAC7B,CAAC;QAAC,MAAM,CAAC;YACP,wEAAwE;YACxE,0EAA0E;YAC1E,mEAAmE;YACnE,OAAO,KAAK,CAAC;QACf,CAAC;IACH,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,oBAAoB,GAAG,EAAE,CAAC;AACh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AC,iBAAiB,EAAE,GAAG,CAAC,CAAC,kCAAkC;SAClE,OAAO,CAAC,iCAAiC,EAAE,EAAE,CAAC,CAAC,gBAAgB;SAC/D,OAAO,CAAC,sBAAsB,EAAE,EAAE,CAAC,CACvC;SACA,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED,SAAS,SAAS,CAAC,CAAS;IAC1B,IAAI,CAAC,GAAG,UAAU,CAAC;IACnB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;QACrB,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC;IAC/B,CAAC;IACD,OAAO,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AAChC,CAAC;AAED,SAAS,QAAQ,CAAC,WAAmB;IACnC,OAAO,WAAW;SACf,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC;SAC5B,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC;SACvB,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AAC/B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "./builtin-manifest.schema.json",
|
|
3
3
|
"schemaVersion": 1,
|
|
4
|
-
"generatedAt": "2026-06-06T05:
|
|
5
|
-
"instarVersion": "1.3.
|
|
4
|
+
"generatedAt": "2026-06-06T05:48:21.704Z",
|
|
5
|
+
"instarVersion": "1.3.347",
|
|
6
6
|
"entryCount": 199,
|
|
7
7
|
"entries": {
|
|
8
8
|
"hook:session-start": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"domain": "identity",
|
|
12
12
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
13
13
|
"installedPath": ".instar/hooks/instar/session-start.sh",
|
|
14
|
-
"contentHash": "
|
|
14
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
15
15
|
"since": "2025-01-01"
|
|
16
16
|
},
|
|
17
17
|
"hook:dangerous-command-guard": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"domain": "safety",
|
|
21
21
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
22
22
|
"installedPath": ".instar/hooks/instar/dangerous-command-guard.sh",
|
|
23
|
-
"contentHash": "
|
|
23
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
24
24
|
"since": "2025-01-01"
|
|
25
25
|
},
|
|
26
26
|
"hook:grounding-before-messaging": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"domain": "safety",
|
|
30
30
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
31
31
|
"installedPath": ".instar/hooks/instar/grounding-before-messaging.sh",
|
|
32
|
-
"contentHash": "
|
|
32
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
33
33
|
"since": "2025-01-01"
|
|
34
34
|
},
|
|
35
35
|
"hook:compaction-recovery": {
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"domain": "identity",
|
|
39
39
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
40
40
|
"installedPath": ".instar/hooks/instar/compaction-recovery.sh",
|
|
41
|
-
"contentHash": "
|
|
41
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
42
42
|
"since": "2025-01-01"
|
|
43
43
|
},
|
|
44
44
|
"hook:external-operation-gate": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"domain": "safety",
|
|
48
48
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
49
49
|
"installedPath": ".instar/hooks/instar/external-operation-gate.js",
|
|
50
|
-
"contentHash": "
|
|
50
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
51
51
|
"since": "2025-01-01"
|
|
52
52
|
},
|
|
53
53
|
"hook:deferral-detector": {
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"domain": "safety",
|
|
57
57
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
58
58
|
"installedPath": ".instar/hooks/instar/deferral-detector.js",
|
|
59
|
-
"contentHash": "
|
|
59
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
60
60
|
"since": "2025-01-01"
|
|
61
61
|
},
|
|
62
62
|
"hook:self-stop-guard": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"domain": "coherence",
|
|
66
66
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
67
67
|
"installedPath": ".instar/hooks/instar/self-stop-guard.js",
|
|
68
|
-
"contentHash": "
|
|
68
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
69
69
|
"since": "2025-01-01"
|
|
70
70
|
},
|
|
71
71
|
"hook:post-action-reflection": {
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"domain": "evolution",
|
|
75
75
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
76
76
|
"installedPath": ".instar/hooks/instar/post-action-reflection.js",
|
|
77
|
-
"contentHash": "
|
|
77
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
78
78
|
"since": "2025-01-01"
|
|
79
79
|
},
|
|
80
80
|
"hook:external-communication-guard": {
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"domain": "safety",
|
|
84
84
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
85
85
|
"installedPath": ".instar/hooks/instar/external-communication-guard.js",
|
|
86
|
-
"contentHash": "
|
|
86
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
87
87
|
"since": "2025-01-01"
|
|
88
88
|
},
|
|
89
89
|
"hook:scope-coherence-collector": {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"domain": "coherence",
|
|
93
93
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
94
94
|
"installedPath": ".instar/hooks/instar/scope-coherence-collector.js",
|
|
95
|
-
"contentHash": "
|
|
95
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
96
96
|
"since": "2025-01-01"
|
|
97
97
|
},
|
|
98
98
|
"hook:scope-coherence-checkpoint": {
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"domain": "coherence",
|
|
102
102
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
103
103
|
"installedPath": ".instar/hooks/instar/scope-coherence-checkpoint.js",
|
|
104
|
-
"contentHash": "
|
|
104
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
105
105
|
"since": "2025-01-01"
|
|
106
106
|
},
|
|
107
107
|
"hook:free-text-guard": {
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
"domain": "safety",
|
|
111
111
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
112
112
|
"installedPath": ".instar/hooks/instar/free-text-guard.sh",
|
|
113
|
-
"contentHash": "
|
|
113
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
114
114
|
"since": "2025-01-01"
|
|
115
115
|
},
|
|
116
116
|
"hook:claim-intercept": {
|
|
@@ -119,7 +119,7 @@
|
|
|
119
119
|
"domain": "coherence",
|
|
120
120
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
121
121
|
"installedPath": ".instar/hooks/instar/claim-intercept.js",
|
|
122
|
-
"contentHash": "
|
|
122
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
123
123
|
"since": "2025-01-01"
|
|
124
124
|
},
|
|
125
125
|
"hook:claim-intercept-response": {
|
|
@@ -128,7 +128,7 @@
|
|
|
128
128
|
"domain": "coherence",
|
|
129
129
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
130
130
|
"installedPath": ".instar/hooks/instar/claim-intercept-response.js",
|
|
131
|
-
"contentHash": "
|
|
131
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
132
132
|
"since": "2025-01-01"
|
|
133
133
|
},
|
|
134
134
|
"hook:stop-gate-router": {
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"domain": "safety",
|
|
138
138
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
139
139
|
"installedPath": ".instar/hooks/instar/stop-gate-router.js",
|
|
140
|
-
"contentHash": "
|
|
140
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
141
141
|
"since": "2025-01-01"
|
|
142
142
|
},
|
|
143
143
|
"hook:auto-approve-permissions": {
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
"domain": "safety",
|
|
147
147
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
148
148
|
"installedPath": ".instar/hooks/instar/auto-approve-permissions.js",
|
|
149
|
-
"contentHash": "
|
|
149
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
150
150
|
"since": "2025-01-01"
|
|
151
151
|
},
|
|
152
152
|
"job:health-check": {
|
|
@@ -1538,7 +1538,7 @@
|
|
|
1538
1538
|
"type": "subsystem",
|
|
1539
1539
|
"domain": "updates",
|
|
1540
1540
|
"sourcePath": "src/core/PostUpdateMigrator.ts",
|
|
1541
|
-
"contentHash": "
|
|
1541
|
+
"contentHash": "2562b5b7c37deb568e00eefebc9acc07571a5e5ccc251f6e424e7e63039ee297",
|
|
1542
1542
|
"since": "2025-01-01"
|
|
1543
1543
|
},
|
|
1544
1544
|
"subsystem:scheduler": {
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# Upgrade Guide — vNEXT
|
|
2
|
+
|
|
3
|
+
<!-- assembled-by: assemble-next-md -->
|
|
4
|
+
<!-- bump: patch -->
|
|
5
|
+
|
|
6
|
+
## What Changed
|
|
7
|
+
|
|
8
|
+
Honest turn-receipts — the standby (🔭) system now tells the truth about WHY a
|
|
9
|
+
turn failed instead of saying "actively working" while a session is dead.
|
|
10
|
+
|
|
11
|
+
Three incidents in two days had one symptom: a delivered message that never got
|
|
12
|
+
a reply, while the standby showed "🔭 actively working." Root: the tier-3
|
|
13
|
+
assessment classified a session "working" whenever it had a live child process
|
|
14
|
+
— but a rate-limited, policy-wedged, or context-exhausted session HAS a live
|
|
15
|
+
process (the model CLI is alive, just failing every turn). The live process
|
|
16
|
+
forced the lie. Separately, the "conversation too long" standby fired on that
|
|
17
|
+
phrase anywhere in the buffer, so a stale scrolled-past mention surfaced as
|
|
18
|
+
noise on healthy sessions.
|
|
19
|
+
|
|
20
|
+
New `StuckSignatureClassifier` (pure, tail-gated, signal-only) classifies a
|
|
21
|
+
live-but-failing session from its LIVE tmux tail — rate-limited / policy-wedge /
|
|
22
|
+
context-wedge / context-too-long — and PresenceProxy surfaces the real reason
|
|
23
|
+
instead of "working". Tail-gating (the signature must be the live tail, not a
|
|
24
|
+
scrollback mention) is the same discriminator that kills the "conversation too
|
|
25
|
+
long" noise. The classifier defers to any recovery sentinel that already owns a
|
|
26
|
+
session's recovery, so the user always hears one voice. Recovery itself is
|
|
27
|
+
unchanged — this only makes the messaging honest.
|
|
28
|
+
|
|
29
|
+
Fixes a coherence bug in rate-limit recovery where the agent appeared to **argue with itself** during an Anthropic throttle.
|
|
30
|
+
|
|
31
|
+
When the RateLimitSentinel detected a throttle it did two things: posted a user-facing "heads up — throttled, backing off" notice (intended), and — after backing off — poked the session with a "the throttle should have cleared, please continue" resume nudge to un-stick it. The bug was in the second part: that internal nudge was injected wearing a `[telegram:N]` prefix, the **exact** wire format of a real inbound user message. The agent could not distinguish its own recovery infrastructure from a message from the user, so it answered the nudge conversationally ("no throttle on my end, still rolling") and — because every `[telegram:N]` message triggers the mandatory "relay your reply to the user" rule — posted that denial into the topic, landing between the sentinel's own "still throttled" notices. To the user it read as the agent contradicting itself, and during a fleet-wide throttle (many sessions limited at once) it happened across several topics simultaneously.
|
|
32
|
+
|
|
33
|
+
The fix routes the resume nudge through the **internal recovery channel** instead of the user-message path. It un-sticks the session identically (both paths converge on the same low-level injection) but carries no `[telegram:N]` prefix, so the agent never mistakes it for the user and never relays a contradictory reply. The dead user-message injection path for the resume nudge was removed entirely so the bug cannot reappear. The "throttled / back online" notices are unchanged.
|
|
34
|
+
|
|
35
|
+
This change also ratifies a new constitutional standard — **Truthful Provenance — Speak Only as Yourself** (`docs/STANDARDS-REGISTRY.md`): every message into an agent carries an identity, and infrastructure must never wear the user's.
|
|
36
|
+
|
|
37
|
+
## What to Tell Your User
|
|
38
|
+
|
|
39
|
+
When a message of yours goes unanswered, I'll now tell you the real reason if I
|
|
40
|
+
can't reply — "I've hit the usage limit, resets 10:30pm", "my session got stuck
|
|
41
|
+
on a content-policy error, resend your last message" — instead of a misleading
|
|
42
|
+
"actively working." And the "conversation too long" messages that used to pop up
|
|
43
|
+
when nothing was wrong are gone: that only fires now when it's actually
|
|
44
|
+
happening.
|
|
45
|
+
|
|
46
|
+
If you ever saw your agent post "hit a throttle, backing off" and then, moments later in the same topic, "no throttle on my end, still rolling" — it wasn't confused or hijacked. Its rate-limit recovery was poking the session to continue, but that poke was formatted exactly like a message from you, so the agent answered it as if you'd said it. That's fixed: the recovery poke now travels an internal channel it can't mistake for you, so during a throttle you'll see a clean, coherent sequence of "throttled → still throttled → back online" instead of the agent seeming to disagree with itself. The recovery itself always worked; only the narration was incoherent, and now it isn't.
|
|
47
|
+
|
|
48
|
+
## Summary of New Capabilities
|
|
49
|
+
|
|
50
|
+
- `StuckSignatureClassifier` — tail-gated classification of a live-but-failing
|
|
51
|
+
session (rate-limited / policy-wedge / context-wedge / context-too-long) with
|
|
52
|
+
an honest user-facing message per kind. Pure + signal-only.
|
|
53
|
+
- PresenceProxy tier-3 surfaces the honest reason instead of "working", defers
|
|
54
|
+
to an owning recovery sentinel (`isStuckRecoveryActive`), and no longer fires
|
|
55
|
+
the context-too-long notice on a stale scrollback mention.
|
|
56
|
+
- CLAUDE.md "Honest standby (turn-receipts)" section so agents can explain the
|
|
57
|
+
new behavior and the noise fix.
|
|
58
|
+
|
|
59
|
+
- None — this is a behavior fix, not a new capability. No new endpoints or config. It takes effect on the next server restart after the update.
|
|
60
|
+
|
|
61
|
+
## Evidence
|
|
62
|
+
|
|
63
|
+
Grounded in the real 2026-06-04/05 incidents (rate-limit, AUP-wedge) using the
|
|
64
|
+
verbatim pane text. 30+ new unit tests both sides of every boundary
|
|
65
|
+
(honest-when-stuck AND quiet-when-fine, incl. the stale-scrollback noise case
|
|
66
|
+
and prose-mentions-a-limit false positive) + a behavioral test driving the real
|
|
67
|
+
fireTier3 with a live child process (wedge → honest, NOT "working"; deference →
|
|
68
|
+
silent) + migrator add/idempotent + server.ts wiring guard. All 119 existing
|
|
69
|
+
presence tests pass; tsc clean; preflight PASS.
|
|
70
|
+
|
|
71
|
+
Tier-1 fix; 59 tests green across the rate-limit/sentinel suites, `tsc --noEmit` clean, independent second-pass reviewer concurred (sentinel/recovery path):
|
|
72
|
+
|
|
73
|
+
- New regression in `tests/unit/rate-limit-recovery-reachability.test.ts` asserting the resume nudge is internal-only and its text never contains a `[telegram:` prefix (anti-impersonation), plus the updated topic-bound resumeFn contract.
|
|
74
|
+
- `tests/integration/rate-limit-recovery-sentinel-lifecycle.test.ts` re-pinned around the internal-only path.
|
|
75
|
+
- Root cause confirmed live in `logs/sentinel-events.jsonl` (fleet-wide throttle, ~7 sessions each logging "resume nudge injected via topic" pre-fix).
|
|
76
|
+
- Sibling sweep: the compaction-resume inject (honest provenance — fires only on a genuinely unanswered user message) is tracked for audit under the new standard at #894.
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# ELI16 — Honest Turn-Receipts
|
|
2
|
+
|
|
3
|
+
## The problem
|
|
4
|
+
|
|
5
|
+
Three times in two days, the same thing happened: you sent me a message, you
|
|
6
|
+
saw "✓ Delivered" and "🔭 actively working" — and then nothing. No reply. You
|
|
7
|
+
found out by screenshot each time. Three different reasons underneath (I'd hit
|
|
8
|
+
the usage limit, or my session got stuck on a content-policy error, or the
|
|
9
|
+
conversation ran out of room), but ONE misleading symptom: the system kept
|
|
10
|
+
telling you I was "actively working" when I was actually dead in the water.
|
|
11
|
+
|
|
12
|
+
Why did it lie? Because the way it checked "is this session working?" was "is
|
|
13
|
+
its program still running?" — and a stuck session's program IS still running.
|
|
14
|
+
It's alive, it's even printing stuff to the screen; it just can't answer. So
|
|
15
|
+
the live program fooled the check into saying "working."
|
|
16
|
+
|
|
17
|
+
You also noticed a related annoyance: "conversation too long" messages popping
|
|
18
|
+
up often even when the conversation was fine. Same kind of bug — the system was
|
|
19
|
+
finding that phrase ANYWHERE on the screen, including an old one from an hour
|
|
20
|
+
ago that had already been dealt with and scrolled up out of the way.
|
|
21
|
+
|
|
22
|
+
## What this fixes
|
|
23
|
+
|
|
24
|
+
Now, before the system says "working," it reads the bottom of the screen — the
|
|
25
|
+
LIVE part, what's happening right now — and checks for the known "alive but
|
|
26
|
+
can't reply" situations. If it finds one, it tells you the truth instead:
|
|
27
|
+
|
|
28
|
+
- "I've hit the usage limit (resets 10:30pm) — I'll pick back up automatically,
|
|
29
|
+
your messages aren't lost."
|
|
30
|
+
- "My session got stuck on a content-policy error — please resend your last
|
|
31
|
+
message."
|
|
32
|
+
- "This conversation got too long — I'm starting fresh, resend your last one."
|
|
33
|
+
|
|
34
|
+
And the "conversation too long" noise is gone: it only fires if that's what's
|
|
35
|
+
ACTUALLY happening right now at the bottom of the screen, not an old mention
|
|
36
|
+
that scrolled by.
|
|
37
|
+
|
|
38
|
+
## Two safety rules
|
|
39
|
+
|
|
40
|
+
1. **It only reads — it doesn't act.** Fixing the stuck session is still the
|
|
41
|
+
job of the recovery system. This part just stops lying about what's wrong.
|
|
42
|
+
2. **One voice.** If the recovery system is already telling you about a stuck
|
|
43
|
+
session, this stays quiet so you don't get two messages about the same thing.
|
|
44
|
+
|
|
45
|
+
Tested with the exact text from the real screenshots you sent — 30+ new checks
|
|
46
|
+
covering both "say the honest thing when stuck" and "stay quiet when fine,"
|
|
47
|
+
plus all 119 existing standby checks still pass.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
user_announcement:
|
|
3
|
+
audience: user
|
|
4
|
+
maturity: stable
|
|
5
|
+
summary: "When a rate-limit clears, the agent no longer appears to argue with itself in chat."
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# The agent no longer argues with itself while recovering from a rate limit
|
|
9
|
+
|
|
10
|
+
When an Anthropic throttle hit a session, you could see something incoherent in the topic: the agent would post "heads up — hit a throttle, backing off," then a moment later post "no throttle on my end, still rolling," then "still throttled, next retry in 2m." Same agent, same topic, contradicting itself — and during a fleet-wide throttle (many sessions limited at once) it happened in several topics at the same time. The recovery always worked in the end; the *narration* of it looked like the agent was fighting itself.
|
|
11
|
+
|
|
12
|
+
Here is exactly what was happening. The rate-limit sentinel does two separate things when it detects a throttle:
|
|
13
|
+
|
|
14
|
+
1. It posts a user-facing notice to your topic ("hit a throttle, backing off, you haven't been dropped") — the heads-up you asked for.
|
|
15
|
+
2. After it backs off, it pokes the session with a "the throttle should have cleared — please continue where you left off" nudge, to un-stick it.
|
|
16
|
+
|
|
17
|
+
The bug was in step 2. That internal poke was injected into the session wearing a `[telegram:N]` prefix — the **exact** format a real message from you uses. So the session literally could not tell the difference between its own recovery infrastructure and you texting it. It treated the nudge as a message from you, answered it conversationally ("got it — no throttle on my end, still rolling"), and — because every message that looks like it's from you triggers the mandatory "relay your reply back to the user" rule — posted that denial into the topic. Right next to the sentinel's own "still throttled" notices. The sentinel was correct (there really was a throttle); the agent was answering the sentinel's poke as if it were you, and denying the throttle because from its seat the turn had finished fine.
|
|
18
|
+
|
|
19
|
+
## The fix
|
|
20
|
+
|
|
21
|
+
The resume nudge now goes through the **internal recovery channel** instead of the user-message path. It still un-sticks the session exactly the same way (both paths converge on the same low-level injection), but it no longer carries a `[telegram:N]` prefix — so the agent can never mistake it for a message from you, and never relays a contradictory "no throttle" reply. The dead user-message injection path for the resume nudge was removed entirely, so the bug cannot reappear.
|
|
22
|
+
|
|
23
|
+
The heads-up notices you DID ask for ("throttled, backing off" / "still throttled, retrying" / "back online") are unchanged. With the contradictory replies gone, those notices now read as a clean, coherent sequence instead of an argument.
|
|
24
|
+
|
|
25
|
+
## What you need to decide
|
|
26
|
+
|
|
27
|
+
Nothing. This is a behavior fix with no configuration. It takes effect on the next server restart after the update lands.
|
|
28
|
+
|
|
29
|
+
## How to verify it worked
|
|
30
|
+
|
|
31
|
+
The next time a session hits a throttle, watch the topic: you'll see the sentinel's notices in order, with no "no throttle on my end" denial interleaved. The internal nudge is recorded in `logs/sentinel-events.jsonl` as "resume nudge injected via internal recovery channel" (it used to say "via topic").
|
|
32
|
+
|
|
33
|
+
## The deeper lesson
|
|
34
|
+
|
|
35
|
+
This is the first enforcement of a new constitutional standard, **Truthful Provenance — Speak Only as Yourself**: every message delivered into an agent carries an identity, and the agent acts on who it believes is speaking before it acts on the words. Infrastructure must speak as infrastructure, never wearing the user's face. Tests pin the contract — the resume nudge can never again be injected with a user-message prefix.
|