@link-assistant/hive-mind 1.74.11 → 1.74.12
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/CHANGELOG.md +19 -0
- package/package.json +1 -1
- package/src/tool-retry.lib.mjs +14 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @link-assistant/hive-mind
|
|
2
2
|
|
|
3
|
+
## 1.74.12
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e921b34: fix(retry): treat "socket connection was closed unexpectedly" as a transient, retryable error (#1881)
|
|
8
|
+
|
|
9
|
+
The Claude/Codex CLI surfaces transient network disconnects (the Anthropic SDK's
|
|
10
|
+
underlying `fetch()` socket dropping mid-stream) as a synthetic error:
|
|
11
|
+
`API Error: The socket connection was closed unexpectedly.` Previously
|
|
12
|
+
`classifyRetryableError()` did not recognise this family of errors, so a single
|
|
13
|
+
dropped socket aborted the entire solve session (exit code 1, zero retries) and
|
|
14
|
+
discarded all in-progress work. These socket/connection drops
|
|
15
|
+
(`socket connection was closed unexpectedly`, `socket hang up`, `ECONNRESET`,
|
|
16
|
+
`connection reset`, `Connection error`, `fetch failed`, `network connection lost`)
|
|
17
|
+
are now classified as retryable, so the session is retried with `--resume`
|
|
18
|
+
(context preserved) via the existing exponential-backoff path. Because
|
|
19
|
+
`classifyRetryableError` is the shared classifier, the fix covers the Claude,
|
|
20
|
+
Codex and Agent execution loops at once.
|
|
21
|
+
|
|
3
22
|
## 1.74.11
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/package.json
CHANGED
package/src/tool-retry.lib.mjs
CHANGED
|
@@ -43,6 +43,20 @@ export const classifyRetryableError = value => {
|
|
|
43
43
|
return { message, isRetryable: true, isCapacity: false, label: 'Stream disconnected before completion' };
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
// Issue #1881: Transient socket / network disconnects from the SDK's underlying fetch.
|
|
47
|
+
// When the HTTP(S)/streaming socket drops mid-request, the Claude/Codex CLI surfaces a
|
|
48
|
+
// synthetic assistant message such as:
|
|
49
|
+
// "API Error: The socket connection was closed unexpectedly. For more information,
|
|
50
|
+
// pass `verbose: true` in the second argument to fetch()"
|
|
51
|
+
// These are network-level failures (QUIC/TCP resets, idle-socket teardown, proxy/VPN
|
|
52
|
+
// interruptions, undici socket hang-ups), not request-content errors, so they are safe
|
|
53
|
+
// to retry with the session preserved (--resume). Without this branch the whole solve
|
|
54
|
+
// session aborts on a single dropped socket.
|
|
55
|
+
// Upstream: anthropics/claude-code#48837, #51107, #54287, #60133.
|
|
56
|
+
if (lower.includes('socket connection was closed unexpectedly') || lower.includes('socket hang up') || lower.includes('econnreset') || lower.includes('connection reset') || lower.includes('network connection lost') || lower.includes('connection error') || lower.includes('fetch failed')) {
|
|
57
|
+
return { message, isRetryable: true, isCapacity: false, label: 'Socket/connection closed unexpectedly' };
|
|
58
|
+
}
|
|
59
|
+
|
|
46
60
|
// Issue #1834: Corrupted extended-thinking blocks. When extended thinking is combined with tool
|
|
47
61
|
// use, Claude Code can persist a thinking block to the session transcript with the `thinking`
|
|
48
62
|
// text emptied to "" while retaining the original `signature`. On resume/continue the block is
|