1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! The record-level delivery override: the three cases where Claude Code's own
//! request-assembler drop predicate disagrees with the leaf default
//! ([`Class::llm_visible`]).
//!
//! The assembler that turns a transcript into an API request walks the record list and
//! skips a record iff its drop predicate says so. Read at Claude Code 2.1.258, the
//! predicate KEEPS an `api_system` record outright (its first branch returns early) and
//! then drops a `progress` record, a `system` record that is NOT
//! `subtype:"local_command"`, a user/assistant record marked `isVirtual`, and the
//! assistant API-error placeholder (`isApiErrorMessage` with the `<synthetic>` model);
//! everything else is sent. Its `case"system"` arm then RE-MINTS the spared
//! `local_command` record as an ordinary user message built from the record's own
//! `content`, `uuid` and `timestamp`.
//!
//! Nothing on that path reads `isMeta`, `isVisibleInTranscriptOnly` or any slash-command
//! tag, so neither is a delivery instrument (they stay authorship and display flags).
//!
//! Only THREE of the predicate's verdicts need an override, and the reason differs per
//! arm. A `progress` record and an `api_system` record are UNREACHABLE rather than
//! invisible: csift models no leaf for either type, so neither can be selected at all
//! and the predicate's verdict on them - drop and keep respectively - has nothing to
//! disagree with (the corpus holds no line of either type). Every non-`local_command`
//! system subtype does carry a leaf, and that leaf's default already says invisible,
//! which is the verdict the predicate reaches too. That leaves the three cases below,
//! where the predicate and the leaf default genuinely part ways.
use *;